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

2010-10-30 Thread Antoine Pitrou
On Fri, 29 Oct 2010 20:14:27 -0700 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(). +1 from me. Regards Antoine. _

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

2010-10-30 Thread Antoine Pitrou
On Sat, 30 Oct 2010 12:02:27 -0400 "R. David Murray" wrote: > > I don't disagree with this simplification, but given that you all want > to pare down the unittest API, I'd be interested in your opinions on > issue 10164. Because the assertBytesEqual method takes an optional > argument, it seems

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

2010-10-30 Thread Antoine Pitrou
On Sat, 30 Oct 2010 14:24:10 -0400 "R. David Murray" wrote: > On Sat, 30 Oct 2010 18:36:45 +0200, Antoine Pitrou > wrote: > > On Sat, 30 Oct 2010 12:02:27 -0400 > > "R. David Murray" wrote: > > > > > > I don't disagree with this s

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 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 smtplib.SMTPAuthentica

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Antoine Pitrou
On Sun, 31 Oct 2010 16:39:44 -0400 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? See > http://bugs.python.org/issue6081 . This method would be similar to > "%(foo)s %(bar)s" % d, where d is a dict (o

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Antoine Pitrou
On Sun, 31 Oct 2010 16:02:08 -0500 Benjamin Peterson wrote: > 2010/10/31 Antoine Pitrou : > > On Sun, 31 Oct 2010 16:39:44 -0400 > > Eric Smith wrote: > > > >> What are your thoughts on adding a str.format_from_mapping (or similar > >> name, maybe

[Python-Dev] Stable sort and partial order

2010-11-01 Thread Antoine Pitrou
On Mon, 01 Nov 2010 02:55:35 + Michael Foord wrote: > Having a more efficient 'slow-path' and moving to that by default would > fix it. The bug is only a duplicate of the bug in sorted - caused by the > fact that sets / frozensets can't be sorted in the standard Python way > (their less tha

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-02 Thread Antoine Pitrou
Le mardi 02 novembre 2010 à 15:47 -0700, Raymond Hettinger a écrit : > > What is it you're seeing as a risk that I'm not seeing? > Are we permanently locked into the exact ten filenames > that are currently used: utils, suite, loader, case, result, main, > signals, etc? > Is the file structure no

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-02 Thread Antoine Pitrou
Le mardi 02 novembre 2010 à 16:20 -0700, Raymond Hettinger a écrit : > > For example, to find-out what assert.ItemsEqual does, I have > to figure-out that it was put in the case.py file. Well, it's a TestCase method, so it seems rather intuitive to look for it in case.py. Regards Antoine. ___

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-02 Thread Antoine Pitrou
Le mardi 02 novembre 2010 à 16:32 -0700, Raymond Hettinger a écrit : > On Nov 2, 2010, at 4:00 PM, Brett Cannon wrote: > >> Are we permanently locked into the exact ten filenames > >> that are currently used: utils, suite, loader, case, result, main, > >> signals, > >> etc? > >> Is the file struc

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-02 Thread Antoine Pitrou
On Wed, 03 Nov 2010 11:47:55 +1100 Ben Finney wrote: > > > If someone wants to depend on some undocumented detail of the > > directory layout it's their problem (like people depending on bytecode > > and other stuff). > > I would say that names without a single leading underscore are part of > t

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-02 Thread Antoine Pitrou
On Tue, 2 Nov 2010 19:57:48 -0700 Brett Cannon wrote: > > > > How could we have split the module into a package in a way that matched the > > API, whilst still retaining backwards compatibility with the old API? We had > > no choice but to export the public names at the top level. > > I'm not dis

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Antoine Pitrou
Le mercredi 03 novembre 2010 à 14:16 +, Michael Foord a écrit : > On 03/11/2010 14:05, Nick Coghlan wrote: > > On Wed, Nov 3, 2010 at 9:32 AM, Raymond Hettinger > > wrote: > >> Sounds like a decision to split a module into a package is a big > >> commitment. Each of the individual file name

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Antoine Pitrou
Le mercredi 03 novembre 2010 à 14:26 +, Michael Foord a écrit : > > Interesting. We made some fixes before 2.7 to ensure they were copyable, > but we fixed this in the copy module. TestCase instances now store some > method objects in a dictionary which may make them unpickleable, so that >

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Antoine Pitrou
On Wed, 03 Nov 2010 19:26:53 + Michael Foord wrote: > > Antoine is firmly of the opinion that making TestCase instances > unpickleable is a feature... Apparently you didn't really understand me. I'm of the opinion that making TestCase instances pickleable is useless if that pickling doesn't

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Antoine Pitrou
Le mercredi 03 novembre 2010 à 15:48 -0400, Jesse Noller a écrit : > On Wed, Nov 3, 2010 at 3:45 PM, Antoine Pitrou wrote: > > On Wed, 03 Nov 2010 19:26:53 + > > Michael Foord wrote: > >> > >> Antoine is firmly of the opinion that making TestCase instanc

Re: [Python-Dev] Python-3 transition in Arch Linux

2010-11-04 Thread Antoine Pitrou
On Thu, 4 Nov 2010 23:33:38 +1000 Nick Coghlan wrote: > Tools also had a few discrepancies: > scripts/2to3.py: /usr/bin/env python (necessary, I think - I believe > 2to3 is a 2.x only program) > scripts/gprof2html.py: /usr/bin/env python32.3 (Huh? Automated > correction gone wrong, perhaps?)

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

2010-11-04 Thread Antoine Pitrou
On Thu, 04 Nov 2010 23:09:39 +0900 Hirokazu Yamamoto wrote: > On 2010/11/02 1:30, Nick Coghlan wrote: > > On Tue, Nov 2, 2010 at 2:10 AM, Hirokazu Yamamoto > > wrote: > >> Does this really cause resource warning? I think os.popen instance > >> won't be into traceback because it's not declared as

Re: [Python-Dev] [Python-checkins] r86264 - python/branches/release27-maint/Lib/distutils/sysconfig.py

2010-11-07 Thread Antoine Pitrou
On Sun, 07 Nov 2010 09:01:22 +0100 "Martin v. Löwis" wrote: > > > If I were going to maintain 2.7 > > for several years, I would want to have the benefit of gradual > > improvements that make maintainance easier. > > I question whether cleanup on a maintenance branch makes maintenance > easier.

Re: [Python-Dev] r86276 - python/branches/py3k/Lib/distutils/cygwinccompiler.py

2010-11-07 Thread Antoine Pitrou
On Sat, 6 Nov 2010 19:03:53 +0100 (CET) eric.araujo wrote: > Author: eric.araujo > Date: Sat Nov 6 19:03:52 2010 > New Revision: 86276 > > Log: > Fix #10252 again (hopefully definitely). Patch by Brian Curtin. It seems this and previous fixes should be backported to 2.7. Regards Antoine.

Re: [Python-Dev] Snakebite, buildbot and low hanging fruit -- feedback wanted! (Was Re: SSH access against buildbot boxes)

2010-11-07 Thread Antoine Pitrou
On Sun, 7 Nov 2010 06:24:59 -0500 Trent Nelson wrote: > (And if we feel like bringing IRIX/MIPS > and Tru64/Alphas back as primary platforms, we've got the hardware to do > that, too ;-).) Unless you want to rename your project zombiebite, it would probably be better not to resurrect those old

Re: [Python-Dev] Buildbot for AIX

2010-11-08 Thread Antoine Pitrou
Le lundi 08 novembre 2010 à 18:46 +0100, Sébastien Sablé a écrit : > xlc: 1501-216 (W) command option - -qmaxmem=18000 is not recognized - > passed to ld Is -qmaxmem really necessary to build Python? If so, you could try passing it in CFLAGS. > However running 2 different slaves per host in orde

Re: [Python-Dev] r86351 - python/branches/py3k/Lib/tempfile.py

2010-11-09 Thread Antoine Pitrou
On Tue, 9 Nov 2010 04:43:58 +0100 (CET) raymond.hettinger wrote: > Author: raymond.hettinger > Date: Tue Nov 9 04:43:58 2010 > New Revision: 86351 > > Log: > Simplify code > > Modified: >python/branches/py3k/Lib/tempfile.py > > Modified: python/branches/py3k/Lib/tempfile.py >

Re: [Python-Dev] Breaking undocumented API

2010-11-09 Thread Antoine Pitrou
On Tue, 09 Nov 2010 02:03:23 - exar...@twistedmatrix.com wrote: > > I wonder if there are any actual technical arguments to be made against > something like `deprecatedModuleAttribute`? For example, does it work well with import hacks such as Mercurial's demandimport? Regards Antoine. __

Re: [Python-Dev] r86355 - python/branches/py3k/Modules/_pickle.c

2010-11-09 Thread Antoine Pitrou
On Tue, 9 Nov 2010 11:23:23 -0500 Alexander Belopolsky wrote: > On Tue, Nov 9, 2010 at 4:39 AM, victor.stinner > wrote: > .. > > Log: > > Issue #10359: Remove useless comma, invalid in ISO C > > C99 allows it. Which compiler is giving you trouble? One part of the answer is that we generally tr

Re: [Python-Dev] Breaking undocumented API

2010-11-11 Thread Antoine Pitrou
On Thu, 11 Nov 2010 15:18:40 + Michael Foord wrote: > On 11/11/2010 15:17, Łukasz Langa wrote: > > Am 11.11.2010 16:05, schrieb Barry Warsaw: > >> Agreed, though I wouldn't *remove* __all__'s, I would establish a > >> convention > >> where they can be generated programmatically. Keeping __al

Re: [Python-Dev] Removal of Win32 ANSI API

2010-11-11 Thread Antoine Pitrou
On Thu, 11 Nov 2010 16:10:35 + Tim Golden wrote: > On 11/11/2010 16:07, Hirokazu Yamamoto wrote: > > Hello. Is it possible to remove Win32 ANSI API (ie: GetFileAttributesA) > > and only use Win32 WIDE API (ie: GetFileAttributesW)? > > Mainly in posixmodule.c. > > I think we can simplify the co

Re: [Python-Dev] Breaking undocumented API

2010-11-11 Thread Antoine Pitrou
On Thu, 11 Nov 2010 13:40:36 -0500 Alexander Belopolsky wrote: > On Thu, Nov 11, 2010 at 7:01 AM, Michael Foord > wrote: > .. > >> I don't understand why everyone seem to have accepted Michael's > >> premise that "we don't have a clearly stated policy for what defines > >> the public API of stand

Re: [Python-Dev] Removal of Win32 ANSI API

2010-11-11 Thread Antoine Pitrou
On Thu, 11 Nov 2010 20:44:52 +0100 "Martin v. Löwis" wrote: > > How do you support cross-platform code using bytes filenames? > > IIRC, it has already been argued that it was an important feature. Many > > filesystem-related utilities might prefer to handle filenames in bytes > > form. > > It wou

Re: [Python-Dev] Removal of Win32 ANSI API

2010-11-12 Thread Antoine Pitrou
On Fri, 12 Nov 2010 13:13:08 +0100 Victor Stinner wrote: > On Thursday 11 November 2010 21:02:43 Antoine Pitrou wrote: > > On Thu, 11 Nov 2010 20:44:52 +0100 > > > > "Martin v. Löwis" wrote: > > > > How do you support cross-platform code using bytes f

Re: [Python-Dev] r86418 - in python/branches/release27-maint: Doc/library/difflib.rst Lib/difflib.py Lib/test/test_difflib.py Misc/NEWS

2010-11-12 Thread Antoine Pitrou
Hello, On Fri, 12 Nov 2010 00:22:19 +0100 (CET) terry.reedy wrote: > + > + .. versionadded:: 2.7 > + The *autojunk* parameter. Maybe I've missed something, but is there any reason to add a new parameter in a bugfix release? (apart from security issues) Regards Antoine. __

Re: [Python-Dev] buildbot master update

2010-11-12 Thread Antoine Pitrou
On Fri, 12 Nov 2010 20:53:00 +0100 "Martin v. Löwis" wrote: > > Thanks Martin, for all you do to keep our infrastructure humming along > > smoothly, including the recent Roundup migration. > > I just write the announcements :-) In this case. thanks should also > extend to Izak Burger of Upfront H

Re: [Python-Dev] Breaking undocumented API

2010-11-13 Thread Antoine Pitrou
On Fri, 12 Nov 2010 20:38:16 -0800 Guido van Rossum wrote: > > Note that __all__ was originally invented to give "from package import > *" a well-defined meaning when the package included submodules that > might not have been loaded yet. Using it for other export control > (while a good idea) cou

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

2010-11-13 Thread Antoine Pitrou
On Fri, 12 Nov 2010 20:31:49 -0500 Terry Reedy wrote: > > > class NetworkedNNTP_SSLTests(NetworkedNNTPTestsMixin, > > unittest.TestCase): > > -NNTP_HOST = 'snews.gmane.org' > > -GROUP_NAME = 'gmane.comp.python.devel' > > -GROUP_PAT = 'gmane.comp.python.d*' > > gman

[Python-Dev] Stable buildbots

2010-11-13 Thread Antoine Pitrou
Hi, Just to let you know that we now have 8 stable buildbots, including Barry's own PPC Ubuntu machine (even though the Windows buildbots give a rather unconventional meaning to the word "stability"). Right now they are mostly green: http://www.python.org/dev/buildbot/all/waterfall?category=3.x.

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

2010-11-13 Thread Antoine Pitrou
On Sat, 13 Nov 2010 07:30:05 -0500 James Y Knight wrote: > On Nov 13, 2010, at 7:08 AM, Antoine Pitrou wrote: > > Funny, it shows that the NNTP SSL tests don't check the certificate, > > then. > > Unsurprising, given that you need 140 lines of pretty non-obvious pytho

Re: [Python-Dev] Removal of Win32 ANSI API

2010-11-13 Thread Antoine Pitrou
On Sun, 14 Nov 2010 01:06:55 +0100 Victor Stinner wrote: > > The code is currently working. The question is if we have to drop the ANSI > API > now, later or never. If the code is currently working and isn't a security hole, then we obviously don't "have to". Apparently several developers "wan

Re: [Python-Dev] PEP 385: Formatting of Hg checkin notifications

2010-11-14 Thread Antoine Pitrou
On Sun, 14 Nov 2010 19:27:22 +0100 "Martin v. Löwis" wrote: > > I suspect my hg-fu is inadequate to at this point - I get an 'access > > to repository "hg.python.org/hooks" not permitted' error when I try to > > push the modified file to "ssh://h...@hg.python.org/hooks". > > Try > > ssh://h...@h

Re: [Python-Dev] Breaking undocumented API

2010-11-16 Thread Antoine Pitrou
On Tue, 16 Nov 2010 16:34:54 - exar...@twistedmatrix.com wrote: > > Imagine trying to use a dictionary without knowing about alphabetical > ordering. You mean an ordered dictionary, right? ___ Python-Dev mailing list Python-Dev@python.org http:/

Re: [Python-Dev] I need help with IO testuite

2010-11-17 Thread Antoine Pitrou
On Wed, 17 Nov 2010 15:31:02 +0100 Jesus Cea wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi all. I am modifying IO module for Python 3.2, and I am unable to > understand the mechanism used in IO testsuite to test both the C and the > Python implementation. > > In particular I ne

Re: [Python-Dev] Help deploying a new buildbot running OpenIndiana/x86

2010-11-17 Thread Antoine Pitrou
On Wed, 17 Nov 2010 17:07:02 +0100 Jesus Cea wrote: > > I am reading http://wiki.python.org/moin/BuildBot . I have installed > buildbotslave already, but I need passwords, etc., to link to python > buildbot infraestructure. > > The machine is behind a NAT system, so any incoming connection will

Re: [Python-Dev] Help deploying a new buildbot running OpenIndiana/x86

2010-11-17 Thread Antoine Pitrou
> > ¿Could you provide the connection credential?. I rather prefer to skip > the IRC (I am a XMPP guy), but I can connect to freenode if you need it. I've already sent you a private e-mail. ___ Python-Dev mailing list Python-Dev@python.org http://mail

[Python-Dev] PEP 3151 dictator

2010-11-17 Thread Antoine Pitrou
Hello, I would like to announce that, following Guido's (private) suggestion that I find a temporary dictator for PEP 3151, Barry has accepted to fill in this role. Regards Antoine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.pytho

Re: [Python-Dev] r86514 - in python/branches/py3k/Lib: test/test_xmlrpc.py xmlrpc/client.py

2010-11-18 Thread Antoine Pitrou
On Thu, 18 Nov 2010 16:00:53 +0100 (CET) senthil.kumaran wrote: > Author: senthil.kumaran > Date: Thu Nov 18 16:00:53 2010 > New Revision: 86514 > > Log: > Fix Issue 9991: xmlrpc client ssl check faulty > [...] > > +def test_ssl_presence(self): > +#Check for ssl support > +

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-19 Thread Antoine Pitrou
On Fri, 19 Nov 2010 11:53:58 -0500 Alexander Belopolsky wrote: > Since this feature will be first documented in the > Library Reference in 3.2, I wonder if it will be appropriate to > mention it in "What's new in 3.2"? No, since it's not new in 3.2. No need to further confuse users. If there's a

Re: [Python-Dev] Mercurial Schedule

2010-11-19 Thread Antoine Pitrou
On Fri, 19 Nov 2010 12:41:58 -0500 Barry Warsaw wrote: > >Really? I can understand this for security-only branches (commits there will > >be rare, and equivalent commits to the Mercurial branches can be made by > >others than the release managers, in order to keep history consistent). > > > >But

Re: [Python-Dev] Mercurial Schedule

2010-11-19 Thread Antoine Pitrou
Le vendredi 19 novembre 2010 à 22:35 +0100, "Martin v. Löwis" a écrit : > > I don't understand all the worry about sys.subversion. > > Really? For a security release, there should be *zero* chance that it > breaks existing applications, It should have been clear that my message explicitly exclude

Re: [Python-Dev] r86570 - in python/branches/py3k: Lib/unittest/case.py Lib/unittest/test/test_case.py Misc/NEWS

2010-11-20 Thread Antoine Pitrou
On Sat, 20 Nov 2010 16:34:26 +0100 (CET) michael.foord wrote: > + > +def testPickle(self): > +# Issue 10326 > + > +# Can't use TestCase classes defined in Test class as > +# pickle does not work with inner classes > +test = unittest.TestCase('run') > +fo

Re: [Python-Dev] r86570 - in python/branches/py3k: Lib/unittest/case.py Lib/unittest/test/test_case.py Misc/NEWS

2010-11-20 Thread Antoine Pitrou
Le samedi 20 novembre 2010 à 15:48 +, Michael Foord a écrit : > On 20/11/2010 15:42, Antoine Pitrou wrote: > > On Sat, 20 Nov 2010 16:34:26 +0100 (CET) > > michael.foord wrote: > >> + > >> +def testPickle(self): > >> +# Issue 10326 > &g

Re: [Python-Dev] [Python-checkins] r86633 - in python/branches/py3k: Doc/library/inspect.rst Doc/whatsnew/3.2.rst Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS

2010-11-22 Thread Antoine Pitrou
On Mon, 22 Nov 2010 15:19:04 + Michael Foord wrote: > On 22/11/2010 15:14, Nick Coghlan wrote: > > On Mon, Nov 22, 2010 at 10:54 AM, Éric Araujo wrote: > >>> +.. function:: getgeneratorstate(generator) > >>> + > >>> +Get current state of a generator-iterator. > >>> + > >>> +Possible

Re: [Python-Dev] [Python-checkins] r86633 - in python/branches/py3k: Doc/library/inspect.rst Doc/whatsnew/3.2.rst Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS

2010-11-22 Thread Antoine Pitrou
On Mon, 22 Nov 2010 17:08:36 +0100 Hrvoje Niksic wrote: > On 11/22/2010 04:37 PM, Antoine Pitrou wrote: > > +1. The problem with int constants is that the int gets printed, not > > the name, when you dump them for debugging purposes :) > > Well, it's trivial to subcla

Re: [Python-Dev] Solaris family and 64 bits compiling

2010-11-22 Thread Antoine Pitrou
On Tue, 23 Nov 2010 00:48:06 +0100 Jesus Cea wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I think this is probably trivial, but is there any foolproof way to > detect 64 bit builds in python, beside "sys.maxint"?. sys.maxsize > And any macro useable for conditional compilation i

Re: [Python-Dev] OpenSSL Voluntarily (openssl-1.0.0a)

2010-11-23 Thread Antoine Pitrou
On Tue, 23 Nov 2010 00:07:09 -0500 Glyph Lefkowitz wrote: > On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto < > ocean-c...@m2.ccsnet.ne.jp> wrote: > > > Hello. Does this affect python? Thank you. > > > > http://www.openssl.org/news/secadv_20101116.txt > > > > No. Well, actually it does, but

Re: [Python-Dev] r86699 - python/branches/py3k/Lib/zipfile.py

2010-11-23 Thread Antoine Pitrou
On Mon, 22 Nov 2010 22:00:08 -0600 Benjamin Peterson wrote: > 2010/11/22 Łukasz Langa : > > Wiadomość napisana przez Benjamin Peterson w dniu 2010-11-23, o godz. 00:47: > > > > No test? > > > > > > The tests were there already, raising ResourceWarnings. After this change, > > they stopped doing th

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
On Tue, 23 Nov 2010 14:24:18 + Michael Foord wrote: > Well, for backwards compatibility reasons the new constants would have > to *behave* like the old ones (including having the same underlying > value and comparing equal to it). > > In many cases it is *likely* that subclassing int is a b

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 08:52 -0600, Benjamin Peterson a écrit : > 2010/11/23 Antoine Pitrou : > > On Tue, 23 Nov 2010 14:24:18 + > > Michael Foord wrote: > >> Well, for backwards compatibility reasons the new constants would have > >> to *behave* like t

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 14:56 +, Michael Foord a écrit : > On 23/11/2010 14:42, Antoine Pitrou wrote: > > On Tue, 23 Nov 2010 14:24:18 + > > Michael Foord wrote: > >> Well, for backwards compatibility reasons the new constants would have > >> to *beh

Re: [Python-Dev] r86699 - python/branches/py3k/Lib/zipfile.py

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 08:49 -0600, Benjamin Peterson a écrit : > 2010/11/23 Antoine Pitrou : > > On Mon, 22 Nov 2010 22:00:08 -0600 > > Benjamin Peterson wrote: > >> 2010/11/22 Łukasz Langa : > >> > Wiadomość napisana przez Benjamin Peterson w dn

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 15:15 +, Michael Foord a écrit : > There are still two reasonable APIs (unless you have changed your mind > and think that sticking with plain integers is best), of which I prefer > the latter: > > SOME_CONST = Constant('SOME_CONST', 1) > OTHER_CONST = Constant('O

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 15:40 +, Michael Foord a écrit : > On 23/11/2010 15:30, Antoine Pitrou wrote: > > Le mardi 23 novembre 2010 à 15:15 +, Michael Foord a écrit : > >> There are still two reasonable APIs (unless you have changed your mind > >> and thi

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 12:32 -0500, Isaac Morland a écrit : > On Tue, 23 Nov 2010, Antoine Pitrou wrote: > > > We already have a bunch of bizarrely unrelated stuff in collections > > (such as Callable), so we could put enum there too. > > Why not just "e

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 12:57 -0500, Fred Drake a écrit : > On Tue, Nov 23, 2010 at 12:37 PM, Antoine Pitrou wrote: > > Enumerations aren't a type at all (they have no distinguishing > > property). > > In any given language, this may be true, or not. Whether th

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 12:50 -0500, Isaac Morland a écrit : > Each enumeration is a type (well, OK, not in every language, presumably, > but certainly in many languages). The word "basic" is more important than > "types" in my sentence - the point is that an enumeration capability is a > v

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 11:34 -0800, Guido van Rossum a écrit : > >> From a backward-compatibility perspective, what makes sense depends on > >> whether they're used to implement existing constants (socket.AF_INET, > >> etc.) or if they reserved for new features only. > > > > It's not only back

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 16:10 -0500, Glyph Lefkowitz a écrit : > > On Nov 23, 2010, at 10:01 AM, Antoine Pitrou wrote: > > > Well, it is easy to assign range(N) to a tuple of names when > > desired. I > > don't think an automatically-enumerating constant gener

Re: [Python-Dev] OpenSSL Voluntarily (openssl-1.0.0a)

2010-11-24 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 20:56 -0500, Glyph Lefkowitz a écrit : > On Nov 23, 2010, at 9:02 AM, Antoine Pitrou wrote: > > > On Tue, 23 Nov 2010 00:07:09 -0500 > > Glyph Lefkowitz wrote: > >> On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto < > >

Re: [Python-Dev] Centos 5.5 freeze during test_concurrent_futures

2010-11-24 Thread Antoine Pitrou
Hi, > py3k built from trunk on Centos 5.5 freezes during regrtest on > test_concurrent_futures with "Fatal Python error: Invalid thread state for > this thread". As in a typical concurrent problem, subsequent calls freeze in > different test cases, but the freeze itself is always reproducible

Re: [Python-Dev] http.server - reference to bug #427345

2010-11-24 Thread Antoine Pitrou
On Tue, 23 Nov 2010 22:35:10 -0600 Brian Curtin wrote: > On Tue, Nov 23, 2010 at 22:28, Glenn Linderman > > > wrote: > > > Where might I find the bug #427345 that is referred to in a comment inside > > http.server ? Here is a code excerpt: > > > > # throw away additional data [see

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 18:51:49 +0900 "Stephen J. Turnbull" wrote: > James Y Knight writes: > > > But, now, if your choices are UTF-8 or UTF-16, UTF-8 is clearly > > superior [...]a because it is an ASCII superset, and thus more > > easily compatible with other software. That also makes it most >

Re: [Python-Dev] r86726 - python/branches/release27-maint/Objects/setobject.c

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 11:39:23 +0100 (CET) armin.rigo wrote: > Author: armin.rigo > Date: Wed Nov 24 11:39:23 2010 > New Revision: 86726 > > Log: > A no-op change. It looks like this call was not meant to be a recursive > call, but just call the helper (which the recursive call ends up doing). Si

Re: [Python-Dev] OpenSSL Voluntarily (openssl-1.0.0a)

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 15:01:06 - exar...@twistedmatrix.com wrote: > > > >If I believe the link above: > > 1CAny OpenSSL based TLS server is vulnerable if it is multi-threaded and > >uses OpenSSL's internal caching mechanism. Servers that are > >multi-process and/or disable internal session cachin

Re: [Python-Dev] r86731 - in python/branches/py3k: Lib/distutils/command/install.py Lib/distutils/sysconfig.py Lib/sysconfig.py Makefile.pre.in Misc/python.pc.in configure configure.in

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 20:43:47 +0100 (CET) barry.warsaw wrote: > Author: barry.warsaw > Date: Wed Nov 24 20:43:47 2010 > New Revision: 86731 > > Log: > Final patch for issue 9807. This seems to have broken compilation under Windows: Build started: Project: ssl, Configuration: Debug|Win32 Performi

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-28 Thread Antoine Pitrou
On Sun, 28 Nov 2010 15:24:37 -0500 Alexander Belopolsky wrote: > While we have little choice but to follow UCD in defining > str.isidentifier(), I think Python can promise users more stability in > what it treats as space or as a digit in its builtins. Well, if "unicode support" means "support th

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-28 Thread Antoine Pitrou
On Sun, 28 Nov 2010 15:58:33 -0500 Alexander Belopolsky wrote: > On Sun, Nov 28, 2010 at 3:43 PM, Antoine Pitrou wrote: > .. > >> For example, > >> I don't think that supporting > >> > >> >>> float('١٢٣٤.٥٦') > >> 1234.

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-28 Thread Antoine Pitrou
On Sun, 28 Nov 2010 17:23:01 -0600 Benjamin Peterson wrote: > 2010/11/28 M.-A. Lemburg : > > > > > > "Martin v. Löwis" wrote: > >>> float('١٢٣٤.٥٦') > 1234.56 > >> > >> I think it's a bug that this works. The definition of the float builtin > >> says > >> > >> Convert a string or a numbe

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-28 Thread Antoine Pitrou
> > Perhaps int(), float(), Decimal() and friends could take an optional > > parameter indicating whether non-ascii digits are considered. It would > > then satisfy all parties. > > What parties? I don't think anyone has claimed to actually have used > non-ASCII digits with float(). Have you do

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-29 Thread Antoine Pitrou
On Mon, 29 Nov 2010 13:58:05 +1000 Nick Coghlan wrote: > On Mon, Nov 29, 2010 at 1:39 PM, Stephen J. Turnbull > wrote: > > I agree that Python should make it easy for the programmer to get > > numerical values of native numeric strings, but it's not at all clear > > to me that there is any point

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-29 Thread Antoine Pitrou
On Sun, 28 Nov 2010 21:32:15 -0500 Alexander Belopolsky wrote: > On Sun, Nov 28, 2010 at 6:43 PM, Steven D'Aprano wrote: > .. > >> is more important than to assure users that once their program > >> accepted some text as a number, they can assume that the text is > >> ASCII. > > > > Seems like a

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-29 Thread Antoine Pitrou
On Mon, 29 Nov 2010 08:22:46 +0100 "Martin v. Löwis" wrote: > > The former ensures that literals in code are always readable; the later > > allows users to enter numbers in their own number system. How could that > > be a bad thing? > > It's YAGNI, feature bloat. It gives the illusion of supporti

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-30 Thread Antoine Pitrou
On Wed, 01 Dec 2010 00:23:22 +1100 Steven D'Aprano wrote: > > But I think there is a good case for allowing the constructors int, > float and complex to continue to accept numeric *strings* with non-ASCII > digits. The code already exists, there's probably people out there who > rely on it,

[Python-Dev] Module size

2010-11-30 Thread Antoine Pitrou
On Mon, 29 Nov 2010 22:46:33 -0500 Alexander Belopolsky wrote: > > In practical terms, UCD comes at a price. The unicodedata module size > is over 700K on my machine. This is almost half the size of the > python executable and by far the largest extension module. (only CJK > encodings come clos

Re: [Python-Dev] Module size

2010-11-30 Thread Antoine Pitrou
Le mardi 30 novembre 2010 à 09:32 -0500, Alexander Belopolsky a écrit : > On Tue, Nov 30, 2010 at 8:38 AM, Antoine Pitrou wrote: > > On Mon, 29 Nov 2010 22:46:33 -0500 > > Alexander Belopolsky wrote: > >> > >> In practical terms, UCD comes at a price. The uni

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-30 Thread Antoine Pitrou
> Sure, if we code it in Python, supporting it will by much easier: > > def normalize_digits(s): > digits = {m.group(1) for m in re.finditer('(\d)', s)} > trtab = {ord(d): str(unicodedata.digit(d)) for d in digits} > return s.translate(trtab) > > >>> normalize_digits('١٢٣٤.٥٦') > '12

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-30 Thread Antoine Pitrou
Le mardi 30 novembre 2010 à 20:16 +0100, "Martin v. Löwis" a écrit : > > Would moving this functionality to the locale module make the issues any > > easier to fix? > > You could delegate it to the C library, so: yes. I hope you don't suggest delegating it to the C locale functions. Do you? ___

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-30 Thread Antoine Pitrou
Le mardi 30 novembre 2010 à 20:40 +0100, "Martin v. Löwis" a écrit : > Am 30.11.2010 20:23, schrieb Antoine Pitrou: > > Le mardi 30 novembre 2010 à 20:16 +0100, "Martin v. Löwis" a écrit : > >>> Would moving this functionality to the locale modul

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-30 Thread Antoine Pitrou
Le mardi 30 novembre 2010 à 20:55 +0100, "Martin v. Löwis" a écrit : > Wrt. to local number parsing, I think that the locale module would be > way better than the nonsense that Python currently does. In the locale > module, somebody at least has thought about what specifically > constitutes a numbe

Re: [Python-Dev] ICU

2010-11-30 Thread Antoine Pitrou
Oh, about ICU: > > Actually, I remember you saying that locale should ideally be replaced > > with a wrapper around the ICU library. > > By that, I stand - however, I have given up the hope that this will > happen anytime soon. Perhaps this could be made a GSOC topic. Regards Antoine. _

Re: [Python-Dev] Porting Ideas

2010-12-01 Thread Antoine Pitrou
On Wed, 1 Dec 2010 13:02:00 -0600 Brian Curtin wrote: > On Wed, Dec 1, 2010 at 12:51, Prashant Kumar > wrote: > > > Hello everyone. My name is Prashant. I and my friend Zubin recently > > ported 'Configobj'. It would be great if somebody can suggest about > > any utilities or scripts that are be

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Antoine Pitrou
On Wed, 1 Dec 2010 22:28:49 -0500 Alexander Belopolsky wrote: > > > > Both my personal observations when travelling from Turkey to India and > > Wikipedia say yes. "When representing a number in Arabic, the lowest-valued > > position is placed on the right, so the order of positions is the same as

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Antoine Pitrou
Le jeudi 02 décembre 2010 à 11:41 -0500, Alexander Belopolsky a écrit : > > Note that my point is not to find the correct answer here, but to > demonstrate that we as a group don't have the expertise to get parsing > of Arabic text right. I don't understand why you think Arabic or Hebrew text is

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Antoine Pitrou
Le jeudi 02 décembre 2010 à 13:14 -0500, Alexander Belopolsky a écrit : > > I don't understand why you think Arabic or Hebrew text is any different > > from Western text. Surely right-to-left isn't more conceptually > > complicated than left-to-right, is it? > > > > No, but a mix of LTR and RTL is

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Antoine Pitrou
Le jeudi 02 décembre 2010 à 16:34 -0500, Alexander Belopolsky a écrit : > On Thu, Dec 2, 2010 at 1:55 PM, Antoine Pitrou wrote: > .. > > I don't think so. str.split() and str.splitlines() are also defined in > > conformance to the SPEC, AFAIK. They certainly try to. >

Re: [Python-Dev] PEP 384 accepted

2010-12-02 Thread Antoine Pitrou
On Thu, 02 Dec 2010 23:21:25 +0100 "Martin v. Löwis" wrote: > Am 02.12.2010 22:54, schrieb Michael Foord: > > On 02/12/2010 21:39, "Martin v. Löwis" wrote: > >>> I was told not to touch to Distutils code to avoid any regression > >>> since it's patched to the bones in third party products. So we d

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-03 Thread Antoine Pitrou
Le vendredi 03 décembre 2010 à 13:58 +0900, Stephen J. Turnbull a écrit : > Antoine Pitrou writes: > > > The legacy format argument looks like a red herring to me. When > > converting from a format to another it is the programmer's job to > > his/her job right. >

Re: [Python-Dev] r86962 - in python/branches/py3k: Doc/library/pydoc.rst Doc/whatsnew/3.2.rst Lib/pydoc.py Lib/test/test_pydoc.py Misc/ACKS Misc/NEWS

2010-12-03 Thread Antoine Pitrou
On Fri, 3 Dec 2010 10:29:12 +0100 (CET) nick.coghlan wrote: > Author: nick.coghlan > Date: Fri Dec 3 10:29:11 2010 > New Revision: 86962 > > Log: > Improve Pydoc interactive browsing (#2001). Patch by Ron Adam. Tests seem to fail under Windows: ===

[Python-Dev] "buffer interface" messages

2010-12-03 Thread Antoine Pitrou
On Fri, 03 Dec 2010 10:11:29 -0500 "R. David Murray" wrote: > > > > >>> 'abc'.transform('hex') > > TypeError: 'str' does not support the buffer interface > > >>> b'abc'.transform('rot13') > > TypeError: expected an object with the buffer interface > > I find these 'buffer interface' error messag

Re: [Python-Dev] "buffer interface" messages

2010-12-03 Thread Antoine Pitrou
On Sat, 4 Dec 2010 02:45:42 +1000 Nick Coghlan wrote: > On Sat, Dec 4, 2010 at 2:28 AM, Antoine Pitrou wrote: > > On Fri, 03 Dec 2010 10:11:29 -0500 > > "R. David Murray" wrote: > >> > > >> > >>> 'abc'.transform(

Re: [Python-Dev] "buffer interface" messages

2010-12-03 Thread Antoine Pitrou
On Fri, 03 Dec 2010 18:09:39 +0100 Georg Brandl wrote: > Am 03.12.2010 17:57, schrieb Antoine Pitrou: > > On Sat, 4 Dec 2010 02:45:42 +1000 > > Nick Coghlan wrote: > >> On Sat, Dec 4, 2010 at 2:28 AM, Antoine Pitrou wrote: > >> > On Fri, 03 Dec 2010 10

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-04 Thread Antoine Pitrou
Le samedi 04 décembre 2010 à 17:13 +0900, Stephen J. Turnbull a écrit : > Antoine Pitrou writes: > > Le vendredi 03 décembre 2010 à 13:58 +0900, Stephen J. Turnbull a > > écrit : > > > Antoine Pitrou writes: > > > > > > > The legacy format

Re: [Python-Dev] PEP 384 accepted

2010-12-04 Thread Antoine Pitrou
On Fri, 3 Dec 2010 18:11:57 -0500 James Y Knight wrote: > On Dec 3, 2010, at 5:52 PM, Martin v. Löwis wrote: > > > Am 03.12.2010 23:48, schrieb Éric Araujo: > >>> But I'm not interested at all in having it in distutils2. I want the > >>> Python build itself to use it, and alas, I can't because o

<    27   28   29   30   31   32   33   34   35   36   >