Re: [Python-Dev] Continuing 2.x

2010-10-31 Thread Nick Coghlan
On Sun, Oct 31, 2010 at 10:41 AM, Terry Reedy tjre...@udel.edu wrote: The few issues that would get such a 2.7+ tag can just as well be marked 2.7/closed/postponed. Using closed+postponed as the resolution for 2.x specific feature requests sounds fine. Feature requests that are also applicable

Re: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py

2010-10-31 Thread Nick Coghlan
On Fri, Oct 29, 2010 at 10:38 AM, victor.stinner python-check...@python.org wrote:     try: -        path_list = env.get('PATH') +        # ignore BytesWarning warning +        with warnings.catch_warnings(record=True): +            path_list = env.get('PATH') This looks odd to me. You're

Re: [Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py

2010-10-31 Thread Nick Coghlan
On Sun, Oct 31, 2010 at 9:56 AM, brian.curtin python-check...@python.org wrote: Author: brian.curtin Date: Sun Oct 31 01:56:45 2010 New Revision: 86000 Log: Fix ResourceWarning about unclosed file Modified:   python/branches/py3k/Lib/test/test_fileio.py Modified:

Re: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py

2010-10-31 Thread Nick Coghlan
On Mon, Nov 1, 2010 at 12:01 AM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Oct 29, 2010 at 10:38 AM, victor.stinner python-check...@python.org wrote:     try: -        path_list = env.get('PATH') +        # ignore BytesWarning warning +        with warnings.catch_warnings(record=True):

Re: [Python-Dev] Change to logging Formatters: support for alternative format styles

2010-10-31 Thread Vinay Sajip
Eric Smith eric at trueblade.com writes: I keep meaning to review this but haven't had time. One thing I want to look at specifically is the ability to put the time formatting into the str.format version of the format string. Now that the time format specifier can be included in the format

Re: [Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py

2010-10-31 Thread Brian Curtin
On Sun, Oct 31, 2010 at 09:20, Nick Coghlan ncogh...@gmail.com wrote: On Sun, Oct 31, 2010 at 9:56 AM, brian.curtin python-check...@python.org wrote: Author: brian.curtin Date: Sun Oct 31 01:56:45 2010 New Revision: 86000 Log: Fix ResourceWarning about unclosed file Modified:

Re: [Python-Dev] Change to logging Formatters: support for alternative format styles

2010-10-31 Thread Vinay Sajip
Olemis Lang olemis at gmail.com writes: On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw barry at python.org wrote: I haven't played with it yet, but do you think it makes sense to add a 'style' keyword argument to basicConfig()?  That would make it pretty easy to get the formatting style

Re: [Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py

2010-10-31 Thread Nick Coghlan
On Mon, Nov 1, 2010 at 12:55 AM, Brian Curtin brian.cur...@gmail.com wrote: It gets created in the try block above, so the file was being created twice but deleted once. Ah, right. My brain read that else: as an except clause for some reason (possibly a sign that I should have gone to bed a

Re: [Python-Dev] Change to logging Formatters: support for alternative format styles

2010-10-31 Thread R. David Murray
On Sun, 31 Oct 2010 14:55:34 -, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Olemis Lang olemis at gmail.com writes: On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw barry at python.org wrote: I haven't played with it yet, but do you think it makes sense to add a 'style' keyword

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Barry Warsaw
On Oct 29, 2010, at 08:14 PM, Raymond Hettinger wrote: I would like to simplify and clean-up the API for the unittest module by de-documenting assertSetEqual(), assertDictEqual(), assertListEqual, and assertTupleEqual(). As a general principle, I think all public API methods should be

Re: [Python-Dev] Continuing 2.x

2010-10-31 Thread Barry Warsaw
On Oct 29, 2010, at 04:23 PM, Benjamin Peterson wrote: At the moment, I'm planning to do regular maintenance releases for 3.1 and 2.7 roughly every 6 months. Cool. The actual interval doesn't matter as much as the regularity. I say that speaking as a semi-former RM who sadly didn't adhere to

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Gregory P. Smith
On Sun, Oct 31, 2010 at 9:11 AM, Barry Warsaw ba...@python.org wrote: On Oct 29, 2010, at 08:14 PM, Raymond Hettinger wrote: I would like to simplify and clean-up the API for the unittest module by de-documenting assertSetEqual(), assertDictEqual(), assertListEqual, and assertTupleEqual().

Re: [Python-Dev] r86046 - python/branches/py3k/Lib/test/test_smtplib.py

2010-10-31 Thread Antoine Pitrou
On Sun, 31 Oct 2010 18:15:43 +0100 (CET) benjamin.peterson python-check...@python.org wrote: # SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they # require a synchronous read to obtain the credentials...so instead smtpd @@ -503,6 +504,7 @@ except

[Python-Dev] test_grp regression test fails with NIS entries present

2010-10-31 Thread Bobby Impollonia
The regression tests for py3k (or, I think, any branch) fail on one of my machines because test_grp chokes if /etc/group contains a + line, which is a directive to pull information from NIS. The test enumerates all entries in /etc/group using grp.getgrall() and verifies that it can look up each

[Python-Dev] str.format_from_mapping

2010-10-31 Thread Eric Smith
What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested format_map) to 3.2? See http://bugs.python.org/issue6081 . This method would be similar to %(foo)s %(bar)s % d, where d is a dict (or rather any mapping object), but of course would use str.format

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Antoine Pitrou
On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smith e...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested format_map) to 3.2? See http://bugs.python.org/issue6081 . This method would be similar to %(foo)s %(bar)s % d, where d

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Benjamin Peterson
2010/10/31 Antoine Pitrou solip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smith e...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested format_map) to 3.2? See http://bugs.python.org/issue6081 . This method would

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Antoine Pitrou
On Sun, 31 Oct 2010 16:02:08 -0500 Benjamin Peterson benja...@python.org wrote: 2010/10/31 Antoine Pitrou solip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smith e...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the

Re: [Python-Dev] r86046 - python/branches/py3k/Lib/test/test_smtplib.py

2010-10-31 Thread Terry Reedy
On 10/31/2010 1:44 PM, Antoine Pitrou wrote: On Sun, 31 Oct 2010 18:15:43 +0100 (CET) benjamin.petersonpython-check...@python.org wrote: # SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they # require a synchronous read to obtain the credentials...so instead

Re: [Python-Dev] [Python-checkins] r86066 - python/branches/py3k/Doc/library/functions.rst

2010-10-31 Thread Alexander Belopolsky
On Sun, Oct 31, 2010 at 5:23 PM, raymond.hettinger python-check...@python.org wrote: .. +   For some use cases, there a good alternatives to :func:`sum`. This sentence is missing a verb. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Glenn Linderman
On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrousolip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smithe...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested format_map) to 3.2?

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Benjamin Peterson
2010/10/31 Glenn Linderman v+pyt...@g.nevcal.com: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrou solip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smith e...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Eric Smith
On 10/31/2010 6:28 PM, Glenn Linderman wrote: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrousolip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smithe...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Matthew Woodcraft
Raymond Hettinger raymond.hettin...@gmail.com wrote: I looked at this again and think we should just remove assertItemsEqual() from Py3.2 and dedocument it in Py2.7. It is listed as being new in 3.2 so nothing is lost. One thing that would be lost is that correct Python 2.7 code using

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Glenn Linderman
On 10/31/2010 3:32 PM, Eric Smith wrote: On 10/31/2010 6:28 PM, Glenn Linderman wrote: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrousolip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smithe...@trueblade.com wrote: What are your thoughts on adding

Re: [Python-Dev] [Python-checkins] r85934 - in python/branches/py3k: Misc/NEWS Modules/socketmodule.c

2010-10-31 Thread Scott Dial
On 10/30/2010 4:08 PM, Martin v. Löwis wrote: I think size should be in TCHARs, not in bytes. (MSDN says so) And GetComputerName's signature differs from MSDN. (Maybe should use GetComputerNameExW again?) You are right. So how about this patch? Still not quite right. The call to

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Benjamin Peterson
2010/10/31 Glenn Linderman v+pyt...@g.nevcal.com: On 10/31/2010 3:32 PM, Eric Smith wrote: On 10/31/2010 6:28 PM, Glenn Linderman wrote: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrousolip...@pitrou.net:   On Sun, 31 Oct 2010 16:39:44 -0400   Eric

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Barry Warsaw
On Oct 31, 2010, at 09:54 AM, Gregory P. Smith wrote: - moving the documentation to an advanced or complete reference section Agreed, I perfer simply deemphasizing these methods by reorganizing the documentation and mentioning in their documentation to, just use assertEqual. De-documenting

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Barry Warsaw
On Oct 31, 2010, at 04:39 PM, Eric Smith wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested format_map) to 3.2? +1 for the shorter name. -Barry signature.asc Description: PGP signature ___

Re: [Python-Dev] new buffer in python2.7

2010-10-31 Thread Kristján Valur Jónsson
You just moved your copying down one level into stream.read(). This magic function must be implemented by possibly concatenating several socket.recv() calls. This invariably involves data copying, either by .join() or stringio.write() K -Original Message- From:

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Michael Foord
On 30/10/2010 06:56, Raymond Hettinger wrote: On Oct 29, 2010, at 9:11 PM, Michael Foord wrote: Just to clarify. The following fails in Python 3: sorted([3, 1, 2, None]) If you want to compare that two iterables containing heterogeneous types have the same members then it is tricky to