From report at bugs.python.org Mon Oct 1 01:14:58 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 30 Sep 2012 23:14:58 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349046898.27.0.42763305073.issue9650@psf.upfronthosting.co.za> Chris Rebert added the comment: This is now hardcore nitpicking, but I'm conflicted as to whether %p should be grouped with the other locale-related codes or with %I (since it's hard to imagine using %I or %p in a singleton capacity). In any case, props to Mike for putting an actual patch together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:11:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 01:11:20 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1349053880.38.0.147214258535.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: [Django/Rietveld is erroring out for me when I try to reply there, so replying here] On 2012/10/01 01:45:03, cvrebert wrote: > Doc/library/functions.rst:636: arguments are given. If *x* is a number, return > :meth:`x.__int__() > How is "number-ness" determined? Are we just assuming anything with an __int__() > method is a number for purposes of explanation? cvrebert, this patch has already been committed to 3.x. Maybe open a new issue if you think the language can be improved further? (Feel free to add me to the nosy list.) This issue was originally focused more on updating just the signature line (along with any consequent changes to the text). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:11:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 04:11:04 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <3XVVRC2jpNzQld@mail.python.org> Roundup Robot added the comment: New changeset ed76eac4491e by Chris Jerdonek in branch '2.7': Close #16036: Backport 3.x documentation improvement. http://hg.python.org/cpython/rev/ed76eac4491e ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:12:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 04:12:35 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1349064755.33.0.184620727753.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Chris (cvrebert), feel free to create a new issue to improve the int() docs further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:28:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 05:28:53 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1349069333.14.0.754603223826.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I propose addressing the remainder of this issue by: 1) Documenting the difference in behavior between Windows and non-Windows, adjusting the tests to reflect this difference, and then closing this issue, and then 2) Creating a new issue to discuss whether and in what version to make the behavior of the cwd argument the same across Windows and non-Windows. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:33:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 07:33:39 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349076818.92.0.201486997213.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. This updates the docstrings for int() and str(), as well as for range() and slice() in a similar way. It also makes the documentation for str() closer to that of the docstring. The documentation for int(), range(), and slice() has already been updated along the lines of this patch. ---------- keywords: +needs review stage: needs patch -> patch review Added file: http://bugs.python.org/file27370/issue-14783-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:04:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 01:04:08 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349139848.66.0.928594555351.issue15979@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file27382/issue15979-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:36:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 01:36:38 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349141797.93.0.213780736004.issue15979@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I copy-edited the patch just looking for minor things like punctuation, etc: +a :ref:`command-line-interface` as well as :ref:`callable ` a callable one +See also Tim Peters' introduction to the "Algorithms" chapter in the Python +Cookbook, published by O'Reilly. italicize or underline book titles (is there a reST directive for books?) +The following example shows how the :ref:`command-line-interface`, no comma +Python interface Python Interface + Create a :class:`Timer` instance with the given statement, setup code and timer + function and run its :meth:`.timeit` method with *number* executions. stars around setup and timer like there is with *number*? + Create a :class:`Timer` instance with the given statement, setup code and timer + function and run its :meth:`.repeat` method with the given *repeat* count and ditto + Define a default timer, in a platform specific manner. On Windows, platform-specific + :func:`time.clock` has microsecond granularity but :func:`time.time`'s granularity, but + granularity is 1/60th of a second; on Unix, :func:`time.clock` has 1/100th of I would just split this into two sentences since it already combines two compound sentences (i.e. it is effectively four sentences): second. On Unix, + a second granularity and :func:`time.time` is much more precise. On either granularity, and + Time *number* executions of the main statement. This executes the setup statement. This + statement once, and then returns the time it takes to execute the main statement + a number of times, measured in seconds as a float. The argument is the number *number* times + baseline overhead can be measured by invoking the program without arguments and arguments, and ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:02:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 03:02:29 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <3XW4sb6Wv5zQsH@mail.python.org> Roundup Robot added the comment: New changeset 60c831305e73 by Ezio Melotti in branch '2.7': #15979: improve timeit documentation. http://hg.python.org/cpython/rev/60c831305e73 New changeset d5a4300702c1 by Ezio Melotti in branch '3.2': #15979: improve timeit documentation. http://hg.python.org/cpython/rev/d5a4300702c1 New changeset ff32d390f897 by Ezio Melotti in branch '3.3': #15979: merge with 3.2. http://hg.python.org/cpython/rev/ff32d390f897 New changeset 85b6c1c19cb8 by Ezio Melotti in branch 'default': #15979: merge with 3.3. http://hg.python.org/cpython/rev/85b6c1c19cb8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:06:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 03:06:33 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349147193.68.0.94273893364.issue15979@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the review! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:20:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:20:46 +0000 Subject: [docs] [issue14003] __self__ on built-in functions is not as documented In-Reply-To: <1329159935.3.0.264942191971.issue14003@psf.upfronthosting.co.za> Message-ID: <1349155245.99.0.495762228236.issue14003@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:44:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:44:33 +0000 Subject: [docs] [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1349156673.58.0.831995057437.issue15104@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:18:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:18:31 +0000 Subject: [docs] [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1349158711.71.0.889523146459.issue3849@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy versions: +Python 2.7 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:12:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 13:12:47 +0000 Subject: [docs] [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1349183567.11.0.633747113809.issue3849@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The section of the Dev Guide on "affirmative tone" should also be applied: "The documentation focuses on affirmatively stating what the language does and how to use it effectively...." http://docs.python.org/devguide/documenting.html#affirmative-tone ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From pybugs at rebertia.com Mon Oct 1 01:45:03 2012 From: pybugs at rebertia.com (pybugs at rebertia.com) Date: Sun, 30 Sep 2012 23:45:03 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120930234503.1402.65090@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst#newcode636 Doc/library/functions.rst:636: arguments are given. If *x* is a number, return :meth:`x.__int__() How is "number-ness" determined? Are we just assuming anything with an __int__() method is a number for purposes of explanation? http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst#newcode648 Doc/library/functions.rst:648: means to interpret exactly as a code literal, so that the actual base is 2, grammar: "to interpret *x*" or "to interpret the value" or similar. Just "to interpret", without a direct object, sounds a bit odd. "code literal" is unclear. Perhaps replace with "Python integer literal" or "using integer literal syntax"? http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst#newcode650 Doc/library/functions.rst:650: ``int('010')`` is, as well as ``int('010', 8)``. Shouldn't we mention somewhere that this raises ValueError and TypeError? http://bugs.python.org/review/16036/ From ezio.melotti at gmail.com Mon Oct 1 04:44:37 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Mon, 01 Oct 2012 02:44:37 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20121001024437.1401.18102@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst#newcode636 Doc/library/functions.rst:636: arguments are given. If *x* is a number, return :meth:`x.__int__() On 2012/10/01 01:45:03, cvrebert wrote: > How is "number-ness" determined? Are we just assuming anything with an __int__() > method is a number for purposes of explanation? Yes. http://bugs.python.org/review/16036/diff/6079/Doc/library/functions.rst#newcode650 Doc/library/functions.rst:650: ``int('010')`` is, as well as ``int('010', 8)``. On 2012/10/01 01:45:03, cvrebert wrote: > Shouldn't we mention somewhere that this raises ValueError and TypeError? This paragraph might be rephrased a bit. http://bugs.python.org/review/16036/ From jonathan.hayward at pobox.com Tue Oct 2 00:26:45 2012 From: jonathan.hayward at pobox.com (Jonathan Hayward) Date: Mon, 1 Oct 2012 17:26:45 -0500 Subject: [docs] Enhancement to http://docs.python.org/py3k/library/readline.html?highlight=readline#readline Message-ID: http://docs.python.org/py3k/library/readline.html?highlight=readline#readlinetells a number of things about readline. However, it does not tell how to use the readline library as a bigger and better souped-up sys.stdin.readline(). I gave up and asked on StackOverflow, where someone told me that input() will take advantage of any readline import, which helped me but wasn't the answer because I wasn't trying to emulate the Python interpreter and treat lines as automatically Python commands. That documentation referred to me what I needed to know, namely that if I wanted to improve on sys.stdin.readline(), I should import readline and call raw_input(). There are a couple of examples provided on the page, but none of them hints at how to use readline to get a bigger and better sys.stdin.readline(). -- [image: Christos Jonathan Hayward] Christos Jonathan Hayward, an Orthodox Christian author. *Amazon * ? Author Bio ? *Email * ? Facebook ? Google Plus ? *Kindle * ? LinkedIn ? *Professional * ? Twitter ? *Web * ? What's New? I invite you to visit my "theology, literature, and other creative works" site. *See one page of my website! * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ubaransel at excite.com Tue Oct 2 14:39:56 2012 From: ubaransel at excite.com (ubaransel at excite.com) Date: Tue, 02 Oct 2012 08:39:56 -0400 Subject: [docs] documentation bug Message-ID: <20121002083956.24553@web008.roc2.bluetie.com> on the following page: http://docs.python.org/release/2.6.7/library/re.html or in other words section: "7.2.6.1. Checking For a Pair" in "re" python library documentation it says: """ Suppose you are writing a poker program where a player?s hand is represented as a 5-character string with each character representing a card, ?a? for ace, ?k? for king, ?q? for queen, j for jack, ?0? for 10, and ?1? through ?9? representing the card with that value. """ there can not be an ace and a "1" card; so it shoud be: """ Suppose you are writing a poker program where a player?s hand is represented as a 5-character string with each character representing a card, ?a? for ace, ?k? for king, ?q? for queen, j for jack, ?0? for 10, and ?2? through ?9? representing the card with that value. """ This error exists in python 2.6 and 3.1 documentation. I did not check other versions. From report at bugs.python.org Tue Oct 2 17:28:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 15:28:59 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349191739.45.0.90773492418.issue15888@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Tue Oct 2 17:36:04 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Tue, 2 Oct 2012 08:36:04 -0700 Subject: [docs] Small typo error in the ip_address module introduction Message-ID: > Date: Sat, 29 Sep 2012 18:11:25 -0400 > From: Pierre Rouleau > To: "docs at python.org" > Subject: [docs] Small typo error in the ip_address module introduction > > I found the following typo error inside the ip_address module introduction (http://docs.python.org/dev/howto/ipaddress.html). > > Inside the Host Interfaces section there is the following example: > >>>> ipaddress.ip_interface('192.0.2.1/24') IPv4Interface('192.0.2.1/24') >>> ipaddress.ip_network('2001:db8::1/96') IPv6Interface('2001:db8::1/96') > the second statement should call the ip_interface method instead of the ip_network one. Hi Pierre, thanks for the report. There is currently an issue for this (and similar errors) here: http://bugs.python.org/issue15888 I expect that a fix will be committed shortly. Thanks, --Chris From andrew.svetlov at gmail.com Tue Oct 2 17:41:23 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Tue, 2 Oct 2012 18:41:23 +0300 Subject: [docs] Typo in /reference/datamodel.html In-Reply-To: References: Message-ID: Fixed, thanks. On Sun, Sep 30, 2012 at 12:28 PM, Josh Helzer wrote: > In > http://docs.python.org/release/3.2.3/reference/datamodel.html#the-standard-type-hierarchy > under the description of Bytes sequence type: > > A bytes object is an immutable array. The items are 8-bit bytes, represented > by integers in the range 0 <= x < 256. Bytes literals (like b'abc' and the > built-in function bytes() can be used to construct bytes objects. Also, > bytes objects can be decoded to strings via the decode() method. > > Missing closing parenthesis (or rewrite or whatever): > > A bytes object is an immutable array. The items are 8-bit bytes, represented > by integers in the range 0 <= x < 256. Bytes literals (like b'abc') and the > built-in function bytes() can be used to construct bytes objects. Also, > bytes objects can be decoded to strings via the decode() method. > > Saw this in 3.2.3, but it also seems to still exist in 3.4.0a0 docs. > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Thanks, Andrew Svetlov From andrew.svetlov at gmail.com Tue Oct 2 18:29:25 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Tue, 2 Oct 2012 19:29:25 +0300 Subject: [docs] Problems with a unittest example and Python 3.3 In-Reply-To: <989973D3-9956-4343-84AB-0CE7F478FC3E@trattoriaallascala.com> References: <989973D3-9956-4343-84AB-0CE7F478FC3E@trattoriaallascala.com> Message-ID: It works for me. I use Python 3.3. On Sun, Sep 30, 2012 at 11:04 AM, Pierazzo Mara wrote: > I tried the very first example I found on the Python documentation at this address: http://docs.python.org/py3k/library/unittest.html#module-unittest > > import random > import unittest > > class TestSequenceFunctions(unittest.TestCase): > > def setUp(self): > self.seq = list(range(10)) > > def test_shuffle(self): > # make sure the shuffled sequence does not lose any elements > random.shuffle(self.seq) > self.seq.sort() > self.assertEqual(self.seq, list(range(10))) > > # should raise an exception for an immutable sequence > self.assertRaises(TypeError, random.shuffle, (1,2,3)) > > def test_choice(self): > element = random.choice(self.seq) > self.assertTrue(element in self.seq) > > def test_sample(self): > with self.assertRaises(ValueError): > random.sample(self.seq, 20) > for element in random.sample(self.seq, 5): > self.assertTrue(element in self.seq) > > if __name__ == '__main__': > unittest.main() > > > On Python 2.7.1 this example used to work, as I was getting back this result: > > >> Ran 3 tests in 0.001s >> >> OK > > > but when I run this code on Python 3.3 I'm getting this error: > > > Traceback (most recent call last): > File "/Users/[USERNAME]/Desktop/prova.py", line 29, in > unittest.main() > File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/unittest/main.py", line 125, in __init__ > self.runTests() > File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/unittest/main.py", line 263, in runTests > sys.exit(not self.result.wasSuccessful()) > SystemExit: False > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Thanks, Andrew Svetlov From report at bugs.python.org Wed Oct 3 00:39:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 22:39:29 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <3XWZzg3BXqzQcN@mail.python.org> Roundup Robot added the comment: New changeset 3a0acdc25cca by Alexander Belopolsky in branch 'default': Issue #9650: List commonly used format codes in time.strftime and time.strptime docsttings. http://hg.python.org/cpython/rev/3a0acdc25cca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:58:57 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Oct 2012 22:58:57 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349218737.54.0.545726906778.issue9650@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:49:51 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Oct 2012 23:49:51 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349221791.76.0.322325846279.issue9650@psf.upfronthosting.co.za> ?ric Araujo added the comment: Christian, did you ask on python-dev about your idea? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:03:52 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 03 Oct 2012 00:03:52 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349222632.14.0.584918251987.issue9650@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Christian's or rather Skip's idea is covered by Issue 3173. This was discussed several times on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:05:09 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 03 Oct 2012 00:05:09 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349222709.24.0.935722140828.issue9650@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:48:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 06:48:37 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWnr40M06zNmP@mail.python.org> Roundup Robot added the comment: New changeset 662fb4bd5f84 by Nick Coghlan in branch '2.7': Issue #12947: Add a note to doctest until the example rendering is fixed http://hg.python.org/cpython/rev/662fb4bd5f84 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:52:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 06:52:30 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWnwZ0gMlzNw3@mail.python.org> Roundup Robot added the comment: New changeset 679b3e3aadae by Nick Coghlan in branch '3.3': Issue #12947: Add a note to doctest until the example rendering is fixed http://hg.python.org/cpython/rev/679b3e3aadae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:54:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 06:54:31 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349247270.99.0.264031910818.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since the status quo is thoroughly confusing for readers, I added an explicit note before the affected examples. That note should be removed once the rendering problem is fixed. (The note is there on trunk as well, I just forgot to include the issue number in the merge commit) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:12:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 07:12:21 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349248341.77.0.520955737495.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I thought of an easy work-around we can use after looking at the changeset Terry referenced above: > [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef At the expense of pretty color highlighting, we can enable Pygments' TextLexer for the affected examples (aka "null" lexer). For example-- .. code-block:: text >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): CustomError: message I confirmed locally that this works. I realized this might work because the Sphinx changeset referenced above has this logic: # trim doctest options if wanted if isinstance(lexer, PythonConsoleLexer) and self.trim_doctest_flags: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:18:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 08:18:27 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWqqk5x3YzNkh@mail.python.org> Roundup Robot added the comment: New changeset 18d927fb8671 by Nick Coghlan in branch '2.7': Issue #12947: Better workaround for the problem with doctest directives being stripped from code examples that are intended to illustrate those directives http://hg.python.org/cpython/rev/18d927fb8671 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:23:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 08:23:39 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWqxk2qfBzNn8@mail.python.org> Roundup Robot added the comment: New changeset d93a59a0a984 by Nick Coghlan in branch '3.3': Issue #12947: Better workaround for the problem with doctest directives being stripped from code examples that are intended to illustrate those directives http://hg.python.org/cpython/rev/d93a59a0a984 New changeset 26200f535296 by Nick Coghlan in branch 'default': Merge #12947 workaround from 3.3 http://hg.python.org/cpython/rev/26200f535296 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:25:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 08:25:13 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349252713.46.0.661702270012.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adopted Chris's workaround for now. I kept a reworded version of the preceding note (with the link to this bug), so readers know that the lack of syntax highlighting is intended-but-not-desired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:35:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 08:35:45 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349253345.6.0.953882130062.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Nick. It looks like there are a few more though? I'm counting four more in default (search for "doctest:"): three IGNORE_EXCEPTION_DETAIL and one ELLIPSIS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:00:04 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 09:00:04 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349254804.34.0.225761752718.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: I only changed the ones that were specifically in the section explaining doctest directives. There are probably others, but it didn't seem necessary to change them and lose the syntax highlighting at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 17:02:26 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 03 Oct 2012 15:02:26 +0000 Subject: [docs] [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1349276546.06.0.459673610523.issue15104@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From mike at saguaroscuba.com Wed Oct 3 17:11:56 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Wed, 03 Oct 2012 08:11:56 -0700 Subject: [docs] documentation bug In-Reply-To: <20121002083956.24553@web008.roc2.bluetie.com> References: <20121002083956.24553@web008.roc2.bluetie.com> Message-ID: <506C55BC.4020109@saguaroscuba.com> On 10/02/2012 05:39 AM, ubaransel at excite.com wrote: > on the following page: > http://docs.python.org/release/2.6.7/library/re.html > > or in other words section: "7.2.6.1. Checking For a Pair" in "re" python library documentation it says: > > """ > Suppose you are writing a poker program where a player?s hand is represented as a 5-character string with each character representing a card, ?a? for ace, ?k? for king, ?q? for queen, j for jack, ?0? for 10, and ?1? through ?9? representing the card with that value. > """ > > there can not be an ace and a "1" card; so it shoud be: > > """ > Suppose you are writing a poker program where a player?s hand is represented as a 5-character string with each character representing a card, ?a? for ace, ?k? for king, ?q? for queen, j for jack, ?0? for 10, and ?2? through ?9? representing the card with that value. > """ > > This error exists in python 2.6 and 3.1 documentation. > I did not check other versions. > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs I checked: http://docs.python.org/py3k/library/re.html#checking-for-a-pair It says: Suppose you are writing a poker program where a player?s hand is represented as a 5-character string with each character representing a card, ?a? for ace, ?k? for king, ?q? for queen, ?j? for jack, ?t? for 10, and ?2? through ?9? representing the card with that value. -- -Mike Hoy From report at bugs.python.org Thu Oct 4 07:42:12 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 05:42:12 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1349329331.96.0.413028783192.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: Patch to update docstring and documentation with explicit saying that calling JSONEncoder.default raises a TypeError ---------- keywords: +patch Added file: http://bugs.python.org/file27408/explicit_json_doc_update_for_encoder_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 07:43:31 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 05:43:31 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1349329411.54.0.314490123881.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: The previous patch should be back committed to all 3.x and 2.7 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:17:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 07:17:48 +0000 Subject: [docs] [issue16127] Correct mentions of narrow build in documentation and comments Message-ID: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In some places in the documentation and in the comments still left incorrect mention of the narrow build. Suggested patch fixes this. ---------- assignee: docs at python components: Documentation, Unicode files: doc_narrow_build.patch keywords: patch messages: 171924 nosy: docs at python, ezio.melotti, storchaka priority: normal severity: normal status: open title: Correct mentions of narrow build in documentation and comments type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27410/doc_narrow_build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:37:14 2012 From: report at bugs.python.org (Max) Date: Thu, 04 Oct 2012 11:37:14 +0000 Subject: [docs] [issue16128] hashable documentation error Message-ID: <1349350634.9.0.571993653286.issue16128@psf.upfronthosting.co.za> New submission from Max: http://docs.python.org/dev/glossary.html?highlight=hashable says: Objects which are instances of user-defined classes are hashable by default; they all compare unequal, and their hash value is their id(). Since x == x returns True by default, so "they all compare unequal" isn't quite right. In addition, both the above paragraph and http://docs.python.org/dev/reference/datamodel.html?highlight=__eq__#object.__hash__ say: User-defined classes have __eq__() and __hash__() methods by default; with them, all objects compare unequal (except with themselves) and x.__hash__() returns an appropriate value such that x == y implies both that x is y and hash(x) == hash(y). This is correct, but may leave some confusion with the reader about what happens to a subclass of a built-in class (which doesn't use the default behavior, but instead simply inherits the parent's __hash__ and __eq__). ---------- assignee: docs at python components: Documentation messages: 171935 nosy: docs at python, max priority: normal severity: normal status: open title: hashable documentation error type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:09:13 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Oct 2012 14:09:13 +0000 Subject: [docs] [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" Message-ID: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> New submission from Ramchandra Apte: "Porting to Python 3.3" should be "Porting to Python 3.4" in "What's new In Python 3.4" [0] http://docs.python.org/dev/whatsnew/3.4.html#porting-to-python-3-3 ---------- assignee: docs at python components: Documentation messages: 171951 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From cluelesscoder at gmail.com Wed Oct 3 20:55:27 2012 From: cluelesscoder at gmail.com (Jes Slow) Date: Wed, 3 Oct 2012 10:55:27 -0800 Subject: [docs] Documentation style conventions? Message-ID: Have you guys explicitly laid out the documentation style conventions? I was looking for something similar to http://dev.mysql.com/doc/refman/5.5/en/manual-conventions.html but I couldn't find it. When I asked about this on the IRC channel, I was referred to 4.7 of the tutorial, which talks only briefly about documentation and mostly related to source code documentation. I would expect it to be discussed at http://docs.python.org/about.html. The brackets [] around optional parameters is pretty standard, so even a newbie like me understood it (altho I still think it should be disclosed), but when I read http://docs.python.org/release/3.1.5/library/csv.html I noticed that csv.reader has optional parameters which are not bracketed, which confuses me a bit. I'm talking about *dialect='excel'*, ***fmtparams*. I'm also not sure what ** means (I'm guessing multiple parameters?) or just a single * means. -------------- next part -------------- An HTML attachment was scrubbed... URL: From obernard78+python at gmail.com Thu Oct 4 10:03:41 2012 From: obernard78+python at gmail.com (Olivier Bernard) Date: Thu, 4 Oct 2012 10:03:41 +0200 Subject: [docs] Typo in Py3k doc: ChainMap example Message-ID: Hi, I just saw that there is a typo in the 3rd example of the new ChainMap section in 'collections.txt': the 9th line of this example indicates "del['x']" which is obviously false, and more than that, since I tested this (just to be sure ;-)) and it raises a SyntaxError. It should be "del d['x']". Nevertheless, it is the first typo I see and I've been reading the Python doc for a long time. Great work! Regards, Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: From stehlampen at arcor.de Thu Oct 4 11:48:22 2012 From: stehlampen at arcor.de (stehlampen at arcor.de) Date: Thu, 4 Oct 2012 11:48:22 +0200 (CEST) Subject: [docs] spelling mistake Message-ID: <492570793.215756.1349344102491.JavaMail.ngmail@webmail10.arcor-online.net> The documentation of the time module contains a spelling mistake. In the entry " class time.struct_time", in "Changed in version 3.3", you can find "avaliable". The correct spelling is "available". This mistake exists only in version 3.3. Kinds regards. From report at bugs.python.org Thu Oct 4 18:01:29 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 16:01:29 +0000 Subject: [docs] [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" In-Reply-To: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> Message-ID: <1349366489.37.0.143480714935.issue16130@psf.upfronthosting.co.za> Kushal Das added the comment: Documentation patch to show correct Python version. ---------- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file27418/issue_16130.patch _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Thu Oct 4 18:30:29 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Thu, 4 Oct 2012 19:30:29 +0300 Subject: [docs] Typo in Py3k doc: ChainMap example In-Reply-To: References: Message-ID: Fixed, thank you. On Thu, Oct 4, 2012 at 11:03 AM, Olivier Bernard wrote: > Hi, > > I just saw that there is a typo in the 3rd example of the new ChainMap > section in 'collections.txt': > the 9th line of this example indicates > > "del['x']" > > which is obviously false, and more than that, since I tested this (just to > be sure ;-)) and it raises a SyntaxError. It should be > > "del d['x']". > > Nevertheless, it is the first typo I see and I've been reading the Python > doc for a long time. Great work! > > Regards, > Olivier > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Thanks, Andrew Svetlov From report at bugs.python.org Thu Oct 4 18:45:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 16:45:23 +0000 Subject: [docs] [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" In-Reply-To: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> Message-ID: <3XXg285d74zNfD@mail.python.org> Roundup Robot added the comment: New changeset b21288c1ec68 by Benjamin Peterson in branch 'default': 3.3 -> 3.4 (closes #16130) http://hg.python.org/cpython/rev/b21288c1ec68 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Thu Oct 4 18:55:37 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Thu, 4 Oct 2012 19:55:37 +0300 Subject: [docs] spelling mistake In-Reply-To: <492570793.215756.1349344102491.JavaMail.ngmail@webmail10.arcor-online.net> References: <492570793.215756.1349344102491.JavaMail.ngmail@webmail10.arcor-online.net> Message-ID: Fixed, thanks. On Thu, Oct 4, 2012 at 12:48 PM, wrote: > The documentation of the time module contains a spelling mistake. In the entry " class time.struct_time", in "Changed in version 3.3", you can find "avaliable". The correct spelling is "available". This mistake exists only in version 3.3. > > Kinds regards. > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Thanks, Andrew Svetlov From report at bugs.python.org Fri Oct 5 00:46:19 2012 From: report at bugs.python.org (py.user) Date: Thu, 04 Oct 2012 22:46:19 +0000 Subject: [docs] [issue16138] In the glossary there is a small typo about __len__() in the sequence definition Message-ID: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> New submission from py.user: http://docs.python.org/py3k/glossary.html#term-sequence "and defines a len() method that returns the length of the sequence" change to "and defines a __len__() special method that returns the length of the sequence" ---------- assignee: docs at python components: Documentation messages: 172013 nosy: docs at python, py.user priority: normal severity: normal status: open title: In the glossary there is a small typo about __len__() in the sequence definition versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:34:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 00:34:14 +0000 Subject: [docs] [issue16127] Correct mentions of narrow build in documentation and comments In-Reply-To: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> Message-ID: <3XXsR96vMZzM4S@mail.python.org> Roundup Robot added the comment: New changeset a1aa13ef00c5 by Ezio Melotti in branch '3.3': #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/a1aa13ef00c5 New changeset 89ee959a9b54 by Ezio Melotti in branch 'default': #16127: merge with 3.3. http://hg.python.org/cpython/rev/89ee959a9b54 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:34:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Oct 2012 00:34:51 +0000 Subject: [docs] [issue16127] Correct mentions of narrow build in documentation and comments In-Reply-To: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> Message-ID: <1349397291.16.0.852828886551.issue16127@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:27:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 10:27:15 +0000 Subject: [docs] [issue16138] In the glossary there is a small typo about __len__() in the sequence definition In-Reply-To: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> Message-ID: <3XY6bN4CMFzPkn@mail.python.org> Roundup Robot added the comment: New changeset 7cf0d8b2744b by Andrew Svetlov in branch '3.2': Issue #16138: fix typo. http://hg.python.org/cpython/rev/7cf0d8b2744b New changeset a093d39fdda4 by Andrew Svetlov in branch '3.3': Merge issue #16138: fix typo. http://hg.python.org/cpython/rev/a093d39fdda4 New changeset cbb9b5dcb88a by Andrew Svetlov in branch 'default': Merge issue #16138: fix typo. http://hg.python.org/cpython/rev/cbb9b5dcb88a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:28:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 10:28:19 +0000 Subject: [docs] [issue16138] In the glossary there is a small typo about __len__() in the sequence definition In-Reply-To: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> Message-ID: <1349432899.35.0.604222821177.issue16138@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks to py.user ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:51:00 2012 From: report at bugs.python.org (=?utf-8?q?Manuel_P=C3=A9gouri=C3=A9-Gonnard?=) Date: Fri, 05 Oct 2012 17:51:00 +0000 Subject: [docs] [issue16144] misleading sentence in reference/import Message-ID: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> New submission from Manuel P?gouri?-Gonnard: I find the following sentences, from import.rst, section "Finders and loaders", misleading: "Python includes a number of default finders and importers. One knows how to locate frozen modules, and another knows how to locate built-in modules." in that one may think frozen comes before built-in, while the converse is true. Attached is a patch with a hopefully clearer version. While at it, the patch also turns into links the references to PEPs in the introduction. ---------- assignee: docs at python components: Documentation files: import-doc-fixes.patch keywords: patch messages: 172105 nosy: docs at python, mpg priority: normal severity: normal status: open title: misleading sentence in reference/import versions: Python 3.4 Added file: http://bugs.python.org/file27436/import-doc-fixes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:25:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 18:25:13 +0000 Subject: [docs] [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1349461513.87.0.657481118976.issue16144@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:57:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 18:57:42 +0000 Subject: [docs] [issue16128] hashable documentation error In-Reply-To: <1349350634.9.0.571993653286.issue16128@psf.upfronthosting.co.za> Message-ID: <1349463462.02.0.137465793593.issue16128@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please write what exact text you want to see in documentation. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:20:52 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 05 Oct 2012 21:20:52 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1349472052.45.0.393821534854.issue12067@psf.upfronthosting.co.za> Mike Hoy added the comment: Changed patch to include suggestions by Chris Jerdonek. http://bugs.python.org/issue12067#msg170953 ---------- hgrepos: +153 Added file: http://bugs.python.org/file27442/issue12067-expressions_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:47:05 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 05 Oct 2012 22:47:05 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1349477225.17.0.564127490007.issue12067@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- hgrepos: -153 _______________________________________ Python tracker _______________________________________ From list at qtrac.plus.com Sat Oct 6 09:08:07 2012 From: list at qtrac.plus.com (Mark Summerfield) Date: Sat, 6 Oct 2012 08:08:07 +0100 Subject: [docs] missing method Message-ID: <20121006080807.4a6ee2f7@dino> Hi, On page: http://docs.python.org/py3k/library/difflib.html#module-difflib class difflib.Differ has a compare() method: but it isn't shown. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Python 3" - ISBN 0321680561 http://www.qtrac.eu/py3book.html From report at bugs.python.org Sat Oct 6 10:48:14 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 06 Oct 2012 08:48:14 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349513294.26.0.943820365312.issue11643@psf.upfronthosting.co.za> Mike Hoy added the comment: Here is a patch after talking with Ezio on irc tonight. The rules I (attempted) to follow are: Within a :file: you should have {X.Y} In a text/paragraph area you can use |version| Within anything else just leave it as X.Y As stated by ?ric I ignored install and distutils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 10:48:50 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 06 Oct 2012 08:48:50 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349513330.35.0.863447766714.issue11643@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- keywords: +patch Added file: http://bugs.python.org/file27446/issue11643-xy_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:18:49 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 06 Oct 2012 11:18:49 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug Message-ID: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> New submission from Michele Orr?: Follows from the discussion on python-dev: http://mail.python.org/pipermail/python-dev/2012-September/121871.html ---------- assignee: docs at python components: Documentation messages: 172182 nosy: docs at python, maker, terry.reedy priority: normal severity: normal status: open title: "Decimal(2) != float(2)" documentation bug versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:49:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 11:49:29 +0000 Subject: [docs] [issue11710] Landing pages in docs for standard library packages In-Reply-To: <1301401907.02.0.216152132906.issue11710@psf.upfronthosting.co.za> Message-ID: <3XYmMq4LCTzM88@mail.python.org> Roundup Robot added the comment: New changeset 1141648fa655 by Georg Brandl in branch '3.3': Closes #11710: create "landing pages" (/library/package.html) for those packages that have no documented content themselves, e.g. "urllib" or "http". http://hg.python.org/cpython/rev/1141648fa655 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:49:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 11:49:29 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <3XYmMr2jhpzM88@mail.python.org> Roundup Robot added the comment: New changeset ee71d8023f1b by Georg Brandl in branch '3.3': Closes #16149: remove now-false statement about the inability to compare Decimal and float objects. http://hg.python.org/cpython/rev/ee71d8023f1b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:39:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 14:39:25 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349534365.2.0.484474988364.issue16149@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the fix should be applied to 2.7 and 3.2 too. See issue2531 which allowed comparing decimals and floats. ---------- nosy: +mark.dickinson, serhiy.storchaka status: closed -> open versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:46:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 14:46:55 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349534815.83.0.0566272624986.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +needs review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:48:44 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 14:48:44 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349534924.28.0.953609341653.issue16149@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah, sorry, I thought this was a 3.3 thing. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:11:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 15:11:12 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <3XYrrb56V3zNtr@mail.python.org> Roundup Robot added the comment: New changeset 2c398a78dba8 by Andrew Svetlov in branch '2.7': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/2c398a78dba8 New changeset 3d54d17a637b by Andrew Svetlov in branch '3.2': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/3d54d17a637b New changeset 2e7a57cdd961 by Andrew Svetlov in branch '3.3': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/2e7a57cdd961 New changeset 7fd068d4ded8 by Andrew Svetlov in branch 'default': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/7fd068d4ded8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:12:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:12:10 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349536330.19.0.514300150175.issue16025@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Please close the issue if all work done. Thanks. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:23:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Oct 2012 15:23:14 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349536994.13.0.0466408810708.issue11643@psf.upfronthosting.co.za> ?ric Araujo added the comment: After reviewing the patch I think that this change would not actually improve things. What do you think? (Thanks for the patch nonetheless :)* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:29:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 15:29:13 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349537353.71.0.0455965323594.issue16025@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Andrew, please revert the test_subprocess changes. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:48:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:48:09 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349538489.09.0.434659824244.issue16025@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done in 674fa8d211f2, 5665806908c4 and c9695a0b0923. Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:11:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:11:19 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349539878.94.0.901571589738.issue16025@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Andrew. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:11:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:11:47 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349539907.19.0.296593696406.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From mail at jdborg.com Fri Oct 5 17:34:35 2012 From: mail at jdborg.com (=?UTF-8?B?Sm9lIEJvcsSh?=) Date: Fri, 5 Oct 2012 16:34:35 +0100 Subject: [docs] Finally statement cannot access the exception information Message-ID: As the docs say:* The exception information is not available to the program during execution of the finallyclause. * But why is this? Is it restricted by implementation? Regards, Joseph David Bor? http://www.jdborg.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From classone2010 at gmail.com Sat Oct 6 18:51:55 2012 From: classone2010 at gmail.com (=?UTF-8?B?6YC45ZCb5pu5?=) Date: Sun, 7 Oct 2012 00:51:55 +0800 Subject: [docs] damn it .... Look at this function.... Message-ID: stat.S_IMODE(*mode*) it output 493 when one file has permission settings 755 !!!!! it seems it directly output binary: 111,101,101 as a whole number!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From georg at python.org Sat Oct 6 19:20:05 2012 From: georg at python.org (Georg Brandl) Date: Sat, 06 Oct 2012 19:20:05 +0200 Subject: [docs] damn it .... Look at this function.... In-Reply-To: References: Message-ID: <50706845.4060602@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 06.10.2012 18:51, schrieb ???: > stat.S_IMODE(/mode/) > > it output 493 when one file has permission settings 755 !!!!! it seems it > directly output binary: 111,101,101 as a whole number!!! Hi, this can indeed be confusing. The "755" mode you know is an *octal* number which, converted to decimal, is the same as 493. You can try it in Python: >>> int('755', 8) 493 Hope that helps, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlBwaEQACgkQN9GcIYhpnLCapwCfT9kBRoQ5FoXIaU1LrynD8g/7 ZM0AoJ6oJhJta8Ilvol8uSPOgj5/x7J2 =hhMO -----END PGP SIGNATURE----- From report at bugs.python.org Sat Oct 6 19:21:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 17:21:50 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <3XYvlK2408zLwP@mail.python.org> Roundup Robot added the comment: New changeset 1dc66e654806 by Georg Brandl in branch '3.2': Closes #16149: remove now-false statement about the inability to compare Decimal and float objects. http://hg.python.org/cpython/rev/1dc66e654806 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:22:16 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 17:22:16 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349544136.71.0.375583935078.issue16149@psf.upfronthosting.co.za> Georg Brandl added the comment: Planted to 3.2 in 1dc66e654806. Turns out the offending paragraph wasn't in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From mike at saguaroscuba.com Sat Oct 6 19:33:16 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 06 Oct 2012 10:33:16 -0700 Subject: [docs] missing method In-Reply-To: <20121006080807.4a6ee2f7@dino> References: <20121006080807.4a6ee2f7@dino> Message-ID: <50706B5C.7040808@saguaroscuba.com> On 10/06/2012 12:08 AM, Mark Summerfield wrote: > Hi, > > On page: > http://docs.python.org/py3k/library/difflib.html#module-difflib > > class difflib.Differ > > has a compare() method: but it isn't shown. > > http://docs.python.org/py3k/library/difflib.html#differ-objects Shows a compare method, is that what you are referring to? Thanks, -- -Mike Hoy From report at bugs.python.org Sat Oct 6 20:13:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 18:13:27 +0000 Subject: [docs] [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349547207.02.0.733997402282.issue16149@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:56:29 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Oct 2012 18:56:29 +0000 Subject: [docs] [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1349549789.16.0.135304093157.issue16144@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:25:26 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sat, 06 Oct 2012 22:25:26 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library Message-ID: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> New submission from Ravi Sinha: - Doc/library/math.rst - fsum will pass if 'from math import fsum' is done before it, but I've left such issues for now since there seems to be a debate about how to go about that - some seem unfixable too - e.g. Doc/library/filecmp.rst - 'dir1' and 'dir2' do not exist, and so the print_diff_files() fails, but there seems to be no reason to fix this; the same for Doc/library/imghdr.rst - there is no /tmp/bass.gif, so it fails - some fail for inexplicable reasons - Doc/library/string.rst - the table of numbers does not match, though it is exactly the same. No idea why. ---------- assignee: docs at python components: Documentation files: doc_lib.patch keywords: patch messages: 172253 nosy: Ravi.Sinha, chris.jerdonek, docs at python, r.david.murray, terry.reedy priority: normal severity: normal status: open title: Some minor doc fixes in Doc/library type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27462/doc_lib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:29:12 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sat, 06 Oct 2012 22:29:12 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq Message-ID: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> New submission from Ravi Sinha: - help(fn) which in the REPL leads to a new pager/ display - seems to be difficult to test with doctest - it does not seem to pick the whitespace in the docs and does not match - Doc/faq/general.rst - os.path.isdir returns True or False, not 0 or 1 as in the docs, but I didn't know if I should change that - Doc/faq/windows.rst ---------- assignee: docs at python components: Documentation files: doc_faq.patch keywords: patch messages: 172254 nosy: Ravi.Sinha, chris.jerdonek, docs at python, r.david.murray, terry.reedy priority: normal severity: normal status: open title: Some minor doc fixes in Doc/faq type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27463/doc_faq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:27:52 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 07 Oct 2012 09:27:52 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349602072.64.0.122758758343.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Let's get this rolling again. First let's fix the docs for 3.2+ first. My current suggestion would be the following: ~~~ .. function:: makedirs(path, mode=0o777, exist_ok=False) .. index:: single: directory; creating single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes all intermediate-level directories needed to contain the leaf directory. The default *mode* is ``0o777`` (octal). On some systems, *mode* is ignored. Where it is used, the current umask value is first masked out. If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if the target directory already exists. If *exists_ok* is ``True`` an :exc:`OSError` is still raised if the umask-masked *mode* is different from the existing mode, on systems where the mode is used. :exc:`OSError` will also be raised if the directory creation fails. .. note:: :func:`makedirs` will become confused if the path elements to create include :data:`pardir` (eg. ".." on UNIX systems). This function handles UNC paths correctly. .. versionadded:: 3.2 The *exist_ok* parameter. ~~~ Opinions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:35:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 12:35:05 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349613305.25.0.309217074735.issue16155@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > it does not seem to pick the whitespace in the docs and does not match - Doc/faq/general.rst Can you provide a link to the line (or one of the lines) in question so it's easier to see what you are referring to? > os.path.isdir returns True or False, not 0 or 1 as in the docs I think there is a doctest directive to make 1 acceptable for True and vice versa, but it's generally better if the docs match what Python actually returns (for that version of Python). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:45:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 12:45:17 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349613917.62.0.574737011641.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > fsum will pass if 'from math import fsum' is done before it, but I've left such issues for now since there seems to be a debate about how to go about that For now, you can at least use the "testsetup" directive which will simultaneously allow the doctests to pass but cause the subsequent lines to be hidden in the rendered HTML. We can always remove the directive at a later date to cause it to display. See here for an example: http://bugs.python.org/review/15888/diff/6011/Doc/howto/ipaddress.rst > - some seem unfixable too Can you include links to the questionable areas for examples like these (e.g. using the "browse source" page http://hg.python.org/cpython/file/default/ )? This will make it easier to reference and discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:22:56 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:22:56 +0000 Subject: [docs] [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1349616176.1.0.313640589071.issue16082@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report. I'll take a look. Patches always welcome :) ---------- stage: -> patch review title: xml.etree.ElementTree.tostringlist does conform to it's documentation -> xml.etree.ElementTree.tostringlist does not conform to its documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:26:58 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:26:58 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349616418.55.0.714454424806.issue15888@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks, Chris. I'll take a look ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:24:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 14:24:32 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <3XZRmJ1DvszQlJ@mail.python.org> Roundup Robot added the comment: New changeset 81ad910d75a9 by Eli Bendersky in branch '3.3': Issue #15888: fixing problems in ipaddress doctests. Patch by Chris Jerdonek http://hg.python.org/cpython/rev/81ad910d75a9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:25:33 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 14:25:33 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349619932.99.0.369681171765.issue15888@psf.upfronthosting.co.za> Eli Bendersky added the comment: Pushed to 3.3 and 3.4 Thanks for the report and patch ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:32:33 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 15:32:33 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349623952.99.0.319669697624.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:54:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2012 16:54:12 +0000 Subject: [docs] [issue16157] Irrelevant references to Misc/News Message-ID: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Older versions (3.2 for 3.3, 3.2 and 3.3 for 3.4) whatsnew refers to Misc/News which contains changes only for currect version ("For full details, see the :source:`Misc/NEWS ` file."). http://docs.python.org/3.3/whatsnew/3.2.html http://docs.python.org/3.4/whatsnew/3.2.html http://docs.python.org/3.4/whatsnew/3.3.html ---------- assignee: docs at python components: Documentation messages: 172321 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: Irrelevant references to Misc/News type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:00:40 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 17:00:40 +0000 Subject: [docs] [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1349629240.52.0.00633688810599.issue16157@psf.upfronthosting.co.za> R. David Murray added the comment: The problem is that the source directive (from pyspecific in Sphinx) uses the 'current branch' for which the docs are being built. Probably we will have to hardcode the links rather than using the source directive. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:56:36 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 17:56:36 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349632596.68.0.753369284354.issue16155@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Doc corrections (can) go in all current docs. 1.2 - 1.0: same change "Hello" * 3: same change dir([]): shouldn't output be line-wrapped 3.3: same 3.2: delete __dir__, clear, copy, giving ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] 2.7: same deletions, add __delslice__, __getslice__, __setslice__, giving ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] # for 2.7, 3.2, delete clear, copy for >>> [d for d in dir([]) if '__' not in d] ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] Change Boolean 0,1 outputs to False,True. This was done in most places when behavior was changed after booleans were added in 2.2, or you would see many more errors. This holdover in the faq is an oversight. In 3.3 and before, help() does not lead to a new pager/display on Windows, so I am not sure what you mean. I presume you are referring to the following. >>> help(L.append) Help on built-in function append: append(...) L.append(object) -> None -- append object to end >>> The above from 3.3, and same before, has a blank line that is not in the faq, so add it. It otherwise looks the same to me. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:33:43 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 18:33:43 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349634823.63.0.424472829647.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I consider some items to be errors. In any case, all current docs can be fixed. First, your questions as to what you did not fix. fsum: I personally would add the import visibly, but at least add it hidden, as Chris suggested. 171 >>> from filecmp import dircmp 172 >>> def print_diff_files(dcmp): 173 ... for name in dcmp.diff_files: 174 ... print("diff_file %s found in %s and %s" % (name, dcmp.left, 175 ... dcmp.right)) 176 ... for sub_dcmp in dcmp.subdirs.values(): 177 ... print_diff_files(sub_dcmp) 178 ... 179 >>> dcmp = dircmp('dir1', 'dir2') 180 >>> print_diff_files(dcmp) (copying from the repository view deletes whitespace) The import and def should run and should be tested. The last 2 lines should not be tested: add #doctest: SKIP to both. (I gather that Sphinx will strip this.) >>> width = 5 >>> for num in range(5,12): ... for base in 'dXob': ... print('{0:{width}{base}}'.format(num, base=base, width=width), end=' ') ... print() ... 5 5 5 101 6 6 6 110 7 7 7 111 8 8 10 1000 9 9 11 1001 10 A 12 1010 11 B 13 1011 I believe the problem here is the "end = ''" part. It puts a blank space at the end of each line, which got deleted when I pasted the above, which was cut from my local repository. Trailing blanks are *really* a problem and code that produces them is not a good example. I suggest changing width to 6, end to '', and adding '' to the beginning of each output line. It should then pass. ---------- type: enhancement -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:44:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 18:44:50 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349635490.64.0.970394412651.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Trailing blanks are *really* a problem The NORMALIZE_WHITESPACE doctest directive is another option to deal with cases like these. It ignores whitespace-only differences between the actual and expected outputs. Does it pass with that directive? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:48:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 18:48:50 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349635730.07.0.230594142334.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Now your patch: colorsys: same change all versions fractions: ditto Template: ditto I believe the changes I suggested for filecmp and the numbers should also be the same in all versions. ACKS: your name should be inserted in alpha order ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:04:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:04:58 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349636698.63.0.884926974079.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I considered the directive, but I mildly prefer the code change. end = ' ') guarantees a blank between fields even if one formats a too-large number end = '') does not add a blank to the end. end = '' if base == 'b' else ' ') does both (but depends on having a 'last field' condition. I actual practice, I might use the third option. However, if you do the commit, it is your choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:07:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 19:07:50 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349636870.6.0.092134954974.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Any comments on the latest patch, in particular on the int() docstring? Especially you, Terry, as you created the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:10:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 19:10:36 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349637036.12.0.267200702039.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I considered the directive, but I mildly prefer the code change. I just wanted to point the directive out as an available option (especially for Ravi if he does further patches like this). Either way is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:19:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 19:19:24 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349637564.6.0.654177445689.issue14783@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:21:35 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:21:35 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349637695.33.0.0804582121446.issue14783@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked pretty carefully and it looks good to me. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:42:59 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:42:59 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349638979.42.0.976249277413.issue12947@psf.upfronthosting.co.za> Terry J. Reedy added the comment: http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives has the improved version. Thanks. Here, the complete example text is more important than the hi-lites. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:43:41 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:43:41 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349639021.79.0.226840986789.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Apparently, I should have suggested "# doctest: +SKIP". The #12947 fix to example directives being deleted from the directive examples came after the 3.3.0 release. Fixed examples are at http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:41:58 2012 From: report at bugs.python.org (Aditya Kedia) Date: Sun, 07 Oct 2012 21:41:58 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349646117.99.0.0989974999537.issue13498@psf.upfronthosting.co.za> Aditya Kedia added the comment: Right.. Looks good. ---------- nosy: +TheAdityaKedia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:05:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 22:05:29 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <3XZf090cGXzPFD@mail.python.org> Roundup Robot added the comment: New changeset e4598364ea29 by Chris Jerdonek in branch '3.2': Issue #14783: Improve int() docstring and also str(), range(), and slice(). http://hg.python.org/cpython/rev/e4598364ea29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:05:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 22:05:30 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3XZf0969BszPFD@mail.python.org> Roundup Robot added the comment: New changeset e4598364ea29 by Chris Jerdonek in branch '3.2': Issue #14783: Improve int() docstring and also str(), range(), and slice(). http://hg.python.org/cpython/rev/e4598364ea29 New changeset 365da47a6dc1 by Chris Jerdonek in branch '3.3': Issue #14783: Merge changes from 3.2. http://hg.python.org/cpython/rev/365da47a6dc1 New changeset 3773c98d9da8 by Chris Jerdonek in branch 'default': Issue #14783: Merge changes from 3.3. http://hg.python.org/cpython/rev/3773c98d9da8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:09:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 22:09:56 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349647796.51.0.34668579837.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Leaving open to backport applicable portions to 2.7. I should get to that later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:40:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2012 03:40:41 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3XZnQv0GnXzP6M@mail.python.org> Roundup Robot added the comment: New changeset 3b484f53f91b by Chris Jerdonek in branch '2.7': Issue #14783: Backport changes from 3.2. http://hg.python.org/cpython/rev/3b484f53f91b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:42:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 03:42:07 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349667727.83.0.346536589901.issue14783@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:25:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 Oct 2012 05:25:45 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349673945.77.0.254691099702.issue16155@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:48:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2012 05:48:39 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <3XZrGZ1JrWzPHq@mail.python.org> Roundup Robot added the comment: New changeset 88a7b9c3b6c0 by Hynek Schlawack in branch '3.2': #13498: Clarify docs of os.makedirs()'s exist_ok argument. http://hg.python.org/cpython/rev/88a7b9c3b6c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From list at qtrac.plus.com Mon Oct 8 09:03:40 2012 From: list at qtrac.plus.com (Mark Summerfield) Date: Mon, 8 Oct 2012 08:03:40 +0100 Subject: [docs] missing method In-Reply-To: References: Message-ID: <20121008080340.09c9b6b2@dino> > On 10/06/2012 12:08 AM, Mark Summerfield wrote: > > Hi, > > > > On page: > > http://docs.python.org/py3k/library/difflib.html#module-difflib > > > > class difflib.Differ > > > > has a compare() method: but it isn't shown. > > > > > http://docs.python.org/py3k/library/difflib.html#differ-objects > > Shows a compare method, is that what you are referring to? Yes. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/aqpbook.html From mike at saguaroscuba.com Mon Oct 8 09:52:16 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Mon, 08 Oct 2012 00:52:16 -0700 Subject: [docs] missing method In-Reply-To: <20121008080340.09c9b6b2@dino> References: <20121008080340.09c9b6b2@dino> Message-ID: <50728630.8050102@saguaroscuba.com> On 10/08/2012 12:03 AM, Mark Summerfield wrote: >> On 10/06/2012 12:08 AM, Mark Summerfield wrote: >>> Hi, >>> >>> On page: >>> http://docs.python.org/py3k/library/difflib.html#module-difflib >>> >>> class difflib.Differ >>> >>> has a compare() method: but it isn't shown. >>> >>> >> http://docs.python.org/py3k/library/difflib.html#differ-objects >> >> Shows a compare method, is that what you are referring to? > Yes. > Your original link is to difflib and that sections shows the methods for difflib. Then when we get to Differ it shows compare which is a method for Differ. Unless I am misunderstanding something I believe compare is shown in the correct location on the page. If compare was a method of difflib like this: differ.compare it should be shown at the location of difflib, but since it is under Differ it belongs under Differ. Please correct me if I am missing something here :) -- -Mike Hoy From report at bugs.python.org Mon Oct 8 11:20:22 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Oct 2012 09:20:22 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349688022.12.0.954761197777.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, I see the other examples Chris is talking about now. Yes, the workaround should be applied in those cases as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:47:33 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Oct 2012 12:47:33 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349700453.2.0.582652246971.issue16161@psf.upfronthosting.co.za> Christian Heimes added the comment: Meh, MS likes to invalidate or alter the meaning of an URL. Have you verified that vcsetup.exe is the right thing? I *guess* that vcsetup stands for "Visual C++ setup" and vcssetup for "Visual C Sharp Setup" but I'm not sure about it. ---------- assignee: -> docs at python nosy: +christian.heimes, docs at python versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From list at qtrac.plus.com Mon Oct 8 15:13:30 2012 From: list at qtrac.plus.com (Mark Summerfield) Date: Mon, 8 Oct 2012 14:13:30 +0100 Subject: [docs] Query re array 'u' type code Message-ID: <20121008141330.41bc123c@dino> Hi, According to http://docs.python.org/py3k/library/array.html#module-array The 'u' type code is deprecated and will be dropped in Python 4. However, no information is provided on what one should use instead when one wants to store an array of individual characters. I think that such information would be helpful. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/aqpbook.html From andrew.svetlov at gmail.com Mon Oct 8 15:26:20 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Mon, 8 Oct 2012 16:26:20 +0300 Subject: [docs] Query re array 'u' type code In-Reply-To: <20121008141330.41bc123c@dino> References: <20121008141330.41bc123c@dino> Message-ID: You shouldn't store characters in array because char is not 'physical matter' but some abstract one without specified byte representation. You should to store string encoded by some codec instead ? it makes things easier and well-defined. On Mon, Oct 8, 2012 at 4:13 PM, Mark Summerfield wrote: > Hi, > > According to > http://docs.python.org/py3k/library/array.html#module-array > > The 'u' type code is deprecated and will be dropped in Python 4. > > However, no information is provided on what one should use instead when > one wants to store an array of individual characters. I think that such > information would be helpful. > > -- > Mark Summerfield, Qtrac Ltd, www.qtrac.eu > C++, Python, Qt, PyQt - training and consultancy > "Advanced Qt Programming" - ISBN 0321635906 > http://www.qtrac.eu/aqpbook.html > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Thanks, Andrew Svetlov From list at qtrac.plus.com Mon Oct 8 16:41:44 2012 From: list at qtrac.plus.com (Mark Summerfield) Date: Mon, 8 Oct 2012 15:41:44 +0100 Subject: [docs] Query re array 'u' type code In-Reply-To: References: <20121008141330.41bc123c@dino> Message-ID: <20121008154144.0932fbda@dino> Hi Andrew, On Mon, 8 Oct 2012 16:26:20 +0300 Andrew Svetlov wrote: > You shouldn't store characters in array because char is not 'physical > matter' but some abstract one without specified byte representation. > You should to store string encoded by some codec instead ? it makes > things easier and well-defined. Yes, you're right. So, in the case of chars I guess one would store, say, s.encode("utf-32") into a 4 byte unsigned type. Of course, it is a pity that the array module doesn't actually support specifically sized types (like NumPy does). > On Mon, Oct 8, 2012 at 4:13 PM, Mark Summerfield > wrote: > > Hi, > > > > According to > > http://docs.python.org/py3k/library/array.html#module-array > > > > The 'u' type code is deprecated and will be dropped in Python 4. > > > > However, no information is provided on what one should use instead when > > one wants to store an array of individual characters. I think that such > > information would be helpful. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/aqpbook.html From andrew.svetlov at gmail.com Mon Oct 8 16:57:36 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Mon, 8 Oct 2012 17:57:36 +0300 Subject: [docs] Query re array 'u' type code In-Reply-To: <20121008154144.0932fbda@dino> References: <20121008141330.41bc123c@dino> <20121008154144.0932fbda@dino> Message-ID: I'm ok with utf-32 example. Mark, can you guess exact correction text as native English person? Or, better, would you make an issue with patch? On Mon, Oct 8, 2012 at 5:41 PM, Mark Summerfield wrote: > Hi Andrew, > > On Mon, 8 Oct 2012 16:26:20 +0300 > Andrew Svetlov wrote: >> You shouldn't store characters in array because char is not 'physical >> matter' but some abstract one without specified byte representation. >> You should to store string encoded by some codec instead ? it makes >> things easier and well-defined. > > Yes, you're right. So, in the case of chars I guess one would store, > say, s.encode("utf-32") into a 4 byte unsigned type. > > Of course, it is a pity that the array module doesn't actually support > specifically sized types (like NumPy does). > >> On Mon, Oct 8, 2012 at 4:13 PM, Mark Summerfield >> wrote: >> > Hi, >> > >> > According to >> > http://docs.python.org/py3k/library/array.html#module-array >> > >> > The 'u' type code is deprecated and will be dropped in Python 4. >> > >> > However, no information is provided on what one should use instead when >> > one wants to store an array of individual characters. I think that such >> > information would be helpful. > > -- > Mark Summerfield, Qtrac Ltd, www.qtrac.eu > C++, Python, Qt, PyQt - training and consultancy > "Advanced Qt Programming" - ISBN 0321635906 > http://www.qtrac.eu/aqpbook.html -- Thanks, Andrew Svetlov From report at bugs.python.org Mon Oct 8 17:40:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 15:40:45 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349710845.35.0.528332947611.issue16161@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Have you verified that vcsetup.exe is the right thing? I *guess* that vcsetup stands for "Visual C++ setup" and vcssetup for "Visual C Sharp Setup" but I'm not sure about it. Yes, after choosing wrong the first time (based partly on the ordering relative to the accompanying text). And yes, your guess is correct. Incidentally, it was also odd that the VS executable wasn't obvious to locate. After installing, only the "VS 2008 Remote Debugger" showed up in the Start menu. The VS executable I found only in "Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" and not in the "Microsoft Visual Studio 9.0\Microsoft Visual C++ 2008 Express Edition..." folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 20:30:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 18:30:41 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349721041.69.0.388355239413.issue16161@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Incidentally, it was also odd that the VS executable wasn't obvious to locate. Scratch this last comment. A "Visual C++ 2008 Express Edition" folder was created under the Start menu. It just wasn't highlighted as having been newly added, as was a separate "Visual Studio 2008" folder (which contained just the Remote Debugger application). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:49:05 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 00:49:05 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349743745.67.0.0280229290016.issue16161@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your tests, Chris. :) ---------- _______________________________________ Python tracker _______________________________________ From list at qtrac.plus.com Tue Oct 9 08:38:00 2012 From: list at qtrac.plus.com (Mark Summerfield) Date: Tue, 9 Oct 2012 07:38:00 +0100 Subject: [docs] Query re array 'u' type code In-Reply-To: References: <20121008141330.41bc123c@dino> <20121008154144.0932fbda@dino> Message-ID: <20121009073800.64c71f93@dino> On Mon, 8 Oct 2012 17:57:36 +0300 Andrew Svetlov wrote: > I'm ok with utf-32 example. > > Mark, can you guess exact correction text as native English person? > Or, better, would you make an issue with patch? [snip] Short: The best way to replace an array('u') is with a string. However, if the code being ported needs mutability, then one solution is to use an array('L') and convert strings to/from the array as needed. Long: The best way to replace an array('u') is with a string. However, if the code being ported needs mutability, then one solution is to use an array('L') and convert strings to/from the array as needed. Here are two helper functions that provide the conversions: def utf32_ints_for_str(s): '''Returns a list of UTF-32-BE ints suitable for an array('L')''' return [struct.unpack('I', c.encode('utf-32-be'))[0] for c in s] def str_for_utf32_ints(uints): '''Returns a str for a sequence of UTF-32-BE ints such as an array('L')''' return ''.join([struct.pack('I', uint).decode('utf-32-be') for uint in uints]) (Note that array uses 'L' for unsigned 32-bit ints, but struct uses 'I'.) Example: s = "More \u20acs!" uints = utf32_ints_for_str(s) a = array.array("L") a.extend(uints) t = str_for_utf32_ints(a) assert s == t -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/aqpbook.html From report at bugs.python.org Tue Oct 9 09:06:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:06:42 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <3XbTy93PZrzQtn@mail.python.org> Roundup Robot added the comment: New changeset 6f3e48838a2d by Chris Jerdonek in branch 'default': Issue #16161: Update link for downloading Microsoft Visual Studio 2008. http://hg.python.org/devguide/rev/6f3e48838a2d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:07:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:07:56 +0000 Subject: [docs] [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349766476.71.0.098256717344.issue16161@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:41:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:41:05 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <3XbVjr3LxZzQts@mail.python.org> Roundup Robot added the comment: New changeset a6f37d503878 by Senthil Kumaran in branch '3.2': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/a6f37d503878 New changeset a24d3e2124b6 by Senthil Kumaran in branch '3.3': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/a24d3e2124b6 New changeset 8f699eac0908 by Senthil Kumaran in branch 'default': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/8f699eac0908 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:55:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:55:19 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1349769319.55.0.650996250062.issue15922@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Senthil! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:03:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 08:03:52 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <3XbWD74yqxzQsm@mail.python.org> Roundup Robot added the comment: New changeset b2f282991973 by Senthil Kumaran in branch '2.7': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/b2f282991973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:04:42 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Oct 2012 08:04:42 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1349769882.85.0.263321132591.issue15922@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:23:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 08:23:55 +0000 Subject: [docs] [issue16171] "do nothing" load_tests could be improved Message-ID: <1349771035.38.0.947966701241.issue16171@psf.upfronthosting.co.za> New submission from Antoine Pitrou: unittest docs suggest the following "load_tests" for a __main__.py: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests This function fails with a weird error message when no pattern is given on the command line. A better alternative would be: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) pattern = pattern or "test_*.py" package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests ---------- assignee: docs at python components: Documentation messages: 172460 nosy: docs at python, ezio.melotti, michael.foord, pitrou priority: low severity: normal status: open title: "do nothing" load_tests could be improved versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:18:46 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 09 Oct 2012 09:18:46 +0000 Subject: [docs] [issue16171] "do nothing" load_tests could be improved In-Reply-To: <1349771035.38.0.947966701241.issue16171@psf.upfronthosting.co.za> Message-ID: <1349774326.62.0.384059551735.issue16171@psf.upfronthosting.co.za> Michael Foord added the comment: Yes the version of load_tests you show is better. However there is an outstanding issue to fix the load_tests protocol to work with pattern=None which is a better fix. (I think this is a bug in load_tests rather than a doc issue really.) Issue 11218. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> pattern=None when following documentation for load_tests and unittest.main() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:32:30 2012 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Oct 2012 10:32:30 +0000 Subject: [docs] [issue16174] Fix suggested usage of dummy_threading module Message-ID: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> New submission from Berker Peksag: The suggested usage should be like this: try: import threading except ImportError: import dummy_threading as threading See: - http://hg.python.org/cpython/file/ce0d0d052494/Lib/queue.py#l3 - http://hg.python.org/cpython/file/ce0d0d052494/Lib/sched.py#l34 - http://hg.python.org/cpython/file/ce0d0d052494/Lib/socketserver.py#l137 ---------- assignee: docs at python components: Documentation files: fix-dummy-threading-usage.diff keywords: patch messages: 172472 nosy: berker.peksag, docs at python priority: normal severity: normal status: open title: Fix suggested usage of dummy_threading module versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27505/fix-dummy-threading-usage.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:45:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 10:45:21 +0000 Subject: [docs] [issue16174] Fix suggested usage of dummy_threading module In-Reply-To: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> Message-ID: <3XbZpS1g9rzLwN@mail.python.org> Roundup Robot added the comment: New changeset 7de9c620716e by Andrew Svetlov in branch '3.2': Issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/7de9c620716e New changeset f02974773a71 by Andrew Svetlov in branch '3.3': Merge issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/f02974773a71 New changeset a93efd445982 by Andrew Svetlov in branch 'default': Merge issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/a93efd445982 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:46:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2012 10:46:09 +0000 Subject: [docs] [issue16174] Fix suggested usage of dummy_threading module In-Reply-To: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> Message-ID: <1349779569.59.0.17105471253.issue16174@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Berker. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:06:27 2012 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 09 Oct 2012 14:06:27 +0000 Subject: [docs] [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1349791587.16.0.271523639465.issue16082@psf.upfronthosting.co.za> Eli Bendersky added the comment: Einar, TypeError is raised because tostring/tostringlist return bytes with the default encoding, and you can't join bytes on "" (which is unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:19:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 14:19:21 +0000 Subject: [docs] [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <3XbgYN5JkyzR1J@mail.python.org> Roundup Robot added the comment: New changeset ff925e135e60 by Eli Bendersky in branch '3.3': Issue #16082: clarify the documentation of tostring[list] saying that it may generate a bytestring, depending on the given encoding. http://hg.python.org/cpython/rev/ff925e135e60 New changeset 6e407fcf7380 by Eli Bendersky in branch 'default': Merge 3.3 http://hg.python.org/cpython/rev/6e407fcf7380 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:21:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:21:23 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcHYG5jyvzQx0@mail.python.org> Roundup Robot added the comment: New changeset 00555659253d by Chris Jerdonek in branch '3.3': Issue #12947: Divide doctest "Option Flags and Directives" section into two. http://hg.python.org/cpython/rev/00555659253d New changeset 467c9f663b77 by Chris Jerdonek in branch 'default': Issue #12947: Merge doctest documentation improvements from 3.3. http://hg.python.org/cpython/rev/467c9f663b77 New changeset 15bfa778ec21 by Chris Jerdonek in branch '2.7': Issue #12947: Backport doctest documentation improvements from 3.3. http://hg.python.org/cpython/rev/15bfa778ec21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:28:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 14:28:40 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349879320.61.0.0526927186037.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Yes, the workaround should be applied in those cases as well. I added the workaround to the last remaining example. Nick was right before in that three of the four examples I mentioned above were in the part about "option flags" rather than in the part about "directives". I made those two parts into their own sections for added clarity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:50:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:50:44 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcJC80BDvzQsB@mail.python.org> Roundup Robot added the comment: New changeset 9057da41cf0b by Georg Brandl in branch '3.2': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/9057da41cf0b New changeset 1202c1449d83 by Georg Brandl in branch '3.3': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/1202c1449d83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:53:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:53:05 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcJFr3c0VzQsB@mail.python.org> Roundup Robot added the comment: New changeset ffe9f644d5af by Georg Brandl in branch '2.7': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/ffe9f644d5af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:01:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:01:44 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881304.27.0.837280089447.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Georg. Can this new directive be applied to individual code blocks though (or be modified to do so)? After a closer review (as mentioned in my comment above), it seems that the doctest directives should only be displayed in the code snippets that are illustrating the use of doctest directives (as opposed to, say, the snippets that are illustrating doctest options without using directives). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:03:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 15:03:09 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881389.75.0.573723479263.issue12947@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't see any blocks in doctest.rst where the directives should be stripped, so it's enough to do it per-file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:07:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:07:48 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881668.68.0.369106241235.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Like these that discuss the behavior of the doctest.IGNORE_EXCEPTION_DETAIL option (but before doctest directives have been introduced): http://hg.python.org/cpython/file/0d6910bef979/Doc/library/doctest.rst#l543 The key is that you can have options take effect without using directives, so it would be good if people can see examples like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:20:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:20:25 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349882425.0.0.243701916694.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Georg suggested removing the doctest directives from the examples I mentioned. As currently written, they don't help them pass if doctest were run on the .rst file. That sounds fine to me for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:40:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 15:40:16 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcKJH6fHczPB8@mail.python.org> Roundup Robot added the comment: New changeset 705a70b0fff4 by Chris Jerdonek in branch '3.3': Issue #12947: Remove doctest directives from the doctest examples in the "Option Flag" section. http://hg.python.org/cpython/rev/705a70b0fff4 New changeset 9475fc82768e by Chris Jerdonek in branch 'default': Issue #12947: Merge doctest documentation change from 3.3. http://hg.python.org/cpython/rev/9475fc82768e New changeset 8704f9e7ad7c by Chris Jerdonek in branch '2.7': Issue #12947: Backport doctest documentation change from 3.3. http://hg.python.org/cpython/rev/8704f9e7ad7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 18:13:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Oct 2012 16:13:10 +0000 Subject: [docs] [issue16190] Misleading warning in random module docs Message-ID: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> New submission from Christian Heimes: The documentation [1] of the random module contains a misleading warning --- Warning: The generators of the random module should not be used for security purposes. Use ssl.RAND_bytes() if you require a cryptographically secure pseudorandom number generator. --- The warning should point users to os.urandom() and random.SystemRandom rather than ssl.RAND_bytes(). On Linux os.urandom() wraps /dev/urandom [2], on Windows it uses CryptGenRandom() [3]. Both are suitable for most cryptographic purposes except for long-lived keys (SSL, SSH, GPG certs etc.). ssl.RAND_bytes() should only be used for such long-lived data and not for salts, session ids and similar. I like to see the warning box in Python 2.7, too. It's still the default for docs.python.org. My inquiry is motivated by #16184. [1] http://docs.python.org/py3k/library/random.html [2] http://linux.die.net/man/4/urandom [3] http://msdn.microsoft.com/en-us/library/windows/desktop/aa379942%28v=vs.85%29.aspx ---------- assignee: docs at python messages: 172589 nosy: christian.heimes, docs at python priority: normal severity: normal status: open title: Misleading warning in random module docs type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 18:22:35 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 16:22:35 +0000 Subject: [docs] [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349886155.42.0.938610052374.issue16190@psf.upfronthosting.co.za> Georg Brandl added the comment: Sure, I'd propose a rewording that mentions both alternatives and when they should be used. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 21:31:11 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Oct 2012 19:31:11 +0000 Subject: [docs] [issue15233] atexit: guarantee order of execution of registered functions? In-Reply-To: <1341129521.95.0.805489135584.issue15233@psf.upfronthosting.co.za> Message-ID: <1349897471.54.0.21994878835.issue15233@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Ping. Like Raymond, I think there's no reason to leave ambiguity in 2.7 and 3.2, so this doc patch is probably worth backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 04:15:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 02:15:17 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349921717.24.0.719046806407.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This seems to look good now. Can this be closed, or is there something else that needed to be done as well? ---------- resolution: -> fixed stage: needs patch -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 06:27:19 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Oct 2012 04:27:19 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349929639.06.0.333522225803.issue12947@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I looked at http://docs.python.org/py3k/library/doctest.html#directives and the examples with directives looked fine to me, with directive, syntax markup, and 'hide prompt' box. I also checked the next section and saw the one example that needed to have the directive visible. Really nice. ---------- stage: commit review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 10:05:33 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Oct 2012 08:05:33 +0000 Subject: [docs] [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349942733.72.0.331124994957.issue16190@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger components: +Documentation nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 13:10:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 11:10:27 +0000 Subject: [docs] [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349953827.8.0.840174059457.issue16190@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, haypo stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 14:07:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 12:07:37 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349957257.47.0.538670116693.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: If they don't work I see no reasons to leave them there. Either there's another way to run those tests on selected platforms that can be used instead, of if there's no way the tests should just be skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 14:19:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2012 12:19:48 +0000 Subject: [docs] [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349957988.87.0.537299220433.issue16190@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #15213 (and the issue #12754). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:10:21 2012 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 11 Oct 2012 13:10:21 +0000 Subject: [docs] [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types Message-ID: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone: There appears to be very little, if any, documentation about how to handle the list at tp_weaklistoffset for types supporting being weak referenced, particularly with respect to garbage collection. Who owns the list? Who owns the objects in the list? Should the list be traversed by the extension type's tp_traverse? Should it ever be INCREF'd or DECREF'd? Does tp_dealloc have any responsibilities with respect to it? >From looking at CPython's own source, it appears that tp_traverse should not touch it (Yhg1s confirmed this on #python). Cython, at least, appears to have come to an alternate conclusion though - it generates tp_traverse functions which visit the list (and provoke gc assertions to fail on Python 2.7 in debug mode). Some documentation about what is correct to do would be excellent, and would make it easier to explain to Cython developers what they're doing wrong (or confirm that they're doing something right, in which case there are some more bugs to file against the CPython stdlib, since they do something different from Cython). ---------- assignee: docs at python components: Documentation messages: 172639 nosy: docs at python, exarkun priority: normal severity: normal status: open title: Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:19:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 13:19:07 +0000 Subject: [docs] [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1349961547.69.0.394703376015.issue16195@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:22:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 13:22:12 +0000 Subject: [docs] [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1349961732.79.0.199601398549.issue16195@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think Cython is wrong here. The only thing to do is to call PyObject_ClearWeakRefs() in the deallocator. Everything else is handled by the interpreter. Agreed improving the documentation would be good. ---------- nosy: +pitrou, scoder stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:29:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 13:29:01 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349962140.31.0.31039727941.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch fixes the doctests in Doc/library/ctypes.rst. ---------- stage: -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27529/issue15939-ctypes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 17:21:38 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 15:21:38 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349968898.52.0.212043320273.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually a documentation bug. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 17:32:19 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 15:32:19 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349969539.86.0.83060749889.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: While I understand that this behavior went unnoticed for ages and can be seen therefore as unimportant, designating this as documentation bug is quite absurd; perhaps the following wording would be appropriate: .. note:: If this function is called multiple times on the same file (in terms of inode; symlink pointing to same file is fine), it will return the module which was first imported via `load_dynamic` instead of the requested module, without reporting any error. The previous call to `load_dynamic` may not be in the same part of the code, but it must happen within the same interpreter instance. ---------- components: +Library (Lib) -Documentation nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:11:10 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 16:11:10 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349971870.02.0.325589851221.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: Before this gets out of control I want to clarify that it is not "quite absurd" to label this a documentation bug and that is the proper classification for this bug. The documentation was not clear enough for you to understand what the behavior would be, so it should be clarified. But the semantics of the function are not going to change at this point since Python 2.7 is only accepting bug fixes and imp.load_dynamic() is no longer documented as of Python 3.2 and thus not strictly considered a public API any longer. ---------- components: +Documentation -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:12:11 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 16:12:11 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation Message-ID: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> New submission from Zachary Ware: There are several small inconsistencies in the winreg module documentation (docstrings and winreg.rst). Mostly these are discrepancies between "res" and "reserved", "sam" and "access", and whether or not those two are keyword arguments, but there are some other missing pieces as well. I'm happy to provide a patch to correct everything, but I'd like a little guidance beforehand. I have no experience with docstrings in C code, so I've attached a patch that attempts to correct just the CreateKeyEx() docstring. If it turns out to be ok, I'll go ahead and create a patch fixing the other ones. I'm comfortable enough with ReST changes that I'll just include those with the final docstring patch. Also, some of the changes are specific to 3.3+ (due to the WindowsError => OSError change). Should I provide one patch against default, two against 3.2 and 3.3 (including the 3.2 changes), or two against 3.2 and 3.3 (after a local commit of the 3.2 changes)? Any of the above is perfectly doable :) Thanks, Zach ---------- assignee: docs at python components: Documentation files: winreg_example.patch keywords: patch messages: 172655 nosy: brian.curtin, docs at python, stutzbach, zach.ware priority: normal severity: normal status: open title: Several small errors in winreg documentation versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27532/winreg_example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:19:25 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 16:19:25 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349972365.0.0.724486561534.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I found the cause of the behavior (perhaps it is common knowledge, but I am new to python source); imp.load_dynamic calls the following functions Python/import.c: imp_load_dynamic (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l1777) Python/importdl.c: _PyImport_LoadDynamicModule (http://hg.python.org/cpython/file/ad51ed93377c/Python/importdl.c#l23) Python/import.c: _PyImport_FindExtensionObject (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l525) where the last one uses the extensions object (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l32), which is explained at http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l449 Magic for extension modules (built-in as well as dynamically loaded). To prevent initializing an extension module more than once, we keep a static dictionary 'extensions' keyed by module name (for built-in modules) or by filename (for dynamically loaded modules), containing these modules. A copy of the module's dictionary is stored by calling _PyImport_FixupExtensionObject() immediately after the module initialization function succeeds. A copy can be retrieved from there by calling _PyImport_FindExtensionObject(). The fact that extensions are keyed by file name explains why opening the .so through symlink does not return the old extension object: # foo.so # bar.so -> foo.so (works for both symlinks and hardlinks) imp.load_dynamic("foo","foo.so") imp.load_dynamic("bar","bar.so") # will return the bar module I will investigate whether marking the module as capable of multiple initialization could be a workaround for the issue -- since the quoted comment further says (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l459): Modules which do support multiple initialization set their m_size field to a non-negative number (indicating the size of the module-specific state). They are still recorded in the extensions dictionary, to avoid loading shared libraries twice. To fix the issue, I suggest that the *extensions* dict is keyed by (filename,modulename) tuple for dynamically loaded modules. This would avoid any ambiguity. Grepping through the code shows that the *extensions* object is only accessed from Python/import.c, therefore regressions should be unlikely. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:21:15 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 11 Oct 2012 16:21:15 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349972475.77.0.647617318457.issue16197@psf.upfronthosting.co.za> Brian Curtin added the comment: The patch looks alright, but I would remove the lining up of definitions. It's probably easiest to do a patch against 3.2 and I can handle the porting on commit. ---------- assignee: docs at python -> brian.curtin components: +Windows type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:27:40 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 16:27:40 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349972860.06.0.0208867888022.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I did not notice it was not documented in python 3.3 anymore -- my fault, sorry. In case there is no functional replacement for it, I will try to raise it on the ML. I am currently writing some code in 2.7 which relies on it (I don't see another way of packing multiple compiled modules into one file without using symlinks, which won't work under windows; it saves me lots of trouble with cross-module symbol dependencies and such, avoids RTLD_GLOBAL, rpath and such nasty stuff), and don't want to throw it away with future migration to 3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:38:01 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 16:38:01 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349973481.88.0.293175500274.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Okie doke. I'll try to have a patch ready for review later this afternoon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:45:48 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 16:45:48 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1349973947.94.0.77174378629.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: The new functional equivalent is importlib.machinery.ExtensionFileLoader (http://docs.python.org/dev/py3k/library/importlib.html#importlib.machinery.ExtensionFileLoader), but underneath the hood it uses the same code as imp.load_dynamic() did. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 18:59:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 16:59:24 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349974764.27.0.665249693198.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Either there's another way to run those tests on selected platforms that can be used instead A way to do it could be to register new doctest directives that skip the marked test based on the value of sys.platform. If we remove the directives, we lose that information and won't be able to do it anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 19:56:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 17:56:27 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349978186.97.0.324345966472.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: > A way to do it could be to register new doctest directives that skip > the marked test based on the value of sys.platform. That can be done for 3.4+ only though. > If we remove the directives, we lose that information and won't > be able to do it anymore. It actually seems quite easy to distinguish them. At the beginning 'libc' is created either using cdll.msvcrt (on windows) or CDLL("libc.so.6") (on Linux). There are examples that use windll and other Windows- or Linux-specific functions later on but it's usually quite evident. If we get lost we can always dig in the history or just run the tests and see where they fail. FTR there were a few actual errors that I fixed (mostly about bytes vs string). I also removed unnecessary prints and added a few doctest directives to make some of the tests pass. 'from ctypes import *' is used quite frequently, and it would be better to change it, but I left it unchanged for now. I also removed an obsolete warning about the doctest directives in the example because Sphinx hides them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 20:25:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 18:25:24 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349979924.64.0.709879208677.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > FTR there were a few actual errors that I fixed (mostly about bytes vs string). Great! Note that for the others, I was just trying to make the files parseable rather than passing. Currently, doctest aborts out on the files I fixed without even attempting to run the examples. > That can be done for 3.4+ only though. Well, yes and no. If there is a helper script to check documentation, it could be run on any branch regardless of whether the script is in source control. For example, I was planning to write such a script (from the regrtest patch I put together before) to help me when checking people's patches to code snippets in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 20:41:58 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 18:41:58 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349980918.31.0.267051539306.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the patch against 3.2, hopefully I caught everything I meant to :) Unfortunately, I can't build Python or the docs on this machine, so I can't guarantee I didn't break anything. I tried to be careful though, especially with changing linebreaks in the docstrings. The changes for 3.3+ that don't apply to 3.2 are: - in PC\winreg.c - Change all occurrences of "a WindowsError" to "an OSError" - in Doc\library\winreg.rst - Change "a" to "an" in all occurrences of "a :exc:`OSError`" - Consolidate all the ..versionchanged:: 3.3 notes into one at the top (like in Doc\library\msvcrt.rst) Also, I did make a couple of non-cosmetic informational changes other than on 'res' and 'sam', such as listing the correct default 'access' parameter on a couple of functions (judging by my reading of said functions). Thanks, Zach ---------- Added file: http://bugs.python.org/file27534/winreg_3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 20:51:50 2012 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Oct 2012 18:51:50 +0000 Subject: [docs] [issue16199] 2to3 very minor doc change Message-ID: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> New submission from Mark Lawrence: http://docs.python.org/library/2to3.html#using-2to3 second paragraph second sentence reads "The directories are to recursively traversed for Python sources." The "to" is not needed. ---------- assignee: docs at python components: Documentation messages: 172673 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: 2to3 very minor doc change type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 00:55:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 22:55:57 +0000 Subject: [docs] [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <1349996157.27.0.498301797995.issue16199@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 01:16:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 23:16:46 +0000 Subject: [docs] [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <3Xd7NZ09PxzR2b@mail.python.org> Roundup Robot added the comment: New changeset c7f11e450c31 by Chris Jerdonek in branch '3.2': Issue #16199: Fix typo in 2to3 docs. Thanks to Mark Lawrence for the report. http://hg.python.org/cpython/rev/c7f11e450c31 New changeset d83dfa6a381a by Chris Jerdonek in branch '3.3': Issue #16199: Merge 2to3 typo fix from 3.2. http://hg.python.org/cpython/rev/d83dfa6a381a New changeset 880e62fa7770 by Chris Jerdonek in branch 'default': Issue #16199: Merge 2to3 typo fix from 3.3 (and resolve previous merge). http://hg.python.org/cpython/rev/880e62fa7770 New changeset c0a2294de787 by Chris Jerdonek in branch '2.7': Issue #16199: Backport 2to3 typo fix from 3.2. http://hg.python.org/cpython/rev/c0a2294de787 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 01:18:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 23:18:38 +0000 Subject: [docs] [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <1349997517.94.0.88934760189.issue16199@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Fixed. Thanks for the report, Mark! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:15:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 02:15:26 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section Message-ID: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> New submission from Chris Jerdonek: 3.3 added a dedicated section to the docs for the str type. However, references to :class:`str` still link to the documentation of the built-in function str(). This issue is to update references to the str class to point to the new section on the str type. We could use :ref:`str `, but it would be nice to have a solution that makes "str" have the code-style font instead of italics. ---------- assignee: docs at python components: Documentation messages: 172713 nosy: chris.jerdonek, docs at python, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: update :class:`str` references to link to the str type section type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:59:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 02:59:19 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1350010759.94.0.554431434869.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I'm not sure if Sphinx would allow it, but it would be nice if references to the function str() could link to the built-in function documentation, and references to the class str could link to the section on the str type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:17:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 03:17:48 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350011868.73.0.696776679024.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This may have been addressed to some extent by issue 14783: http://hg.python.org/cpython/rev/3773c98d9da8 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:19:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 03:19:45 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1350011985.34.0.176502802281.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The documentation seems to take a similar approach with dict: http://docs.python.org/dev/library/stdtypes.html#dict http://docs.python.org/dev/library/functions.html#func-dict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:09:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:09:34 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures Message-ID: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The documentation for dict() (for both the built-in function and the class constructor) should display multiple signatures as do dict.__doc__ and the documentation for, say, str(). Currently, the dict() documentation just has one signature: dict([arg]) Something more in line with the docstring would be better, for example: dict(mapping={}) dict(iterable) dict(**kwargs) ---------- assignee: docs at python components: Documentation keywords: easy messages: 172718 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: dict() docs should display multiple signatures versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:22:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:22:47 +0000 Subject: [docs] [issue16207] add class name to method signatures in stdtypes docs Message-ID: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The method signatures for some of the classes documented in library/stdtypes lack the class name. For example, the list, dict, set, and memoryview methods lack the class name. Adding the class name will help to distinguish methods from functions. ---------- assignee: docs at python components: Documentation messages: 172720 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: add class name to method signatures in stdtypes docs type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:39:52 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Oct 2012 07:39:52 +0000 Subject: [docs] [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350027591.97.0.688887214655.issue16207@psf.upfronthosting.co.za> Georg Brandl added the comment: This is by design: these method descriptions are indented under their class entries; no need to repeat the class name. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:46:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:46:07 +0000 Subject: [docs] [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350027967.08.0.495197354261.issue16207@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I think I would be more okay with this if it weren't for the fact that some functions also appear indented under their class entries (making them look like methods). Right now, there's no visual distinction between the functions and the methods. Prefixing the methods with the class name or moving the functions above the class definition would address this. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:47:25 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Oct 2012 07:47:25 +0000 Subject: [docs] [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350028045.17.0.962959205835.issue16207@psf.upfronthosting.co.za> Georg Brandl added the comment: > I think I would be more okay with this if it weren't for the fact that > some functions also appear indented under their class entries (making > them look like methods). I see, yes. In this case I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:37:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 08:37:38 +0000 Subject: [docs] [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350031058.29.0.511166408426.issue16207@psf.upfronthosting.co.za> Chris Jerdonek added the comment: So it looks like the class name gets stripped when rendering if you prefix the method name with the class name and the methods are nested beneath the class. So it seems like the options are to either (1) move the non-methods outside the class (e.g. before the class), or (2) clearly divide the methods and non-methods into two groups (e.g. "These are the operations..." and "These are the methods..."). I lean towards the latter. And it would be a smaller change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:03:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:03:17 +0000 Subject: [docs] [issue16209] add a "class str" entry to the docs Message-ID: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add a str class entry to the built-in types page like we have for dict, set, memoryview, etc: http://docs.python.org/dev/library/stdtypes.html This will let us reference ``str`` the class separately from ``str()`` the built-in function. It will also let us remove the "str." prefix from all of the string method descriptions. Thirdly, it will make the str documentation match what is being done for the types previous to it in the documentation, including the range, tuple, and list classes. Lastly, it will make referencing string-related sections in Sphinx a bit more intuitive. Currently, :class:`str` points to the built-in function :func:`str`. ---------- assignee: docs at python components: Documentation messages: 172733 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: add a "class str" entry to the docs type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:05:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:05:36 +0000 Subject: [docs] [issue16207] distinguish methods from non-methods in classes in the stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350032736.97.0.320075508351.issue16207@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: add class name to method signatures in stdtypes docs -> distinguish methods from non-methods in classes in the stdtypes docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:12:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:12:19 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs Message-ID: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> New submission from Chris Jerdonek: [Found by Ezio] The built-in function documentation has what looks like two separate definitions of the built-in function type(): http://docs.python.org/dev/library/functions.html#type These two definitions should be combined into one with a multi-line signature like we're doing for the other built-in functions. ---------- assignee: docs at python components: Documentation messages: 172734 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: combine the two type() definitions in built-in function docs versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:19:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 09:19:27 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350033567.72.0.740130936797.issue16210@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:52:50 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 12 Oct 2012 10:52:50 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1350039170.36.0.947638013741.issue11009@psf.upfronthosting.co.za> Vinay Sajip added the comment: Note that at least splituser is being used outside the stdlib: packaging (which was intended to be part of the stdlib) used it, and hence so do distutils2 and distlib (by sharing parts of their codebases). Of course these last two are outside the stdlib. Similar functions are reimplemented outside the stdlib (e.g. see parse_credentials in pip.download). If the only reason for not exposing these is documentation clutter, surely there are approaches to minimise this. If the reason is that future implementations may change or remove them, that should be clarified. But since the basics of an url are unlikely to change, I don't see why these functions might be removed in the future. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:40:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 11:40:14 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1350042014.1.0.846621692995.issue16205@psf.upfronthosting.co.za> Ezio Melotti added the comment: If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. We might than need to update a few links to use :class: instead of :func:, and possibly use :ref:`textseq` where appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:44:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 11:44:12 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1350042252.88.0.391568533016.issue16205@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding a class directive for str is tracked in #16209. ---------- dependencies: +add a "class str" entry to the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:46:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 11:46:25 +0000 Subject: [docs] [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1350042385.17.0.86255666441.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. I agree. I would suggest starting small by adding a stub class entry above the string methods. The class constructor could link to the built-in function str() for its definition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 19:56:12 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 12 Oct 2012 17:56:12 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350064572.73.0.399762794759.issue15936@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 20:12:30 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 12 Oct 2012 18:12:30 +0000 Subject: [docs] [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1350065550.05.0.215937250705.issue15472@psf.upfronthosting.co.za> Petri Lehtinen added the comment: cycle() doesn't use seq, but p (p0, p1, ...). Others use seq (seq[0], seq[1], ...). How do you think these should be changed? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 21:49:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 19:49:54 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <1350071394.79.0.37568641282.issue16206@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27546/issue-16206-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 22:33:16 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2012 20:33:16 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350073995.97.0.688286768404.issue16210@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In other words, change ''' type(object) Return the type of an object. ... ... With three arguments, type() functions as a constructor as detailed below. type(name, bases, dict) Return a new type object.... ''' to something like ''' type(object) type(name, bases, dict) With one argument, return the type of an object. ... With three arguments, return a new type object. ... ''' Now that we are using double headers elsewhere, I agree we should do so here also. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 06:12:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Oct 2012 04:12:32 +0000 Subject: [docs] [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1350101552.81.0.267098300452.issue16209@psf.upfronthosting.co.za> ?ric Araujo added the comment: This sort of request came up before, the last time only a few months ago if memory serves. The shot answer is that str is a built-in function as well as a class, and trying to split hairs over that does not really add value to the docs. I can dig up the issue(s) if you don't find them. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 07:36:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 05:36:22 +0000 Subject: [docs] [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1350106582.28.0.135756693633.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Let me start over with what I'm suggesting, because the idea wasn't fully developed when I first filed this issue. I'm thinking that we should create a class entry for str that contains the current string methods nested beneath it -- a bit like issue 12901. :) In conjunction with that, we should move the documentation of the str() function to the constructor for that class entry. All str links throughout the documentation would go to the class entry, and the built-in function str() would be a stub entry that also links to the class entry. That's how we do it for dict, for example: http://docs.python.org/dev/library/functions.html#func-dict One reason is practical. By doing the above, clicking "str" anywhere in the docs will take you to the documentation for both the function str() and the string methods. When I was first learning Python, it was very common for me to look up the "String Methods" section. But looking them up never seemed as convenient as it should be because they were in a different location. I always had to remember they were an extra click or two away in a separate "String Methods" section. In 3.3 we made a bit of progress on this by giving the string type its own section: http://docs.python.org/dev/library/stdtypes.html#text-sequence-type-str But we could go further by doing what we do for list, tuple, set, memoryview, range, etc. and put the documentation of the str() function and its methods next to each other in the same location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:11:10 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 13 Oct 2012 10:11:10 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350123070.24.0.446002892865.issue15936@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:30:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Oct 2012 10:30:35 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xf2HZ31NvzPLh@mail.python.org> Roundup Robot added the comment: New changeset ed6da2a8361c by Chris Jerdonek in branch '3.2': Issue #16206: Improve the documentation of the dict constructor. http://hg.python.org/cpython/rev/ed6da2a8361c New changeset 02de13d69149 by Chris Jerdonek in branch '3.3': Issue #16206: Merge dict documentation improvements from 3.2. http://hg.python.org/cpython/rev/02de13d69149 New changeset 392e09ba9feb by Chris Jerdonek in branch 'default': Issue #16206: Merge dict documentation improvements from 3.3. http://hg.python.org/cpython/rev/392e09ba9feb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:50:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Oct 2012 10:50:21 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xf2kP2MzHzPQr@mail.python.org> Roundup Robot added the comment: New changeset 5fc6f47974db by Chris Jerdonek in branch '2.7': Issue #16206: Backport dict documentation improvements from 3.2. http://hg.python.org/cpython/rev/5fc6f47974db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:51:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 10:51:31 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <1350125491.07.0.785442513167.issue16206@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 23:14:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 21:14:30 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350162870.07.0.781695358294.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a proposed patch along the lines suggested by ?ric. ---------- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file27556/issue-13538-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 00:57:46 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 22:57:46 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350169066.26.0.565840178359.issue15936@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:01:15 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 14 Oct 2012 05:01:15 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350190874.91.0.735414666441.issue15936@psf.upfronthosting.co.za> Ramchandra Apte added the comment: It should also mention that os.urandom is a low-level interface. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:36:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 07:36:47 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350200206.95.0.394300478856.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I have worked with languages where you are explicitly warned that you must not mess with the loop variable There is a warning in this part of the tutorial: "It is not safe to modify the sequence being iterated over in the loop..." (from http://docs.python.org/dev/tutorial/controlflow.html#for-statements ) But it may be good to add a note to the section you reference as well. ---------- assignee: -> docs at python components: +Documentation nosy: +chris.jerdonek, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 11:06:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 09:06:26 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350205585.98.0.940836585732.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attached is a simple way of addressing this (essentially copying the verbiage and example from the other page). If we want, we could make the sample code different so that the reader doesn't see the same thing twice. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27562/issue-16225-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 11:30:04 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 09:30:04 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading Message-ID: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> New submission from Mark Lawrence: For http://docs.python.org/howto/unicode.html (that's Python 2.7.3) and http://docs.python.org/release/3.1.5/howto/unicode.html the first paragraph states "(This HOWTO has not yet been updated to cover the 3.x versions of Python.)". I suggest this is changed to read something like "Release 1.12 onwards of this document covers the 3.2 Python versions onwards." ---------- assignee: docs at python components: Documentation messages: 172865 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Change unicode howtos as misleading type: enhancement versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:19:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 10:19:19 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350209959.44.0.472822846325.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I wonder why the note must be there at all. None of the 2.x docs have been updated to cover the 3.x versions of Python. Otherwise, every 2.x page could use such a disclaimer. Here is where the note was added: http://hg.python.org/cpython/rev/bdef454f7212 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:54:09 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 10:54:09 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350212049.1.0.608955432214.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'd happily settle on seeing this historical note removed from the 2.7.3 docs. I'm unsure about the best approach for 3.1.5. Who's done the most work on unicode to answer this one, someone working on #16061 possibly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 13:24:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 11:24:05 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350213845.32.0.702999618177.issue16225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is safe to modify a sequence during iteration if it's size not increased. >>> words = ['cat', 'window', 'defenestrate'] >>> for i, w in enumerate(words): ... if len(w) > 6: ... words[i] = w[:5] + '?' ... >>> words ['cat', 'window', 'defen?'] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 15:56:00 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 13:56:00 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350222960.53.0.707294448734.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think there is a need to update the 3.1.x version of the documentation in that respect. ---------- nosy: +loewis versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 16:02:56 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 14:02:56 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350223376.11.0.282859149235.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Before the disclaimer can be removed, all statements of the document should be reviewed. From a shallow glance, the section on "Python 2.x's support" should be changed to "Python's support". The reference to Marc-Andre Lemburg's presentation should be removed, as it's not current anymore. The 2.7 version of the document is fine as it stands; it indeed doesn't talk about 3.x. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 16:06:53 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 14:06:53 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350223613.9.0.202591585562.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: See also #4153 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 16:19:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Oct 2012 14:19:00 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350224340.9.0.443143154937.issue16227@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Unicode nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 20:14:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:14:31 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350238470.95.0.657575374419.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It is safe to modify a sequence during iteration if it's size not increased. What do you mean by "safe"? The example given by the original commenter does not increase the size either. I believe "safe" is meant in the sense of avoiding possibly unexpected behavior. I can clarify the language if you feel it is ambiguous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 20:29:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:29:58 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350239398.42.0.479427382226.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I don't think there is a need to update the 3.1.x version of the documentation in that respect. > versions: +Python 3.3, Python 3.4 -Python 3.1 This issue was just about the 2.7 version. 3.x doesn't contain the language mentioned by the original commenter. If 2.7 should not be changed, this issue should be closed. Or are you suggesting other updates to the 3.x docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 20:31:14 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Oct 2012 18:31:14 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350239474.17.0.0581517384868.issue16225@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, I guess Serhiy meant "neither increase nor decrease". In the end, the exact behavior will never be clear if you don't state explicitly how it's implemented: a counter that starts at 0 and is increased on __next__ until it's equal to len(list) (as checked at every iteration step). But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 20:34:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:34:13 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350239652.97.0.941771358879.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > 3.x doesn't contain the language mentioned by the original commenter. 3.2 onwards I mean. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 20:54:59 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 18:54:59 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350240899.23.0.0775990660498.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ah, I missed that. I'm skeptical that the proposed change is an improvement - how would the reader know how to find version 1.12 of the document? I'm also skeptical that removal of the note in 2.7 is useful: people finding the document in Google would misunderstand. My proposal: "This version of the document talks about Unicode support in Python 2.x. See for the Python 3 version." ---------- versions: +Python 2.7 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 21:38:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 19:38:42 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350243522.79.0.0905439715454.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. I would expand this to cover changing the list in any way. I think the point being made is that iteration doesn't implicitly make a copy. There are cases where modifying the list in place can also yield unexpected results. For example (naive list reversal): >>> words = ['cat', 'window', 'defenestrate'] >>> for i, word in enumerate(words): ... words[-i-1] = word ... >>> words ['cat', 'window', 'cat'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 21:48:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 19:48:37 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350244116.97.0.806546425928.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: That proposal sounds fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:12:50 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 20:12:50 +0000 Subject: [docs] [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350245570.66.0.174788592425.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: The mvl proposal fine by me too, thanks guys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:31:19 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:31:19 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350246679.62.0.188159309332.issue16227@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +eric.araujo stage: -> needs patch title: Change unicode howtos as misleading -> Add link to 3.3 version in unicode howto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:35:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:35:05 +0000 Subject: [docs] [issue16229] File *redemo.py* lacking in recent Python distributions but still referenced In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350246905.01.0.699103214009.issue16229@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python components: +Documentation -Demos and Tools keywords: +easy nosy: +docs at python stage: -> needs patch title: Module *redemo.py* lacking in recent Python distributions -> File *redemo.py* lacking in recent Python distributions but still referenced versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:36:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:36:40 +0000 Subject: [docs] [issue16229] File *redemo.py* lacking in recent Python distributions In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350247000.78.0.682990177006.issue16229@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hm Tools/demo is actually the correct location in 3.2+. ---------- nosy: +eric.araujo stage: needs patch -> title: File *redemo.py* lacking in recent Python distributions but still referenced -> File *redemo.py* lacking in recent Python distributions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:38:56 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Oct 2012 20:38:56 +0000 Subject: [docs] [issue16229] File *redemo.py* lacking in recent Python distributions In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350247136.6.0.909224059076.issue16229@psf.upfronthosting.co.za> Ned Deily added the comment: I don't think this is a documentation issue. I think it's more likely a Windows installer issue since I don't see the file installed in the current python.org 3.3 Windows distribution. But I was waiting for confirmation from the OP that he is using the Windows installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 23:22:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 21:22:56 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350249776.9.0.39374881972.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27571/issue-16227-1-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 23:56:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 21:56:28 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350251788.66.0.877250023942.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching revised patch. ---------- Added file: http://bugs.python.org/file27573/issue-16225-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:01:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 22:01:20 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350252080.52.0.157592118575.issue16227@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would not rephrase the first two lines. Nice trick of using py3k in the link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:04:22 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 14 Oct 2012 22:04:22 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350252262.49.0.643676233389.issue16154@psf.upfronthosting.co.za> Ravi Sinha added the comment: I've used the testsetup directive and the problem in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/math.rst, line 79, is fixed; the test passes Added # doctest: +SKIP to lines 179 and 180 in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/filecmp.rst, and it passes too For http://hg.python.org/cpython/file/40a1652349e9/Doc/library/string.rst, lines 612-624, used +NORMALIZE_WHITESPACE and the test passed, but since Terry preferred a code change, did that too; the test passes Put my name at the proper position in Misc/ACKS For the multiple versions, I needed to ask whether they'd all belong to this same patch or there would be different patches for each version? Sorry if it's a silly question; I haven't had the time to wrap my head around how to best work with all the versions together With the directives Chris and Terry suggested, it should be easy to make several other tests pass; I'll make a few more patches ---------- Added file: http://bugs.python.org/file27574/doc_lib_Oct14_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:06:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:06:06 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350252366.5.0.762360949951.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I would not rephrase the first two lines. Why not? The current language focuses on the negative ("explaining problems") while we prefer an affirmative tone: http://docs.python.org/devguide/documenting.html#affirmative-tone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:10:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:10:10 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350252610.23.0.962696951987.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Reattaching. I duplicated a variable definition that was defined previously. ---------- Added file: http://bugs.python.org/file27575/issue-16225-3-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:17:48 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 22:17:48 +0000 Subject: [docs] [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350253068.38.0.732077291872.issue16236@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:22:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 22:22:13 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350253333.89.0.993602903636.issue16225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I mean it does not lead to crash, hang, etc. Even growing list during iteration can be safe you move forward faster than list grows or if you known where to stop. Unexpected behavior for one people can be expected for others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:34:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:34:39 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350254079.74.0.873932835191.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I mean it does not lead to crash, hang, etc. I agree. I removed the word "safe" in the patch I attached to reduce ambiguity. Regarding unexpected behavior, remember that the tutorial is for beginners/newcomers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:00:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 23:00:23 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350254079.74.0.873932835191.issue16225@psf.upfronthosting.co.za> Message-ID: <201210150200.07479.storchaka@gmail.com> Serhiy Storchaka added the comment: > I agree. I removed the word "safe" in the patch I attached to reduce > ambiguity. Yes, so much the better. It will be nice somewhere in deep clarify for experts what happens with list iterator if the list changed. And iterating over modifyed (if you insert/remove keys, but not when you only update values) dict or set really yield unexpected results (i.e. they expected in them undefinability). This is really not recommended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:04:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 23:04:25 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350255865.19.0.0379302970244.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It will be nice somewhere in deep clarify for experts what happens with list iterator if the list changed. There is a note somewhat to this effect here: http://docs.python.org/dev/reference/compound_stmts.html#the-for-statement "Note There is a subtlety when the sequence is being modified by the loop...." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:24:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Oct 2012 02:24:31 +0000 Subject: [docs] [issue16237] bdist_rpm SPEC files created with distutils may be distro specific Message-ID: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> New submission from Nick Coghlan: In resolving 14443 we effectively embedded the vendor macros in the SPEC file generated by bdist_rpm on older versions of RHEL (and derivatives). While I think that's a necessary evil (in order to create Python 3 RPMs that actually work properly at all on those platforms), we should note the distro limitation somewhere in the documentation: even if the RPM would otherwise work properly on Fedora *and* RHEL (and perhaps even openSUSE), the embedded copy of the vendor post install macros may misfire. ---------- assignee: docs at python components: Documentation messages: 172938 nosy: dmalcolm, docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: bdist_rpm SPEC files created with distutils may be distro specific type: enhancement versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:42:38 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2012 02:42:38 +0000 Subject: [docs] [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350268958.79.0.738088559322.issue16236@psf.upfronthosting.co.za> Ned Deily added the comment: The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link to the interpreter nor is there one when running python2.7 from a build directory. The Makefile could conditionally try `python2` and then fall back to `python`. ---------- nosy: +ned.deily versions: +Python 2.7 -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:43:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:43:39 +0000 Subject: [docs] [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350269019.36.0.836050833499.issue16225@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 08:11:49 2012 From: report at bugs.python.org (Bryce Verdier) Date: Mon, 15 Oct 2012 06:11:49 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350281509.37.0.35326605814.issue15936@psf.upfronthosting.co.za> Bryce Verdier added the comment: Ramchandra, doesn't the description of os.urandom already imply that it's a low-level interface? Or are you saying that you want this to be explicitly stated? I would also like to work on this bug ---------- nosy: +louiscipher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:20:50 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 15 Oct 2012 07:20:50 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1350285650.59.0.327090908544.issue11009@psf.upfronthosting.co.za> anatoly techtonik added the comment: Why not to follow the convention and add underscore _ to the names to remove the ambiguity and future reports and confusion about that thees functions are not documented? ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:38:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 07:38:07 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350286687.3.0.795051528094.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The attached patch adds support for '\\' escaping to fnmatch, and consequently to glob. This is a backward incompatible change. For example glob.glob(r'C:\Program Files\*') will be broken. As flacs says a way to escape metacharacters in glob/fnmatch already exists. If someone want to match literal name "Ajax_[version2].txt" it should use pattern "Ajax_[[]version2].txt". Documentation should explicitly mentions such way. It will be good also to add new fnmatch.escape() function. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 10:04:40 2012 From: report at bugs.python.org (Francisco Gracia) Date: Mon, 15 Oct 2012 08:04:40 +0000 Subject: [docs] [issue16229] Module *redemo.py* lacking in recent Python distributions In-Reply-To: <1350236949.44.0.927008518375.issue16229@psf.upfronthosting.co.za> Message-ID: Francisco Gracia added the comment: You are right. I am referring to the Windows installer. I forgot to mention that I am using Windows XP. Thank you. 2012/10/14 Ned Deily > > Ned Deily added the comment: > > The demo scripts in the Tools directory were cleaned up earlier in Python > 3 and moved. redemo.py is still included in the 3.2 and later source > distributions in the Tools/demo directory. The builders of binary > installers and third-party distributors of Python 3.x may make their own > decisions about whether to include the Tools directory in their distros. > For which platform and from what source are you installing Python 3.2? > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ > ---------- title: File *redemo.py* lacking in recent Python distributions -> Module *redemo.py* lacking in recent Python distributions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 10:42:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 08:42:18 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350290537.96.0.713616183254.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which add fnmatch.escape() function. ---------- Added file: http://bugs.python.org/file27579/fnmatch_escape.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 12:50:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 10:50:35 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350298235.87.0.951775306194.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not sure if escape() should support bytes. translate() doesn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 13:05:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 11:05:10 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350299110.51.0.674960545785.issue13538@psf.upfronthosting.co.za> Ezio Melotti added the comment: Instead of documenting what *encoding* and *errors* do, I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). I don't like encodings/decodings done via the str/bytes constructors, and I think the docs should encourage the use of bytes.decode/str.encode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:51:30 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 12:51:30 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1350305490.96.0.416069744952.issue15586@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:55:38 2012 From: report at bugs.python.org (=?utf-8?q?Peter_W=C3=BCrtz?=) Date: Mon, 15 Oct 2012 12:55:38 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples Message-ID: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> New submission from Peter W?rtz: I think the PEP8 examples for arithmetic expressions are a bit misleading. (http://www.python.org/dev/peps/pep-0008/#id20) The text clearly says that it should add spaces around operators of low(est) priority, which means that I'm encouraged to visually group an expression of high priority. It doesn't say (anymore?) that there should always be spaces around all arithmetic operators. This is however not reflected in the examples. In the examples "x = x*2 - 1" is listed as a negative example, while being perfectly compliant with the guide. Shouldn't this be in the "Yes" or an "Optionally" example block? I believe these examples may cause some people to interpret the style guide in a very rigid way, eventually leading to PEP8 formatting tools that flatten out nicely grouped expressions. ---------- assignee: docs at python components: Documentation messages: 172965 nosy: docs at python, pwuertz priority: normal severity: normal status: open title: PEP8 arithmetic operator examples type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:03:53 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 15 Oct 2012 14:03:53 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350309833.4.0.333894862931.issue15936@psf.upfronthosting.co.za> Ramchandra Apte added the comment: @Bryce Retract that message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:16:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 14:16:14 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350310574.52.0.388722306768.issue8402@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the escaping workaround should be documented in the glob and/or fnmatch docs. This way users can simply do: import glob glob.glob("c:\abc\afolderwith[[]test]\*") rather than import glob import fnmatch glob.glob(fnmatch.escape("c:\abc\afolderwith[test]\") + "*") The function might still be useful with patterns constructed programmatically, but I'm not sure how common the problem really is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:43:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:43:29 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch Message-ID: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: fnmatch.translate's docstraing says "There is no way to quote meta-characters.", but this is wrong. One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` by wrapping them between square brackets. Thus, ``'[?]'`` matches the literal character ``'?'``. There are a lot of related issues: issue8402, issue13929, issue9358, issue738389, issue738361, issue1580472, issue5852. ---------- assignee: docs at python components: Documentation files: fnmatch_doc_escape.patch keywords: easy, patch messages: 172976 nosy: docs at python, serhiy.storchaka priority: high severity: normal status: open title: Document a way to escape metacharacters in glob/fnmatch type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27581/fnmatch_doc_escape.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:45:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:45:22 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350312322.77.0.296689063664.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I think the escaping workaround should be documented in the glob and/or fnmatch docs. See issue16240. This issue left for enhancement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:50:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:50:25 +0000 Subject: [docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350312624.91.0.588278232406.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated (thanks Ezio for review and comments). ---------- Added file: http://bugs.python.org/file27582/fnmatch_escape_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:53:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:53:26 +0000 Subject: [docs] [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350312806.15.0.0150251311517.issue8402@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Add a way to escape metacharacters in glob/fnmatch -> Add a function to escape metacharacters in glob/fnmatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:05:21 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 15 Oct 2012 15:05:21 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs Message-ID: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> New submission from Ramchandra Apte: http://docs.python.org/release/3.3.0/using/cmdline.html#cmdoption-X says "CPython currently defines none of them..." But in Python 3.3, "faulthandler" can be passed to the option. ---------- assignee: docs at python components: Documentation messages: 172980 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: "-X faulthandler" is not documented in -X option docs versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:04:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 16:04:22 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350317062.8.0.167397143014.issue16241@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, haypo stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:27:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 15 Oct 2012 17:27:03 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322023.08.0.276065644301.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). Good suggestion. And yes, code is shared in the following way: http://hg.python.org/cpython/file/d3c7ebdc71bb/Objects/bytesobject.c#l2306 One thing that would need to be addressed in the str() version is if bytesobj is a PEP 3118 character buffer, after which it falls back to bytesobj.decode(encoding, errors). I will update the patch so people can see how it looks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:29:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Oct 2012 17:29:57 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322196.94.0.900729147272.issue13538@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed: >>> m = memoryview(b"") >>> str(m, "utf-8") '' >>> m.decode("utf-8") Traceback (most recent call last): File "", line 1, in AttributeError: 'memoryview' object has no attribute 'decode' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:30:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Oct 2012 17:30:35 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322235.53.0.251936029978.issue13538@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note: "character buffer" isn't a term we use anymore (in Python 3, that is). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 20:11:13 2012 From: report at bugs.python.org (Joseph Fall) Date: Mon, 15 Oct 2012 18:11:13 +0000 Subject: [docs] [issue16242] Pickle and __getattr__ Message-ID: <1350324673.62.0.567343854306.issue16242@psf.upfronthosting.co.za> New submission from Joseph Fall: This report is to re-raise an old issue from 2009: http://bugs.python.org/issue5370 Although that issue is marked as "fixed", I disagree that it was ever "fixed", and spent an evil day tracking it down. Use Case: - take two 3rd party packages: django and django-crispy-forms - django, deep in its inner-workings, uses Pickle - django-cripsy-forms implements the _getattr__ method in one of it's classes - when you put the two together such that django pickles a form, the python interpreter goes into a tailspin in very sinister and hard-to-track-down ways (different behaviour in 2.5, 2.6, 2.7, as noted in issue5370, which includes a simple test case) The "resolution" for issue5370 was to add some documentation to Pickle. But I would argue this is insufficient - the implementer of django-crispy-forms would have no reason to ever look at the Pickle docs, and so is very likely to implement this bug (which s/he did). Perhaps, if this issue cannot be resolved in code, as suggested by gagenellina back in 2009, at least some documentation could be added to __getattr__ (and others) warning that these methods could potentially be called before __init__ (similar to the documentation added to Pickle)? I'd be happy to draft a small bit of documentation for this, although if someone can think of a way to simply resolve this in Pickle so it does not cause the issue in the first place, that seems to me ideal. A test case is included with issue5370 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 172993 nosy: docs at python, powderflask priority: normal severity: normal status: open title: Pickle and __getattr__ type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 20:34:48 2012 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Oct 2012 18:34:48 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350326088.68.0.82877874113.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: It occurs to me that I should have asked; should the documentation be changed to match the code, or the code to match the documentation (with regards to the default argument to the access parameter in a few functions)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 20:39:14 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 15 Oct 2012 18:39:14 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350326354.41.0.962855598473.issue16197@psf.upfronthosting.co.za> Brian Curtin added the comment: Docs should match code. If we did it the other way around we'd probably break something. Thanks for looking into this. I've been busy the last few days but I will get to the review and application of the patch very soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 21:20:03 2012 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Oct 2012 19:20:03 +0000 Subject: [docs] [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350328803.48.0.905283187169.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: That's what I figured, so that's what I did in the patch; but I've also seen cases in Python where prior documentation has dictated how the code should work. Thanks for the confirmation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:13:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 00:13:07 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <3XgcRf6HSKzQnN@mail.python.org> Roundup Robot added the comment: New changeset c59884f4bc8d by Chris Jerdonek in branch '2.7': Issue #16227: Add to 2.x Unicode HOWTO a link to the Python 3 version. http://hg.python.org/cpython/rev/c59884f4bc8d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:15:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 00:15:11 +0000 Subject: [docs] [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350346511.59.0.762420818448.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed without changing the first sentence, as ?ric preferred. Thanks for the report, Mark! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:24:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 00:24:21 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350347061.64.0.502104604833.issue16225@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: list.remove in for loop -> add to "looping techniques" tutorial a note about modifying sequence type: -> enhancement versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 03:24:42 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Oct 2012 01:24:42 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350350682.22.0.557455053444.issue16225@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > > It will be nice somewhere in deep clarify > > for experts what happens with list iterator if the list changed. Resist the urge to over-specify. Unless the behavior is tested and known to be consistent across all implementations, I'm content with the current docs: "Note There is a subtlety when the sequence is being modified by the loop...." Chris's currently patch seems reasonable to me and I don't think anything further is a good idea. With nearly any data structure in any language, most programmers learn to be cautious about and generally avoid looping over a structure while mutating it. Adding yet more documentation details won't make the issue go away. I recommend posting the current patch and closing this issue to be done with it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 03:30:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 01:30:20 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350351020.68.0.856390757609.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Raymond. I will be doing that later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 03:44:11 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Oct 2012 01:44:11 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1350351851.76.0.858970441431.issue16239@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Shouldn't this be in the "Yes" > or an "Optionally" example block? +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 04:30:50 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Oct 2012 02:30:50 +0000 Subject: [docs] [issue16243] Regression in inspect module In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1350354650.04.0.332431763409.issue16243@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: My bad, but I think documentation can be improved by adding an example. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python type: behavior -> enhancement versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 04:51:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 02:51:36 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <3XggyZ6sgRzPF3@mail.python.org> Roundup Robot added the comment: New changeset 1f1bf6a3abbc by Chris Jerdonek in branch '3.2': Issue #16225: Add additional note to tutorial about changing sequence while looping. http://hg.python.org/cpython/rev/1f1bf6a3abbc New changeset 8cb14494d33c by Chris Jerdonek in branch '3.3': Issue #16225: Merge from 3.2: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/8cb14494d33c New changeset e0a407d41af5 by Chris Jerdonek in branch 'default': Issue #16225: Merge from 3.3: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/e0a407d41af5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:02:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 03:02:25 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <3XghC43gxkzR62@mail.python.org> Roundup Robot added the comment: New changeset dc006b6212e7 by Chris Jerdonek in branch '2.7': Issue #16225: Backport from 3.2: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/dc006b6212e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:04:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 03:04:56 +0000 Subject: [docs] [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350356695.97.0.505671209842.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed. Thanks for reporting the suggestion, Ian. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 06:13:36 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 04:13:36 +0000 Subject: [docs] [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350360816.38.0.644122171931.issue9583@psf.upfronthosting.co.za> Todd Rovito added the comment: Applies to Python 3.4 in development and Python 2.7. I recently ran into a similar conflict where I was overriding a environment variable with a command line option and didn't realize it. I first checked the documentation and noticed that it was not clear. Then I found this bug report and made a patch which is attached. The patch iterates what Terry Reedy suggested which I thought made the documentation clearer. This is my first patch to Python I hope it is helpful as Python has served me well over the years. ---------- keywords: +patch nosy: +Todd.Rovito versions: +Python 3.4 -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file27588/EnvironmentVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 07:00:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 05:00:12 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350363612.41.0.313154561382.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: For Python 3.4 attached is a patch as suggested by Raymond Hettinger. My suggestion is to put the patch in Doc/reference/datamodel.rst because if a user searches google.com for __len__ this is the first link in the list. I think this extra information is a valuable addition to the documentation. ---------- keywords: +patch nosy: +Todd.Rovito versions: +Python 3.4 Added file: http://bugs.python.org/file27589/DataModel__len__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 07:17:23 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 05:17:23 +0000 Subject: [docs] [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350364643.06.0.286432007627.issue9583@psf.upfronthosting.co.za> Todd Rovito added the comment: After another review I decided to submit a newer patch that uses a comma so I think the documentation flows better. ---------- type: -> enhancement Added file: http://bugs.python.org/file27590/EnvironmentVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:11:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 07:11:08 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350371467.23.0.174864849643.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching updated patch based on Ezio and Antoine's comments. Let me know if I'm not using the correct or preferred terminology around buffer objects and the buffer protocol. It doesn't seem like the section on the buffer protocol actually says what objects implementing the buffer protocol should be called. I gather indirectly from the docs that such objects are called "buffer objects" (as opposed to just "buffers"): http://docs.python.org/dev/c-api/buffer.html#bufferobjects ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27591/issue-13538-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:22:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 07:22:42 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350372162.06.0.531310448751.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Reattaching patch (a line was missing). ---------- Added file: http://bugs.python.org/file27592/issue-13538-3-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 11:58:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 09:58:25 +0000 Subject: [docs] [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350381505.77.0.900699605011.issue13538@psf.upfronthosting.co.za> Ezio Melotti added the comment: + str(bytes, encoding[, errors='strict']) + str(bytes, errors[, encoding='utf-8']) Why not simply str(bytes, encoding='utf-8', errors='strict')? (Your signature suggests that str(b'abc', 'strict') should work.) + the string itself. This behavior differs from :func:`repr` in that the I'm not sure this is the right place where to explain the differences between __str__ and __repr__ (or maybe it is?). Also doesn't str() falls back on __repr__ if __str__ is missing? Does :meth:`__str__` link to object.__str__? + If *encoding* or *errors* is given, and/or + (or :class:`bytearray`) object, then :func:`str` calls I would use 'is equivalent to', rather than 'calls'. + :meth:`bytes.decode(encoding, errors) ` on the object + and returns the value. Otherwise, the bytes object underlying the buffer + object is obtained before calling :meth:`bytes.decode() `. :meth:`bytes.decode` should be enough. + Passing a :func:`bytes ` :func:`bytes` should be enough (if it isn't, maybe you want :func:`.bytes`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 12:15:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:15:49 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgsq92GwCzR5Y@mail.python.org> Roundup Robot added the comment: New changeset 0a0b890508d3 by Andrew Svetlov in branch '3.3': Issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/0a0b890508d3 New changeset 34c2bb737364 by Andrew Svetlov in branch 'default': Merge issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/34c2bb737364 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 12:23:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:23:25 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgszw2s0lzR5c@mail.python.org> Roundup Robot added the comment: New changeset 2bff4969b65b by Andrew Svetlov in branch '2.7': Issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/2bff4969b65b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 12:23:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 16 Oct 2012 10:23:57 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350383037.11.0.855970056682.issue15936@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 12:53:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:53:04 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgtf81Fp9zR45@mail.python.org> Roundup Robot added the comment: New changeset c1f27cf0cc9d by Andrew Svetlov in branch '2.7': Issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/c1f27cf0cc9d New changeset da8155ccf70b by Andrew Svetlov in branch '3.3': Issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/da8155ccf70b New changeset bd3647e9ac62 by Andrew Svetlov in branch 'default': Merge issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/bd3647e9ac62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:10:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:10:56 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented Message-ID: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Everything is in the title. I couldn't find any doc for bytes.join, etc. (while str methods are documented in library/stdtypes.html#string-methods). ---------- assignee: docs at python components: Documentation messages: 173074 nosy: docs at python, pitrou priority: normal severity: normal stage: needs patch status: open title: bytes and bytearray methods are undocumented type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:13:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 19:13:37 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414817.7.0.788583408426.issue16252@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/dev/library/stdtypes.html#bytes-and-bytearray-operations """ Due to the common use of ASCII text as the basis for binary protocols, bytes and bytearray objects provide almost all methods found on text strings, with the exceptions of: """ The additional methods are documented after that. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:14:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:14:57 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414897.85.0.901416509818.issue16252@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, right. I guess a hyperlink to those methods wouldn't hurt, though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:15:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:15:55 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414955.67.0.102038795217.issue16252@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, in the SSL socket docs, I listed the supported methods explicitly (http://docs.python.org/dev/library/ssl.html#ssl-sockets). I think it makes things clearer for the reader. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:28:04 2012 From: report at bugs.python.org (Roger Upole) Date: Tue, 16 Oct 2012 19:28:04 +0000 Subject: [docs] [issue16253] Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples Message-ID: <1350415684.72.0.0946925077197.issue16253@psf.upfronthosting.co.za> New submission from Roger Upole: The docs for this function state "Nested tuples cannot be parsed when using keyword arguments!" but this restriction was removed some time ago. ---------- assignee: docs at python components: Documentation messages: 173081 nosy: docs at python, rupole priority: normal severity: normal status: open title: Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 22:03:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 20:03:16 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350417796.73.0.933456390011.issue16252@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I couldn't find any doc for bytes.join, etc. One of the contributing factors to this is that bytes doesn't have its own class entry in the same way that, for example, list, dict, and memoryview have. This creates a stumbling block for readers because they have to know to click on the "Bytes and Bytearray Operations" section as opposed to simply clicking on the type name as it is done for several other types. With a class entry, locating where the methods are documented would be quicker and more intuitive. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 00:12:05 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 16 Oct 2012 22:12:05 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1350425525.33.0.998947499981.issue16194@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: """To prevent initializing an extension module more than once, we keep a static dictionary 'extensions' keyed by module name (for built-in modules) or by filename (for dynamically loaded modules), containing these modules. """ So there can be only one module per filename. But what if this dictionary was keyed by tuple(name, filename) instead? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 02:32:36 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 00:32:36 +0000 Subject: [docs] [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350433956.28.0.816304467949.issue16252@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 10:22:46 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 17 Oct 2012 08:22:46 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1350462166.2.0.392276384343.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Yes, that's what I suggested at the end of msg172656 - including modulename in the key. Brett, would it be OK if I make patch against 3.3 (or head, if you prefer) to key by (modulename,filename) for compiled modules? I had a look at importlib.machinery.ExtensionFileLoader and it will suffer from the same issue. Should I open a separate bug for the post-3.3 patch, and keep this as documentation bug for 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 14:05:48 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 12:05:48 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1350475548.14.0.500626377815.issue16194@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I think keeping this bug as the doc bug and opening a new one for the enhancement is the best way to go. ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 14:48:50 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 17 Oct 2012 12:48:50 +0000 Subject: [docs] [issue16265] Code sample does not collapse correctly Message-ID: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting In the last but second code sample in that section, the code is not correctly colored and cannot be correctly collapsed. Expanded: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} >>> print ('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; ' ... 'Dcab: {0[Dcab]:d}'.format(table)) Jack: 4098; Sjoerd: 4127; Dcab: 8637678 Collapsed: table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} print('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; ' ---------- assignee: docs at python components: Documentation messages: 173163 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Code sample does not collapse correctly type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 14:58:39 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 17 Oct 2012 12:58:39 +0000 Subject: [docs] [issue16266] Typo in tutorial Message-ID: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files The text: In text mode, the default is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n on reading and \n back to platform-specific line endings on writing. Is the last '\n' a typo and not needed? ---------- assignee: docs at python components: Documentation messages: 173165 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Typo in tutorial type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 15:12:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 13:12:46 +0000 Subject: [docs] [issue16266] Typo in tutorial In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350479566.34.0.374622093992.issue16266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm not native English speaker, but for me it just means \r\n -> \n when read from stream and \n -> \r\n when write to stream if OS is Windows. That's correct. ---------- nosy: +asvetlov, chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 15:47:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 13:47:51 +0000 Subject: [docs] [issue16265] Code sample does not collapse correctly In-Reply-To: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> Message-ID: <3XhZTL5D5hzM06@mail.python.org> Roundup Robot added the comment: New changeset a0fba0382ae0 by Andrew Svetlov in branch '3.2': Issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/a0fba0382ae0 New changeset 7c0de8be4eaf by Andrew Svetlov in branch '3.3': Merge issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/7c0de8be4eaf New changeset c8a11e9a0217 by Andrew Svetlov in branch 'default': Merge issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/c8a11e9a0217 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 15:48:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 13:48:26 +0000 Subject: [docs] [issue16265] Code sample does not collapse correctly In-Reply-To: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> Message-ID: <1350481706.45.0.256555283308.issue16265@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 16:33:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 14:33:41 +0000 Subject: [docs] [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <3XhbVF17LjzR6l@mail.python.org> Roundup Robot added the comment: New changeset 2f812212599b by Andrew Svetlov in branch '2.7': Issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/2f812212599b New changeset a8052ad9752b by Andrew Svetlov in branch '3.2': Issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/a8052ad9752b New changeset f0bb61cbc046 by Andrew Svetlov in branch '3.3': Merge issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/f0bb61cbc046 New changeset def0e0bb06ef by Andrew Svetlov in branch 'default': Merge issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/def0e0bb06ef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 16:35:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 14:35:27 +0000 Subject: [docs] [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350484527.75.0.345562901535.issue9583@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Applied patch. Thanks, Todd. I think the issue can be closed. ---------- nosy: +asvetlov versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 17:41:21 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 15:41:21 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) Message-ID: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> New submission from Christopher the Magnificent: This may be an issue with the interpreter behavior or it may be a documentation issue. Note: I only selected Python 3.3 as the version, but it probably affects MANY other Python versions. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> import abc >>> help(abc.abstractclassmethod) Help on class abstractclassmethod in module abc: class abstractclassmethod(builtins.classmethod) | A decorator indicating abstract classmethods. | | Similar to abstractmethod. | | Usage: | | class C(metaclass=ABCMeta): | @abstractclassmethod | def my_abstract_classmethod(cls, ...): | ... | | 'abstractclassmethod' is deprecated. Use 'classmethod' with | 'abstractmethod' instead. . (et cetra) . . >>> # doesn't work >>> class Demo(metaclass=abc.ABCMeta): ... @abc.abstractmethod ... @classmethod ... def test(cls): ... pass ... Traceback (most recent call last): File "", line 1, in class Demo3(metaclass=abc.ABCMeta): File "", line 3, in Demo3 @classmethod File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/abc.py", line 24, in abstractmethod funcobj.__isabstractmethod__ = True AttributeError: attribute '__isabstractmethod__' of 'classmethod' objects is not writable >>> # DOES work >>> class Demo2(metaclass=abc.ABCMeta): ... @classmethod ... @abc.abstractmethod ... def test(cls): ... pass ... >>> Demo2() Traceback (most recent call last): File "", line 1, in Demo4() TypeError: Can't instantiate abstract class Demo2 with abstract methods test Hopefully this is enough documentation to show what the issues is. If not, just chime in. :-) ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 173183 nosy: christopherthemagnificent, docs at python priority: normal severity: normal status: open title: order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:33:48 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 16:33:48 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350491628.53.0.867407266574.issue16267@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:40:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 16:40:26 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350492026.56.0.00646904740896.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think better to fix code to make first sample also work. It can be done as special cases in abc.abstractmethod to process classmethod/staticmethod objects properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:02:10 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 17:02:10 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350493330.35.0.845248359675.issue16267@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:12:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2012 17:12:45 +0000 Subject: [docs] [issue16266] Typo in tutorial In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350493965.08.0.280855160243.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The last \n is needed for the reason Andrew mentioned, but it is true that the sentence could probably be rephrased to reduce the chance of confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:40:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2012 17:40:14 +0000 Subject: [docs] [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350495614.37.0.0733542825275.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would suggest something like this: "In text mode, the default when reading is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n. When writing in text mode, the default is to convert occurrences of \n back to platform-specific line endings." ---------- keywords: +easy title: Typo in tutorial -> Rephrase sentence in tutorial about universal newlines versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:47:51 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 17:47:51 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350496071.2.0.504186527739.issue16267@psf.upfronthosting.co.za> R. David Murray added the comment: I've added the nosy list from issue 11610, in case complicating the implementation is seen as sub-optimal :) ---------- nosy: +Darren.Dale, benjamin.peterson, daniel.urban, dsdale24, eric.araujo, eric.snow, ncoghlan, python-dev, r.david.murray, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:07:00 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 17 Oct 2012 18:07:00 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350497220.38.0.322340447995.issue16267@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't see why classmethod/staticmethod should be special cased if it doesn't work for other decorators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:15:10 2012 From: report at bugs.python.org (Darren Dale) Date: Wed, 17 Oct 2012 18:15:10 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350497710.51.0.755895816306.issue16267@psf.upfronthosting.co.za> Darren Dale added the comment: Quoting the documentation for abstractmethod: "When abstractmethod() is applied in combination with other method descriptors, it should be applied as the innermost decorator, as shown in the following usage examples:" The examples include staticmethod and classmethod. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:38:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 18:38:58 +0000 Subject: [docs] [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350499138.59.0.119918909604.issue16266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good to me, please apply it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:41:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 18:41:42 +0000 Subject: [docs] [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350499302.81.0.92992475834.issue9583@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close the issue. Feel free to reopen if clarification needed. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:26:45 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 19:26:45 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350502005.74.0.479396572328.issue16267@psf.upfronthosting.co.za> Christopher the Magnificent added the comment: As Darren Dale pointed out, it looks like this is a (partial) documentation issue. I think it's plausible that someone like me, who has used abstractmethod by itself, would read the docs for abstractclassmethod and not re-read the docs on abstract method to know that he needs to put the one decorator first and other other second. Changing Python to make it indifferent to the order of classmethod and abstractmethod wouldn't be a bad idea if it isn't too hairy to implement, since it does not seem to be intuitive to me and probably others that the order of the decorators in this specific situation should matter. At bare minimum, I recommend that the documentation for abstractclassmethod and abstractstaticmethod should be updated to indicate not merely that abstractmethod and either classmethod or staticmethod should be used together, but IN WHICH ORDER they should be used, if it is decided to preserve the sensitivity to ordering. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:00:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 20:00:19 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350504019.31.0.158204375182.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: After brief looking sources I figured out it can be solved by adding setters for __isabstractmethod__ to classmethod/staticmethod objects. It can be done, I'll try to make a patch. For property situation is worse: property is abstract if any of getter/setter/deleter is abstract. Which object attribute should be set for setting __isabstractmethod__ for property? We can make the rule: abstractmethod for classmethod/staticmethod/property should set descriptor as abstract, not functions behind it. I'm not sure is it true solution but I like to try to make a patch for that. Anyway, the patch for describing current behavior in the docs is welcome. ---------- stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:15:12 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 20:15:12 +0000 Subject: [docs] [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1350504912.55.0.215480286387.issue16194@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:45:24 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 17 Oct 2012 22:45:24 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350513924.82.0.158532833675.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito : Removed file: http://bugs.python.org/file27589/DataModel__len__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:20:58 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 00:20:58 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350519658.51.0.0572618732904.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: New patch with a better reference to the source for the test case. This was suggested by PythonMentors list. I think the patch improves the documentation. This works on Python 3.4. ---------- Added file: http://bugs.python.org/file27605/DataModel__len__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:27:43 2012 From: report at bugs.python.org (Chris Colbert) Date: Thu, 18 Oct 2012 00:27:43 +0000 Subject: [docs] [issue16272] C-API documentation clarification for tp_dictoffset Message-ID: <1350520063.61.0.687481658196.issue16272@psf.upfronthosting.co.za> New submission from Chris Colbert: The documentation of the tp_dictoffset is a bit unclear when describing the responsibilities of a base type with a nonzero tp_dictoffset. http://docs.python.org/c-api/typeobj.html I feel there should some statement to the effect of: """ If a type defines a nonzero tp_dictoffset, that type is responsible for defining a `__dict__` slot as part of the tp_getset structures. Failure to do so will result in the dict being inaccesible from Python via `obj.__dict__` from instances of the type or subtypes. """ The reasoning is twofold: 1) `PyType_Ready` does not add the default getset members like `type_new` does. This prevents the instances of the type itself from retrieving `obj.__dict__` 2) `type_new` will provide the default `subtype_dict` getset member for subclasses, but this calls `get_builtin_base_with_dict` which will resolve to the most base type which is not heap allocated; in this case, the C type. Since this type has no `__dict__` getset member, the lookup fails. Adding a bit of verbage about this "gotcha" would likely save some headaches in the future. ---------- assignee: docs at python components: Documentation messages: 173222 nosy: Chris.Colbert, docs at python priority: normal severity: normal status: open title: C-API documentation clarification for tp_dictoffset versions: Python 2.6, 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 Oct 18 05:31:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 03:31:10 +0000 Subject: [docs] [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <3XhwlK55ZzzR6F@mail.python.org> Roundup Robot added the comment: New changeset 7b2a13b20b33 by Chris Jerdonek in branch '3.2': Clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/7b2a13b20b33 New changeset b5439bca219f by Chris Jerdonek in branch '3.3': Merge from 3.2: clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/b5439bca219f New changeset a45cb181e4d0 by Chris Jerdonek in branch 'default': Merge from 3.3: clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/a45cb181e4d0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:33:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 18 Oct 2012 03:33:00 +0000 Subject: [docs] [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350531180.43.0.849174237107.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed. Thanks for the report! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:33:34 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 15:33:34 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350574414.8.0.198718655552.issue10405@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:54:40 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 18 Oct 2012 15:54:40 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350575680.22.0.270140249435.issue16267@psf.upfronthosting.co.za> Eric Snow added the comment: The catch is that when abstractmethod is the inner decorator, __isabstractmethod__ is set on the object that classmethod/staticmethod is wrapping. When abstractmethod is the outer decorator, __isabstractmethod__ is set on the resulting classmethod/staticmethod object instead. Unless there is some practical reason that the distinction matters, I'm +1 on letting __isabstractmethod__ be set on classmethods and staticmethods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 18:04:09 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 18 Oct 2012 16:04:09 +0000 Subject: [docs] [issue12686] argparse - document (and improve?) use of SUPPRESS with help= In-Reply-To: <1312356221.08.0.599664751964.issue12686@psf.upfronthosting.co.za> Message-ID: <1350576249.21.0.66278970466.issue12686@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Can this be closed? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 18:32:17 2012 From: report at bugs.python.org (Darren Dale) Date: Thu, 18 Oct 2012 16:32:17 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1350577937.37.0.752630110887.issue16267@psf.upfronthosting.co.za> Darren Dale added the comment: There is a very practical reason, which was the whole point of issue11610. Descriptors are should declare themselves abstract when they are composed of abstract methods. If you have a property with an concrete getter but an abstract setter, the property should declare itself abstract until such time as it is provided a concrete setter. If we allow __isabstractmethod__ to be settable by @abstractmethod, it undermines the whole scheme of descriptors delegating their abstractedness to the methods of which they are composed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 18:38:21 2012 From: report at bugs.python.org (Steven Bethard) Date: Thu, 18 Oct 2012 16:38:21 +0000 Subject: [docs] [issue12686] argparse - document (and improve?) use of SUPPRESS with help= In-Reply-To: <1312356221.08.0.599664751964.issue12686@psf.upfronthosting.co.za> Message-ID: <1350578301.71.0.961511836049.issue12686@psf.upfronthosting.co.za> Steven Bethard added the comment: Yeah, looks like we can close this. If anyone finds a specific bug in the use of SUPPRESS, please open a new issue. ---------- resolution: -> duplicate status: open -> closed superseder: -> document argparse's help=SUPPRESS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 19:36:16 2012 From: report at bugs.python.org (David Benjamin) Date: Thu, 18 Oct 2012 17:36:16 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate Message-ID: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> New submission from David Benjamin: This is somewhat of a nitpick. os.rename's documentation says "If dst is a directory, OSError will be raised". On Unix, this isn't completely true. If the source is a directory and the destination is an empty directory, it'll overwrite the former with the latter. (Actually if the source is a directory the inverse is true; if dst is a file, OSError will be raised.) In [1]: import os In [2]: os.mkdir("aaa") In [3]: open("aaa/blah", "w").close() In [4]: os.mkdir("bbb") In [5]: os.rename("aaa", "bbb") In [6]: os.listdir("bbb") Out[6]: ['blah'] ---------- assignee: docs at python components: Documentation messages: 173285 nosy: David.Benjamin, docs at python priority: normal severity: normal status: open title: os.rename documentation slightly inaccurate type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 19:53:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 17:53:40 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350582820.67.0.455777193305.issue16278@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.2, Python 3.3 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:11:13 2012 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 19 Oct 2012 08:11:13 +0000 Subject: [docs] [issue16282] The Python Tutorial the previous link needs updating Message-ID: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> New submission from Mark Lawrence: http://docs.python.org/tutorial/ the previous link goes to http://docs.python.org/whatsnew/2.0.html. Can we have this updated please? ---------- assignee: docs at python components: Documentation messages: 173311 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: The Python Tutorial the previous link needs updating versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:22:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:22:26 +0000 Subject: [docs] [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350634946.59.0.0713793174436.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This issue does not seem limited to a particular page. For example, the "Previous topic" link for the Python Standard Library part: http://docs.python.org/library/index.html is "9. Full Grammar specification", which is the last section of the following part (the following part being the Language Reference). ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:29:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:29:37 +0000 Subject: [docs] [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350635377.05.0.355124309078.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > http://docs.python.org/tutorial/ the previous link goes to http://docs.python.org/whatsnew/2.0.html. This seems correct to me since the 'All "What's new" documents since 2.0' part of the documentation occurs immediately before the Tutorial part, and 2.0 is the last section in that 'All "What's new"' part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:51:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:51:43 +0000 Subject: [docs] [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350636703.2.0.344861648474.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Note that the 2.0 issue was previously reported in issue 4988 and issue 7683. The issue I described occurs because the parts on the home page are listed in an order different from their order in the table of contents: http://docs.python.org/ http://docs.python.org/contents.html So "Previous topic" respects the table of contents ordering and not the home page ordering. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:24:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:24:24 +0000 Subject: [docs] [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1350663864.08.0.149414226339.issue16237@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:42:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:42:10 +0000 Subject: [docs] [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350664930.66.0.110920123091.issue16236@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, please don?t break many OSes for the sake of one. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:47:00 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2012 18:47:00 +0000 Subject: [docs] [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1350672420.86.0.361496970767.issue16243@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: Regression in inspect module -> Add example for inspect module doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:31:35 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 19:31:35 +0000 Subject: [docs] [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1350675095.12.0.726543341156.issue16195@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:56:37 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:56:37 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350708997.09.0.0967583733317.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito : Removed file: http://bugs.python.org/file27605/DataModel__len__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:57:33 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:57:33 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709053.57.0.461197110378.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: Changed the file name so it is clear that this patch goes with version 3.4. ---------- Added file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:57:52 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:57:52 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709072.44.0.540472325141.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito : Removed file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:58:17 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:58:17 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709097.67.0.534737520335.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: Used the right patch file name this time... ---------- Added file: http://bugs.python.org/file27625/DataModel__len__3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:59:18 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:59:18 +0000 Subject: [docs] [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709158.75.0.483159020919.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch is for Python 2.7. ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file27626/DataModel__len__2point7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 07:19:52 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:19:52 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350710392.64.0.668975781976.issue10405@psf.upfronthosting.co.za> Todd Rovito added the comment: Nick, I agree some documentation is better than none. But somebody could do better I am not sure how to debug in IDLE. I have taken your file and created a 2.7 patch. ---------- keywords: +patch type: -> enhancement versions: -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file27627/IDLEBreakPointDocumentation2point7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 07:48:58 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:48:58 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350712138.73.0.769071124753.issue10405@psf.upfronthosting.co.za> Changes by Todd Rovito : Removed file: http://bugs.python.org/file27627/IDLEBreakPointDocumentation2point7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 07:49:37 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:49:37 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350712177.83.0.235340508987.issue10405@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch works for both Python 3.4 and Python 2.7, it is a very simple patch. ---------- versions: +Python 3.4 Added file: http://bugs.python.org/file27628/IDLEBreakPointDocumentation.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 08:51:04 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 06:51:04 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350715864.27.0.866220865393.issue16278@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:22:39 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 20 Oct 2012 09:22:39 +0000 Subject: [docs] [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350724959.75.0.0150218095718.issue16236@psf.upfronthosting.co.za> Michele Orr? added the comment: > The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link > to the interpreter nor is there one when running python2.7 from a build directory. The Makefile could > conditionally try `python2` and then fall back to `python`. Sorry, I did not know that some OSes could not have the `python2` symlink, I just watched if there was on the Makefile. > Yes, please don?t break many OSes for the sake of one. Concerning this, we should do a proper configure script. Do you think that's worth it, E`ric? ``` Real configure scripts are generally much more complicated than this, since they may deal with systems where $PATH is not delimited by colons; or systems where executable programs may have optional extensions like .EXE; or $PATH variables that have the current working directory included in them as an empty string; etc. ```` -- http://mywiki.wooledge.org/BashFAQ/081 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 22:24:42 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 20:24:42 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350764682.03.0.120431957014.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: David, Thanks for your bug report. Indeed os.rename does not exhibit the same behavior as the documentation describes. For Python 3.4 here is the fix I came up with: "Rename the file or directory src to dst. If dst is a directory that is not empty, OSError will be raised. On Unix, if dst exists and is a file, it will be replaced silently if the user has permission and src is a file. On Unix, if src is a directory and dst is a file NotADirectoryError will be raised. The operation may fail on some Unix flavors if src and dst are on different filesystems. If successful, the renaming will be an atomic operation (this is a POSIX requirement). On Windows, if dst already exists, OSError will be raised even if it is a file." I have attached a Python 3.4 patch for consideration. This might not be the best phrasing so please feel free to offer alternatives. ---------- keywords: +patch Added file: http://bugs.python.org/file27640/OSRenameTest3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 22:28:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Oct 2012 20:28:51 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <3XkbDf1wNhzR86@mail.python.org> Roundup Robot added the comment: New changeset c0a423ce4b96 by Ned Deily in branch '2.7': Issue #10405: Document IDLE context menus in Standard Library document http://hg.python.org/cpython/rev/c0a423ce4b96 New changeset 566b7574becb by Ned Deily in branch '3.2': Issue #10405: Document IDLE context menus in Standard Library document http://hg.python.org/cpython/rev/566b7574becb New changeset 85c4d21f7454 by Ned Deily in branch '3.3': Issue #10405: merge from 3.2 http://hg.python.org/cpython/rev/85c4d21f7454 New changeset ea7849650fd1 by Ned Deily in branch 'default': Issue #10405: merge from 3.3 http://hg.python.org/cpython/rev/ea7849650fd1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 22:36:01 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2012 20:36:01 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350765361.62.0.316926725972.issue10405@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your suggestions, Nick and Todd. While reviewing them, I realized that there is also a small context (right-click) menu for the IDLE shell window as well. I expanded the doc changes to include it and included several other minor doc updates. I also updated the builtin IDLE Help file. By the way, if you haven't already and wish to contribute patches, please be sure to sign a PSF contributor agreement (http://www.python.org/psf/contrib/). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: enhancement -> versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 14:13:01 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Sun, 21 Oct 2012 12:13:01 +0000 Subject: [docs] [issue16294] 8 space indent in tutorial Message-ID: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/stdlib2.html#weak-references In the code example, the two class funtions' bodies have indents of 8 spaces. All other indents in the docs are 4 spaces. I suggest here we use 4 spaces also. ---------- assignee: docs at python components: Documentation messages: 173443 nosy: docs at python, fossilet priority: normal severity: normal status: open title: 8 space indent in tutorial type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:08:37 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:08:37 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846517.04.0.730884475684.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27649/27.doc_lib_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:09:02 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:09:02 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846542.49.0.121993481501.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27650/32.doc_lib_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:09:16 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:09:16 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846556.55.0.103850702209.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27651/33.doc_lib_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:12:39 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:12:39 +0000 Subject: [docs] [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846759.38.0.886603987115.issue16154@psf.upfronthosting.co.za> Ravi Sinha added the comment: Based on what I saw on some other issues, I think there is just a separate patch for each version (coming from separate working repositories), but all attached to the same issue. So I am doing the same. All the changes have been made to files under Doc/library/ - colorsys.rst, filecmp.rst, fractions.rst, math.rst, string.rst and Misc/ACKS. The beginning number for each patch and the description show which version it's meant for. There are some minor differences for 2.7 and 3.2; they either did not need a fix or needed some more tests to be skipped. For 2.7 and 3.2 I don't know how to use the online source browser to link the files directly. Please let me know if the patches are okay or how to go from here. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:57:37 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:57:37 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849456.97.0.209520558884.issue16155@psf.upfronthosting.co.za> Ravi Sinha added the comment: Did the same changes for versions 2.7, 3.2, 3.3, and 3.4 For line wrap in cases like http://hg.python.org/cpython/file/40a1652349e9/Doc/faq/general.rst, line 448, broke the list across separate lines, and had to use +NORMALIZE_WHITESPACE to make the tests pass. For the same file, in line 454, versions 2.7 and 3.2 don't have '-> None' while versions 3.3 and 3.4 do. So made the changes accordingly. Adding '' around the contents of the help is making the tests pass too. I am assuming that means the new pager that I get on OS X. This was the case uniformly across all 4 versions. Attaching all 4 patches, for different versions. Please let me know where to go from here. ---------- Added file: http://bugs.python.org/file27652/27.doc_faq_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:57:59 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:57:59 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849479.55.0.56458928225.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27653/32.doc_faq_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:58:17 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:58:17 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849497.51.0.892746029297.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27654/33.doc_faq_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:58:39 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:58:39 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849519.59.0.805749482624.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha : Added file: http://bugs.python.org/file27655/34.doc_faq_Oct21_2012.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:06:28 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:06:28 +0000 Subject: [docs] [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350849988.03.0.00833547991744.issue16294@psf.upfronthosting.co.za> Mike Hoy added the comment: Probably no need for a patch (since it's such a simple fix) but I felt like doing something. ---------- keywords: +patch nosy: +mikehoy Added file: http://bugs.python.org/file27656/issue16294.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:37:23 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:37:23 +0000 Subject: [docs] [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1350851843.5.0.483539098636.issue15569@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: -mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:36:22 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 21 Oct 2012 21:36:22 +0000 Subject: [docs] [issue14394] Add speed improvement note to the decimal docs. In-Reply-To: <1332496271.62.0.623566153633.issue14394@psf.upfronthosting.co.za> Message-ID: <1350855382.4.0.479626804003.issue14394@psf.upfronthosting.co.za> Stefan Krah added the comment: Closing as out-of-date. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:10:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 11:10:37 +0000 Subject: [docs] [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350904237.19.0.0464329408334.issue16294@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I take care of this. Thanks for pointing it out. ---------- assignee: docs at python -> jcea nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:10:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 11:10:58 +0000 Subject: [docs] [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350904258.98.0.682916945106.issue16294@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:16:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 11:16:26 +0000 Subject: [docs] [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <3XlZtK63V7zPG2@mail.python.org> Roundup Robot added the comment: New changeset 1a3f48c6ef16 by Jesus Cea in branch '2.7': Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/1a3f48c6ef16 New changeset 2015db05d954 by Jesus Cea in branch '3.2': Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/2015db05d954 New changeset 3344c8208662 by Jesus Cea in branch '3.3': MERGE: Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/3344c8208662 New changeset 4ca40082461c by Jesus Cea in branch 'default': MERGE: Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/4ca40082461c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:53:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 11:53:59 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1350906839.56.0.188746766054.issue16053@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the patch is good, why not commit it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:33:16 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Oct 2012 14:33:16 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1350916396.32.0.473255623908.issue16053@psf.upfronthosting.co.za> ?ric Araujo added the comment: Because I lack time. Feel free to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:24:41 2012 From: report at bugs.python.org (Marek Suppa) Date: Tue, 23 Oct 2012 11:24:41 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350991480.44.0.371607827802.issue16241@psf.upfronthosting.co.za> Marek Suppa added the comment: The appended diff tries to explain the situation a bit and fix this issue. Is it clear enough? ---------- keywords: +patch nosy: +mrshu Added file: http://bugs.python.org/file27669/issue16241.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:38:52 2012 From: report at bugs.python.org (Pete Sevander) Date: Tue, 23 Oct 2012 11:38:52 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350992332.62.0.653903988912.issue16210@psf.upfronthosting.co.za> Pete Sevander added the comment: Here's a patch for it. ---------- keywords: +patch nosy: +sevanteri Added file: http://bugs.python.org/file27671/issue16210.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:59:09 2012 From: report at bugs.python.org (Vladimir Rutsky) Date: Tue, 23 Oct 2012 11:59:09 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True Message-ID: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> New submission from Vladimir Rutsky: re module documentation says: Match Objects always have a boolean value of :const:`True`, so that you can test whether e.g. :func:`match` resulted in a match with a simple if statement. which is confusing - matched objects have boolean value True, doesn't matched - False. ---------- assignee: docs at python components: Documentation messages: 173595 nosy: docs at python, vrutsky priority: normal severity: normal status: open title: re: Match Objects always have a boolean value of True versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 14:26:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 12:26:04 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1350995164.64.0.775935404701.issue16304@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The documentation is okay. :func:`match` returns a Match object (which have a boolean value of True) if match and None (which have a boolean value of False) if doesn't match. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 14:41:10 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Oct 2012 12:41:10 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1350996070.81.0.742101014814.issue16304@psf.upfronthosting.co.za> R. David Murray added the comment: Since the quoted paragraph is distant from where the information about the ``None`` return is documented, the wording of the quoted paragraph can be improved to make this clearer: Match Objects always have a boolean value of ``True``. Since ``None`` (which has a boolean value of ``False``) is returned when there is no match, you can test whether there was a match with a simple ``if`` statement. ---------- nosy: +r.david.murray versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:17:25 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 23 Oct 2012 13:17:25 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1350998244.91.0.70515431488.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: As announced, I hereby present an idea how to solve this problem for 3.4. Please have a look at it. :) ---------- assignee: docs at python -> versions: -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27683/makedirs-on_wrong_mode-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:20:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 13:20:22 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <3XmFZs4g0BzR3w@mail.python.org> Roundup Robot added the comment: New changeset 957a6c00d3af by Andrew Svetlov in branch '3.3': Issue #16241: document -X faulthandler command line option. http://hg.python.org/cpython/rev/957a6c00d3af New changeset 665e3be40ad1 by Andrew Svetlov in branch 'default': Issue #16241: document -X faulthandler command line option. http://hg.python.org/cpython/rev/665e3be40ad1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:23:22 2012 From: report at bugs.python.org (Heikki Partanen) Date: Tue, 23 Oct 2012 13:23:22 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1350998602.44.0.846407549047.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: Added documentation for __format__ for datetime, time and date, and also added example code for using string.format. Seemed to merge cleanly to 3.4 and 2.7. ---------- keywords: +patch nosy: +heikki.partanen Added file: http://bugs.python.org/file27684/issue8913.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:29:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:29:13 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350998953.38.0.306785341841.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good to me, committed. Thanks, Marek. Please, fill PSF Contributor Agreement: http://www.python.org/psf/contrib/ ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:29:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:29:41 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350998981.12.0.672427701081.issue16241@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:33:40 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 23 Oct 2012 13:33:40 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350999220.46.0.0432908734188.issue16241@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Andew: Shouldn't Misc/NEWS be updated, too? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:37:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:37:09 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350999429.12.0.762431994739.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Do you think so? It was documenting already existed feature. But, if you really want I can do it of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 22:27:18 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Tue, 23 Oct 2012 20:27:18 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351024038.82.0.389002364679.issue16241@psf.upfronthosting.co.za> Marek ?uppa added the comment: I already filled and signed the PSF Contributor Agreement thanks to Petri at the PyCon Finland sprint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 22:35:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 20:35:39 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351024539.21.0.654256136772.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thank you, Marek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 00:23:26 2012 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 23 Oct 2012 22:23:26 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1351031006.09.0.64673012961.issue16304@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't think the relevant information -- that re match and search return None in the case of no match -- is that distant from the paragraph quoted. This fact is already mentioned FOUR times in the page, in each of the re.match, re.search functions and regex.match, regex.search methods, plus implied by the helper function used in the examples. Personally I think no change is required, but if the docs are going to be changed, I recommend going all the way and showing the usual re idiom with an example: Match Objects always have a boolean value of ``True``. Since ``None`` (which has a boolean value of ``False``) is returned when there is no match, you can test whether there was a match with a simple ``if`` statement. For example:: mo = re.search(pattern, string) if mo: process(mo) ---------- nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 00:27:38 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Oct 2012 22:27:38 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1351031258.11.0.794927648904.issue16304@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, distant was a poor choice of words. The issue really comes up if you happen to start reading with that section (say when revisiting the docs with an imperfect memory of what you read before). So, I agree that no change is *required*. But adding the example of "the usual idiom" as you suggest seems like it might be worthwhile. I'm fine with either course of action (or inaction, as the case may be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:10:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 24 Oct 2012 01:10:26 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351041026.77.0.390156334177.issue8913@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! Reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:58:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:58:24 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1351069104.83.0.379728396614.issue16053@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> commit review type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:23:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:23:09 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1351070589.04.0.763612651379.issue16240@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:39:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:39:48 +0000 Subject: [docs] [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1351071588.01.0.395859735371.issue15984@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:43:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:43:12 +0000 Subject: [docs] [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1351071792.58.0.700581262276.issue15984@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a bug of 2 -> 3 transition. ---------- type: -> enhancement versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:43:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:43:35 +0000 Subject: [docs] [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1351071815.06.0.429206264243.issue15436@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:44:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 13:44:40 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351086280.29.0.455043731803.issue8913@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:47:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 15:47:57 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351093677.94.0.970538555025.issue16278@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 21:51:56 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Oct 2012 19:51:56 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1351108316.15.0.952078254832.issue16210@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This patch looks good. Ezio, if you agree, please apply it. ---------- assignee: docs at python -> ezio.melotti nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 22:07:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Oct 2012 20:07:54 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <3Xn2Zd5XLQzMsd@mail.python.org> Roundup Robot added the comment: New changeset 6dde85f2e4af by Ezio Melotti in branch '2.7': #16210: combine the two type() docs. Patch by Pete Sevander. http://hg.python.org/cpython/rev/6dde85f2e4af New changeset 997ab4f1530f by Ezio Melotti in branch '3.2': #16210: combine the two type() docs. Patch by Pete Sevander. http://hg.python.org/cpython/rev/997ab4f1530f New changeset 8f1d72106073 by Ezio Melotti in branch '3.3': #16210: merge with 3.2. http://hg.python.org/cpython/rev/8f1d72106073 New changeset fd69a6d1b0f0 by Ezio Melotti in branch 'default': #16210: merge with 3.3. http://hg.python.org/cpython/rev/fd69a6d1b0f0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 22:08:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:08:49 +0000 Subject: [docs] [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1351109329.68.0.735886219962.issue16210@psf.upfronthosting.co.za> Ezio Melotti added the comment: Done, thanks for the patch! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 22:23:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:23:27 +0000 Subject: [docs] [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1351110207.69.0.988028041664.issue15569@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 23:26:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:26:24 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351113984.69.0.120759243523.issue8913@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 23:59:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:59:12 +0000 Subject: [docs] [issue16317] Mention lzma module in tutorial Message-ID: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds link to lzma module (in additional to zlib, gzip, bz2, and zipfile) in tutorial. ---------- assignee: docs at python components: Documentation files: stdlib-lzma.patch keywords: patch messages: 173713 nosy: docs at python, nadeem.vawda, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mention lzma module in tutorial type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27703/stdlib-lzma.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 00:25:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 22:25:23 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351117523.04.0.020165855565.issue16278@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Chris, maybe you can guess better wording? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 01:11:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 23:11:02 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1351120261.93.0.0841214562344.issue11015@psf.upfronthosting.co.za> Ezio Melotti added the comment: > There are some other helper modules (such as test.script_helper) > that could also stand to be made easier to find. Documenting script_helper.py would be good too. I seem to remember some discussion about merging it with support.py -- if that happens it can be documented there, otherwise a separate section/file should be created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 05:22:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 03:22:49 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351135369.88.0.60030186998.issue16278@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Before we discuss wording, it's not clear to me whether all possibilities have been checked. I count 2*3*2=12 possibilities to check (excluding src and dst being on different filesystems): src: file or directory dst: file, empty directory, or non-empty directory os: Unix or Windows Also, do we have tests for all of these scenarios before we document it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:17:18 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 25 Oct 2012 05:17:18 +0000 Subject: [docs] [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351142238.27.0.0963448066306.issue13510@psf.upfronthosting.co.za> Chris Rebert added the comment: file.readlines() (and perhaps dare I say even file.readline()) should not even be mentioned in the tutorial, IMO. It is difficult to imagine a use case where just iterating over the file object isn't superior. I cannot remember the last time that I have used either of these methods. They ought to be relegated to the library docs. Presenting `for line in a_file:` as merely "An alternative approach" in the official tutorial is practically archaic. ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 08:06:38 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 25 Oct 2012 06:06:38 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351145198.77.0.207816775186.issue16241@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Andrew: Generally all changes deserve a Misc/NEWS entry, see: http://docs.python.org/devguide/committing.html#news-entries The feature was new in 3.3, but this change only went in after the release of 3.3.0, so ISTM that a Misc/NEWS entry is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:28:10 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 25 Oct 2012 07:28:10 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351150090.65.0.826203631969.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: No, the thought merely did not occur to me. I don't recall having seen such forward-looking notes in Python's documentation before. Should the pipes.quote() mention be axed from the 3.x patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:38:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Oct 2012 08:38:45 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <3XnMF03TvGzPPD@mail.python.org> Roundup Robot added the comment: New changeset e816851fb30d by Andrew Svetlov in branch '3.3': Update NEWS for issue #16241 http://hg.python.org/cpython/rev/e816851fb30d New changeset af93948ca33d by Andrew Svetlov in branch 'default': Update NEWS for issue #16241 http://hg.python.org/cpython/rev/af93948ca33d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:39:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 08:39:19 +0000 Subject: [docs] [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351154359.76.0.211125327035.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, I have updated the NEWS file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:51:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 13:51:30 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351173089.96.0.401190255081.issue14616@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think patch for 3.3 should mention only shlex.quote. I don't care about 2.7 patch but it looks good to me. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:56:33 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 13:56:33 +0000 Subject: [docs] [issue16272] C-API documentation clarification for tp_dictoffset In-Reply-To: <1350520063.61.0.687481658196.issue16272@psf.upfronthosting.co.za> Message-ID: <1351173393.26.0.5549394023.issue16272@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:57:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 13:57:35 +0000 Subject: [docs] [issue16323] Wrong C API documentation for locale encoding Message-ID: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The documentation for PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale() are wrong. The second parameter described as "int surrogateescape", but actually it is "const char *errors". ---------- assignee: docs at python components: Documentation, Unicode messages: 173760 nosy: docs at python, ezio.melotti, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Wrong C API documentation for locale encoding type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:36:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Oct 2012 14:36:54 +0000 Subject: [docs] [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351175813.95.0.539699828268.issue13510@psf.upfronthosting.co.za> ?ric Araujo added the comment: readlines might be discouraged; readline has its use cases (two days ago I used it to get one line to pass to csv.Sniffer.sniff), but next(file) works too, so it could be de-emphasized. There may be a difference with respect to the trailing newline however; I don?t remember if __iter__ or readline keep it or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:40:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 14:40:01 +0000 Subject: [docs] [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351176001.52.0.794986006865.issue13510@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:17:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 16:17:30 +0000 Subject: [docs] [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1351181850.16.0.15208403656.issue11160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The ZIP specification says: """ If general purpose bit 11 is unset, the file name and comment should conform to the original ZIP character encoding. If general purpose bit 11 is set, the filename and comment must support The Unicode Standard, Version 4.1.0 or greater using the character encoding form defined by the UTF-8 storage specification. The Unicode Standard is published by the The Unicode Consortium (www.unicode.org). UTF-8 encoded data stored within ZIP files is expected to not include a byte order mark (BOM). """ Also there is extension for UTF-8 encoded file comment. All this means the file comment should be interpreted as an unicode string. However the specification says nothing about .ZIP file comment (except that encryption or data authentication is applied to it). Since changeset 4186f20d9fa4 ZipFile.comment raises TypeError on try to assign non-bytes. I think the documentation should be clarified. ---------- components: -Library (Lib) nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:32:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 16:32:44 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1351182764.38.0.369718334628.issue11009@psf.upfronthosting.co.za> Ezio Melotti added the comment: Doing that now will be backward incompatible, because people might be using these functions already even if they are not documented. An alias could be created, but I'm not sure it's worth doing it. ---------- nosy: +ezio.melotti status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:20:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:20:17 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351185617.38.0.56111608403.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a patch that modifies some of the example in the section. - x = x * 2 - 1 - hypot2 = x * x + y * y + x = x*2 - 1 + hypot2 = x*x + y*y Here I used more space around operators with lower priority. - x = x*2 - 1 - hypot2 = x*x + y*y - c = (a+b) * (a-b) + x = x * 2-1 + hypot2 = x*x + y * y + c = a+b * a-b These 3 examples in the "No" section show respectively: 1) more space around the operator with higher priority; 2) inconsistent spacing around operators with the same priority; 3) misleading spacing (similar to 1); I don't think it's necessary to mention 'x * 2 - 1' in either sections, because it's not wrong, but otoh 'x*2 - 1' is a better alternative. ---------- assignee: docs at python -> ezio.melotti keywords: +patch nosy: +ezio.melotti stage: -> patch review Added file: http://bugs.python.org/file27713/issue16239.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:25:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:25:10 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1351185910.03.0.450994999895.issue16240@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would use "It is possible to remove" rather than "One can remove", but otherwise the patch LGTM. ---------- nosy: +eric.araujo, ezio.melotti, terry.reedy stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:32:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:32:47 +0000 Subject: [docs] =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_?= =?utf-8?q?to_PEP_8?= Message-ID: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: PEP?8 refers to Guido's original Python Style Guide essay (http://www.python.org/doc/essays/styleguide.html), but the essay was removed, only link to PEP?8 (and PEP 257) left. ---------- assignee: docs at python components: Documentation messages: 173773 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: PEP?8 refers to reference to PEP 8 type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:35:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:35:43 +0000 Subject: [docs] =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_?= =?utf-8?q?to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351186543.69.0.325312015885.issue16325@psf.upfronthosting.co.za> Ezio Melotti added the comment: The link might still be OK, otherwise we could copy the note directly in the PEP. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:40:13 2012 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 25 Oct 2012 17:40:13 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1351186813.62.0.110274364871.issue16240@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Better (IMO): Wrap the meta-characters in brackets for a literal match. For example, ``'[?]'`` matches the character ``'?'``. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:41:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:41:16 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351186876.4.0.833591007325.issue16239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >- x = x * 2 - 1 >- hypot2 = x * x + y * y Why you remove this? >- c = (a+b) * (a-b) >+ c = a+b * a-b This changes the semantic. >but otoh 'x*2 - 1' is a better alternative. Can you justify this? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:44:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:44:08 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351187048.37.0.418479712073.issue14616@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I think patch for 3.3 should mention only shlex.quote. +1 I'm not sure what's the best thing to do about pipes.quote. Pointing to an undocumented function that is available in 3.3 in a different module doesn't sound like a really good idea. Maybe we could document pipes.quote as an internal/deprecated function so that people that follow the link from the subprocess docs will be aware that the function is available under a different name in 3.3+. Otherwise we could just document shlex.quote() in 3.3+. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:50:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:50:21 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351187421.67.0.142747290225.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: > >- x = x * 2 - 1 > >- hypot2 = x * x + y * y > > Why you remove this? As I explained in my previous message, even if valid, these are IMHO less clear than x*2 - 1 and x*x + y*y. > >- c = (a+b) * (a-b) > >+ c = a+b * a-b > > This changes the semantic. It does indeed, but I think it's worth pointing out that misleading spacing should be avoided. Maybe a different example could be used. > >but otoh 'x*2 - 1' is a better alternative. > > Can you justify this? x*2 - 1 gives a visual hint of what gets executed first, x * 2-1 gives a wrong/misleading hint of what gets executed first, x * 2 - 1 gives no hint at all. I think that providing the correct hint is better than not providing any hints (and clearly better than providing the wrong hint!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:51:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:51:37 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1351187497.91.0.190808060791.issue16240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My patch was only example. Commit what you feel is better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:55:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:55:24 +0000 Subject: [docs] [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1351187724.65.0.260919975215.issue16240@psf.upfronthosting.co.za> Ezio Melotti added the comment: For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the character ``'?'``. Stating the goal at the beginning of the sentence will make this easier to find while skimming through the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:57:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:57:06 +0000 Subject: [docs] =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_?= =?utf-8?q?to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351187826.44.0.919236426264.issue16325@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think there is no sense to refer to removed document. If Guido's original essay saved somewhere, than PEP 8 should refer to this copy. Otherwise meaningless link should be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:03:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 18:03:22 +0000 Subject: [docs] =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_?= =?utf-8?q?to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351188202.47.0.254839621192.issue16325@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you think something like the attached patch would be OK? ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27714/issue16325.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:04:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:04:05 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351188244.99.0.491635990084.issue16239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > As I explained in my previous message, even if valid, these are IMHO less clear than x*2 - 1 and x*x + y*y. I don't feel this. Anyone else feel this? It seems to me, this is a serious change in the Style Guide. > It does indeed, but I think it's worth pointing out that misleading spacing should be avoided I think this example shows that even without misleading such spacing is not good. The destructiveness of misleading spacing is evident for all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:11:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 18:11:41 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351188701.88.0.806836625841.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: As I see it: For c = (a + b) * (a - b) the hint (and the actual priority) is given by the (), the spaces around the +/- are not necessary but don't affect readability. For c = (a+b) * (a-b) the hints are given both by the () and the spacing, the lack of spaces around the +/- is not necessary but doesn't affect readability. For c = a+b * a-b the hints are given both by the spacing and they are wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:16:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:16:44 +0000 Subject: [docs] =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_?= =?utf-8?q?to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351189004.29.0.952827588375.issue16325@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM, but I'm not well competent to assess these changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 21:10:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 19:10:34 +0000 Subject: [docs] [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1351192234.48.0.799843741836.issue16155@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 23:44:02 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Oct 2012 21:44:02 +0000 Subject: [docs] [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1351201442.6.0.276094891594.issue16243@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch that adds an example of using `inspect.formatargspec`. ---------- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file27718/inspect-formatargspec-example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:32:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 26 Oct 2012 05:32:12 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351229532.37.0.204305206804.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Thanks for the feedback! Over the weekend I will make sure the documentation and test cases cover all possibilities. I have not worked with test suite but I will do my best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:29:56 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 10:29:56 +0000 Subject: [docs] [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1351247396.85.0.829479931355.issue11468@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:46:56 2012 From: report at bugs.python.org (=?utf-8?q?Peter_W=C3=BCrtz?=) Date: Fri, 26 Oct 2012 15:46:56 +0000 Subject: [docs] [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351266416.87.0.762204404639.issue16239@psf.upfronthosting.co.za> Peter W?rtz added the comment: >> x * 2 - 1 is less clear than x*2 - 1 > I don't feel this. Anyone else feel this? I strongly feel so. And if you don't take my word for it, just open any math book or look at any formula and recognize that it is the general consensus that the elements of a product are written close together whereas the spacing between two summands is considerably larger. Typically, the dots between products are omitted to reduce the spacing even further. Trying to educate people to do otherwise is just weird, isn't it? > It seems to me, this is a serious change in the Style Guide. Actually it isn't. Even the current style guide says that there should be an increased amount of spacing around operators of low(est) priority. The serious change happened when the old rule "always use exactly one space around all arithmetic operators" fell, which certainly was a good call. I've seen arguments on mailing lists whether to use x ** 2 + 1 instead of x**2 + 1 based on that rule. I hardly doubt that anyone prefers x ** 2 + 1 over x**2 + 1, so neither should the style guide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 18:16:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 16:16:07 +0000 Subject: [docs] [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xp9LG04bPzPBj@mail.python.org> Roundup Robot added the comment: New changeset 361beec678e1 by Ezio Melotti in branch '2.7': #16206: Improve examples about dict construction. http://hg.python.org/cpython/rev/361beec678e1 New changeset eb999002916c by Ezio Melotti in branch '3.2': #16206: Improve examples about dict construction. http://hg.python.org/cpython/rev/eb999002916c New changeset 2c1fff6f8956 by Ezio Melotti in branch '3.3': #16206: merge with 3.2. http://hg.python.org/cpython/rev/2c1fff6f8956 New changeset 46ce82b4c1fa by Ezio Melotti in branch 'default': #16206: merge with 3.3. http://hg.python.org/cpython/rev/46ce82b4c1fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 18:29:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 16:29:55 +0000 Subject: [docs] [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1351268995.14.0.996675454156.issue16304@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 18:35:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 16:35:13 +0000 Subject: [docs] [issue16317] Mention lzma module in tutorial In-Reply-To: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> Message-ID: <3Xp9mJ2VD9zMVN@mail.python.org> Roundup Robot added the comment: New changeset 2fc18ba8ca4a by Ezio Melotti in branch '3.3': #16317: mention lzma in the tutorial. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/2fc18ba8ca4a New changeset f2f615b5718a by Ezio Melotti in branch 'default': #16317: merge with 3.3. http://hg.python.org/cpython/rev/f2f615b5718a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 18:35:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 16:35:42 +0000 Subject: [docs] [issue16317] Mention lzma module in tutorial In-Reply-To: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> Message-ID: <1351269342.58.0.218870968699.issue16317@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:14:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 17:14:24 +0000 Subject: [docs] [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351271664.14.0.838806623958.issue8040@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek title: It would be nice if documentation pages linked to other versions of the same document -> documentation pages should link to other versions of the same page _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:34:21 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:34:21 +0000 Subject: [docs] [issue16331] Add a version switcher to python docs site Message-ID: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> New submission from Yury Selivanov: This patch adds a dropdown to python documentation top toolbar: https://dl.dropbox.com/u/21052/python/p3_doc_dd.png This patch version is for python 3.3 & 3.4 docs theme, but I can quickly make patches for 3.2-style and below. JavaScript that monitors dropdown events is smart enough to: 1) Redirect users to the same documentation section, i.e. if the user is on 'atexit' module doc page for 3.3, and decides to switch to '2.7', he'll see 'atexit' module doc page for 2.7 2) Before making a redirect, is checks that the doc page exists for the selected python version, and if not, then it simply redirects to 'http://docs.python.org/{version}' 3) Users with JS disabled will see a plain-text current version (no drop down) ---------- assignee: docs at python components: Documentation files: py3_version_switch.patch keywords: patch messages: 173864 nosy: docs at python, georg.brandl, rhettinger, yselivanov priority: normal severity: normal status: open title: Add a version switcher to python docs site versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27731/py3_version_switch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:34:31 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:34:31 +0000 Subject: [docs] [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351272871.37.0.623617383312.issue16331@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:37:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 17:37:25 +0000 Subject: [docs] [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351273045.07.0.0847635714042.issue16331@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch. What happens if the module doesn't exist in a previous version or if it has a different name? It's probably not necessary to include all those versions. ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:39:12 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:39:12 +0000 Subject: [docs] [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351273152.8.0.142616638021.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: > What happens if the module doesn't exist in a previous version or if it has a different name? As I said in the first message: """ 2) Before making a redirect, is checks that the doc page exists for the selected python version, and if not, then it simply redirects to 'http://docs.python.org/{version}' """ That's the most sane method I can imagine. ---------- _______________________________________ Python tracker _______________________________________ From ezio.melotti at gmail.com Fri Oct 26 19:48:52 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Fri, 26 Oct 2012 17:48:52 -0000 Subject: [docs] Add a version switcher to python docs site (issue 16331) Message-ID: <20121026174852.31411.67644@psf.upfronthosting.co.za> http://bugs.python.org/review/16331/diff/6400/Doc/conf.py File Doc/conf.py (right): http://bugs.python.org/review/16331/diff/6400/Doc/conf.py#newcode72 Doc/conf.py:72: html_short_title = 'Documentation' I would leave this unchanged, in order to have the right title when js is not available. http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/layout.html File Doc/tools/sphinxext/layout.html (right): http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/layout.html#newcode7 Doc/tools/sphinxext/layout.html:7: {{ release }} This should probably be wrapped in an {% if not embedded %} http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/static/version_switch.js File Doc/tools/sphinxext/static/version_switch.js (right): http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/static/version_switch.js#newcode4 Doc/tools/sphinxext/static/version_switch.js:4: var all_versions = ['3.4', '3.3', '3.2', '3.1', '3.0', I would drop 3.0 for sure, and possibly even 3.1 and >=2.4/5. The 3.4 version should have some kind of marker to show that it's the in-development version (something like 'dev (3.4)'). http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/static/version_switch.js#newcode46 Doc/tools/sphinxext/static/version_switch.js:46: var url_re = /\.org\/(py3k|release\/\d\.\d[\w\d\.]*|\d\.\d[\w\d\.]*)\//, (py3k|release\/\d\.\d[\w\d\.]*|\d\.\d[\w\d\.]*) is equal to (py3k|(?:release\/)?\d\.\d[\w\d\.]*) http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/static/version_switch.js#newcode46 Doc/tools/sphinxext/static/version_switch.js:46: var url_re = /\.org\/(py3k|release\/\d\.\d[\w\d\.]*|\d\.\d[\w\d\.]*)\//, It would be nice if this also worked on local copies of the doc, but that depends on the dir layout. http://bugs.python.org/review/16331/ From yselivanov.ml at gmail.com Fri Oct 26 19:53:25 2012 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Fri, 26 Oct 2012 17:53:25 -0000 Subject: [docs] Add a version switcher to python docs site (issue 16331) Message-ID: <20121026175325.27384.38905@psf.upfronthosting.co.za> Reviewers: ezio.melotti, http://bugs.python.org/review/16331/diff/6400/Doc/conf.py File Doc/conf.py (right): http://bugs.python.org/review/16331/diff/6400/Doc/conf.py#newcode72 Doc/conf.py:72: html_short_title = 'Documentation' On 2012/10/26 19:48:52, ezio.melotti wrote: > I would leave this unchanged, in order to have the right title when js is not > available. Eric, If JS is not available, then '''''' will contain the release number, hence, for the user it will look like docs without this patch applied. Please review this at http://bugs.python.org/review/16331/ Affected files: Doc/conf.py Doc/tools/sphinxext/layout.html Doc/tools/sphinxext/static/version_switch.js diff --git a/Doc/conf.py b/Doc/conf.py index 6b085e0..b9eb9f4 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -69,7 +69,7 @@ html_theme = 'pydoctheme' html_theme_path = ['tools/sphinxext'] html_theme_options = {'collapsiblesidebar': True} -html_short_title = '%s Documentation' % release +html_short_title = 'Documentation' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html index 3f68a00..bebb0a4 100644 --- a/Doc/tools/sphinxext/layout.html +++ b/Doc/tools/sphinxext/layout.html @@ -3,11 +3,17 @@
  • Python{{ reldelim1 }}
  • -
  • {{ shorttitle }}{{ reldelim1 }}
  • +
  • + {{ release }} + {{ shorttitle }}{{ reldelim1 }} +
  • {% endblock %} {% block extrahead %} - {% if not embedded %}{% endif %} + {% if not embedded %} + + + {% endif %} {% if pagename == 'whatsnew/changelog' %}