Re: [Python-Dev] very bad network performance

2008-04-22 Thread Ralf Schmitt
On Mon, Apr 21, 2008 at 8:10 PM, Gregory P. Smith [EMAIL PROTECTED] wrote: The 64K hunch is wrong. The system limit can be found using getsockopt(...SO_RCVBUF...). It can easily be (and often is) set to many megabytes either at a system default level or on a per socket level by the user

Re: [Python-Dev] A smarter shutil.copytree ?

2008-04-22 Thread Tarek Ziadé
On Mon, Apr 21, 2008 at 2:25 AM, Steven Bethard [EMAIL PROTECTED] wrote: On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé [EMAIL PROTECTED] wrote: I have submitted a patch for review here: http://bugs.python.org/issue2663 glob-style patterns or a callable (for complex cases) can be

Re: [Python-Dev] r62342 - python/branches/py3k/Objects/bytesobject.c

2008-04-22 Thread Stefan Behnel
Neal Norwitz wrote: I haven't seen any action on 3to2 (although I'm very behind on email). Stefan, could you try to implement some of these and report back how it works? No, sorry, that's too low a priority for me currently. Stefan ___ Python-Dev

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread M.-A. Lemburg
On 2008-04-21 23:31, Martin v. Löwis wrote: This is useful when you get a hunk of data which _should_ be some sort of intelligible text from the Big Scary Internet (say, a posted web form or email message), and you want to do something useful with it (say, search the content). I don't

[Python-Dev] pydoc works with eggs? (python-2.5.1)

2008-04-22 Thread Neal Becker
pydoc blew up when I tried to view doc for pytools module, which is an egg: pydoc -p 8082 pydoc server ready at http://localhost:8082/ Exception happened during processing of request from ('127.0.0.1', 52915) Traceback (most recent call last): File

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Bill Janssen
IMHO, more research has to be done into this area before a standard module can be added to the Python's stdlib... and who knows, perhaps we're lucky and by the time everyone is using UTF-8 anyway :-) I walked over to our computational linguistics group and asked. This is often combined with

Re: [Python-Dev] configure error: rm: conftest.dSYM: is a directory

2008-04-22 Thread Ronald Oussoren
On 5 Apr, 2008, at 21:17, [EMAIL PROTECTED] wrote: I just noticed this error message during configure: checking whether gcc accepts -Olimit 1500... no checking whether gcc supports ParseTuple __format__... no checking whether pthreads are available without options... yes checking

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread David Wolever
On 22-Apr-08, at 12:30 AM, Martin v. Löwis wrote: IMO, encoding estimation is something that many web programs will have to deal with Can you please explain why that is? Web programs should not normally have the need to detect the encoding; instead, it should be specified always - unless you

Re: [Python-Dev] A smarter shutil.copytree ?

2008-04-22 Thread Steven Bethard
On Tue, Apr 22, 2008 at 1:56 AM, Tarek Ziadé [EMAIL PROTECTED] wrote: On Mon, Apr 21, 2008 at 2:25 AM, Steven Bethard [EMAIL PROTECTED] wrote: On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé [EMAIL PROTECTED] wrote: I have submitted a patch for review here: http://bugs.python.org/issue2663

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Martin v. Löwis
When a web browser POSTs data, there is no standard way of communicating which encoding it's using. That's just not true. Web browser should and do use the encoding of the web page that originally contained the form. There are some hints which make it easier (accept-charset attributes, the

Re: [Python-Dev] BSDDB3

2008-04-22 Thread Trent Nelson
Hi Jesus, Martin v. Löwis wrote: | I think it would be helpful if you could analyze the crashes that | bsddb caused on Windows. Just go back a few revisions in the | subversion tree to reproduce the crashes. I have no MS Windows machines in my environment :-( I remember those rampant BSDDB

Re: [Python-Dev] 3k checkin mails to python-checkins

2008-04-22 Thread Martin v. Löwis
Since a few days, checkin notifications for the 3k branch seem to be sent to both the python-checkins and the python-3000-checkins lists. Was that a deliberate decision or has some bug crept into the SVN hook? This should be fixed now. The new mailer.py had named some config options

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Mike Klaas
On 22-Apr-08, at 3:31 AM, M.-A. Lemburg wrote: I don't think that should be part of the standard library. People will mistake what it tells them for certain. +1 I also think that it's better to educate people to add (correct) encoding information to their text data, rather than give them a

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread M.-A. Lemburg
[CCing python-dev again] On 2008-04-22 12:38, Greg Wilson wrote: I don't think that should be part of the standard library. People will mistake what it tells them for certain. [etc] These are all good arguments, but the fact remains that we can't control our inputs (e.g., we're archiving

Re: [Python-Dev] Known doctest bug with unicode?

2008-04-22 Thread Jeroen Ruigrok van der Werven
-On [20080418 18:05], Adam Olsen ([EMAIL PROTECTED]) wrote: 4. Make doctest smarter, so that it can grab the original module's encoding. 5. Wait until 3.0, where this is hopefully fixed by making doctests use unicode by default? Getting rid of the u in front of the strings as required made Python

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Martin v. Löwis
Can you please explain why that is? Web programs should not normally have the need to detect the encoding; instead, it should be specified always - unless you are talking about browsers specifically, which need to support web pages that specify the encoding incorrectly. Any program that

[Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way

2008-04-22 Thread Alessandro Guido
Can anybody please point me why print('a', 'b', sep=None, end=None) should produce a b\n instead of ab? I've read http://docs.python.org/dev/3.0/library/functions.html#print, pep-3105 and some ml threads but did not find a good reason justifying such a strange behaviour. Thanks.

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Lloyd Kvam
On Tue, 2008-04-08 at 10:01 -0700, zooko wrote: They both agreed that it made perfect sense. I told one of them about the alternate proposal to define a new database file to contain a list of installed packages, and he sighed and rolled his eyes and said So they are planning to

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Gael Varoquaux
On Wed, Apr 09, 2008 at 11:37:07AM +1000, Ben Finney wrote: zooko [EMAIL PROTECTED] writes: I am skeptical that prorgammers are going to be willing to use a new database format. They already have a database -- their filesystem -- and they already have the tools to control it -- mv, rm, and

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Gael Varoquaux
On Wed, Apr 09, 2008 at 12:41:32AM -0400, Phillip J. Eby wrote: The way to achieve a database for Python would be to provide tools for conversion of eggs to rpms and debs, Such tools already exist, although the conversion takes place from source distributions rather than egg distributions.

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Stanley A. Klein
On Wed, April 9, 2008 12:41 am, Phillip J. Eby wrote: At 10:49 PM 4/8/2008 -0400, Stanley A. Klein wrote: On Tue, April 8, 2008 9:37 pm, Ben Finney [EMAIL PROTECTED] wrote: Date: Wed, 09 Apr 2008 11:37:07 +1000 From: Ben Finney [EMAIL PROTECTED] Subject: Re: [Distutils] how to easily

Re: [Python-Dev] Python Leopard DLL Hell

2008-04-22 Thread Brian Cole
I have learned that this is a specific behavior of OS X. I have submitted a formal bug report to Apple about the problem. It appears that this is documented by Apple as acceptable:

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Stanley A. Klein
All my development is done on Linux. I use Windows very minimally (such as for tax preparation) and unless forced to do so for specific circumstances (such as submittal to grants.gov) do not expose Windows to the Internet. In the future there may possibly arise a need for us to port some

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Gael Varoquaux
On Wed, Apr 09, 2008 at 02:26:31PM -0400, Stanley A. Klein wrote: The rpm and deb package managers (and their yum and other higher level dependency managers) do a lot of things: 1. They install packages and maintain databases of what packages were installed 2. They manage dependencies 3.

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Stanley A. Klein
On Wed, April 9, 2008 3:19 pm, Gael Varoquaux wrote: On Wed, Apr 09, 2008 at 02:26:31PM -0400, Stanley A. Klein wrote: The rpm and deb package managers (and their yum and other higher level dependency managers) do a lot of things: 1. They install packages and maintain databases of what

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Stanley A. Klein
On Wed, April 9, 2008 3:40 pm, Phillip J. Eby wrote: At 11:52 AM 4/9/2008 -0400, Stanley A. Klein wrote: However, are you implying that the installation information for Python egg packages accesses and coordinates with the rpm database? Yes, when the information isn't stripped out. Try a more

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Gael Varoquaux
On Wed, Apr 09, 2008 at 11:46:19PM +0100, Paul Moore wrote: I find this whole discussion hugely confusing, because a lot of people are stating opinions about environments which it seems they don't use, or know much about. I don't know how to avoid this, but it does make it highly unlikely that

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Gael Varoquaux
On Wed, Apr 09, 2008 at 11:52:08PM +0100, Paul Moore wrote: And I would say that Windows doesn't have a problem. Are any Windows users proposing building a package management system for Windows (Python-specific or otherwise)? It's a genuine question - is this something that Windows users are

[Python-Dev] PyArg_ParseTuple and Py_BuildValue question

2008-04-22 Thread Alvin Delagon
Hello fellow pythonistas, I'm currently writing a simple python SCTP module in C. So far it works sending and receiving strings from it. The C sctp function sctp_sendmsg() has been wrapped and my function looks like this: sendMessage(PyObject *self, PyObject *args) { const char *msg = ; if

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-22 Thread Stanley A. Klein
On Wed, 2008-04-09 at 18:17 -0500, Dave Peterson wrote: I think I can sum up any further points by simply asking: Should it be safe to assume I can distribute my application via eggs / easy_install just because it is written in Python? I think that based on this discussion the bottom line

[Python-Dev] SetType=set in types module ?

2008-04-22 Thread iks hefem
Hi, the SetType is not available in the types module, so wouldn't it be needed here ? (in 2.6 by example) I guess the change is really simple and would be backward compatible : adding SetType = set ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-22 Thread Thomas Lee
Anyone in Melbourne, Australia keen for the first sprint? I'm not sure if I'll be available, but if I can it'd be great to work with some others. Failing that, it's red bull and pizza in my lounge room :) I've been working on some neat code for an AST optimizer. If I'm free that weekend, I'll

[Python-Dev] socket recv on win32 can be extremly delayed (python bug?)

2008-04-22 Thread Robert Hölzl
hello, I tried to implement a simple python XMLRPC service on a win32 environment (client/server code inserted below). The profiler of the client told me, that a simple function call needs about 200ms (even if I run it in a loop, the time needed per call stays the same). After analysing the

[Python-Dev] Security Advisory for unicode repr() bug?

2008-04-22 Thread guzarva16
___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Known doctest bug with unicode?

2008-04-22 Thread Martin v. Löwis
So there's a difference in behaviour between 2.x and 3.0 when it comes to this part. I guess the better behaviour would be for doctest to honour the encoding specified in the file/module? If other people agree I can see what I can to make that work. I'm fairly skeptical that you can make that

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread M.-A. Lemburg
On 2008-04-22 18:33, Bill Janssen wrote: The 2002 paper A language and character set determination method based on N-gram statistics by Izumi Suzuki and Yoshiki Mikami and Ario Ohsato and Yoshihide Chubachi seems to me a pretty good way to go about this. Thanks for the reference. Looks like

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Bill Janssen
When a web browser POSTs data, there is no standard way of communicating which encoding it's using. That's just not true. Web browser should and do use the encoding of the web page that originally contained the form. Since the site that receives the POST doesn't necessarily have access to

Re: [Python-Dev] PyArg_ParseTuple and Py_BuildValue question

2008-04-22 Thread Benjamin Peterson
On Wed, Apr 9, 2008 at 8:23 PM, Alvin Delagon [EMAIL PROTECTED] wrote: I'm going to construct an SS7 packet in python using struct.pack(). Here's the question, how am I going to pass the packet I wrote in python to my module and back? I already asked this question in comp.lang.python but so

Re: [Python-Dev] SetType=set in types module ?

2008-04-22 Thread Benjamin Peterson
On Wed, Apr 16, 2008 at 8:08 AM, iks hefem [EMAIL PROTECTED] wrote: Hi, the SetType is not available in the types module, so wouldn't it be needed here ? (in 2.6 by example) Nothing new is currently being added to the types module because we are trying to decide whether to remove it or not.

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Bill Janssen
Unless you're using a very broad scope, I don't think that you'd need more than a few hundred LSEs for a typical application - nothing you'd want to put in the Python stdlib, though. I tend to agree with this (and I'm generally in favor of putting everything in the standard library!). For

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Mike Klaas
On 22-Apr-08, at 2:16 PM, Martin v. Löwis wrote: Any program that needs to examine the contents of documents/feeds/whatever on the web needs to deal with incorrectly-specified encodings That's not true. Most programs that need to examine the contents of a web page don't need to guess the

Re: [Python-Dev] socket recv on win32 can be extremly delayed (python bug?)

2008-04-22 Thread Mike Klaas
Hi, This is not a python-specific problem. See http://en.wikipedia.org/wiki/Nagle's_algorithm -Mike On 17-Apr-08, at 3:08 AM, Robert Hölzl wrote: hello, I tried to implement a simple python XMLRPC service on a win32 environment (client/server code inserted below). The profiler of the

Re: [Python-Dev] python hangs when parsing a bad-formed email

2008-04-22 Thread Amaury Forgeot d'Arc
Hello, Alberto Casado Martín wrote: Hi all, First of all, sorry if this isn't the list where I have to post this. And sorry for my english. As the subject says, I'm having problems with the attached email, when I try to get a email object reading the attached file, the python process

[Python-Dev] GSoC student introduction and sandbox commit privileges request

2008-04-22 Thread Rodrigo Bernardo Pimentel
Hi there, I've just been accepted into this year's Google Summer of Code, to work for the Python Software Foundation on 2to3. My project is to give 2to3 fixers the ability to rank how confident they are on each fix, and let users choose to intervene manually whenever that confidence level is

Re: [Python-Dev] python hangs when parsing a bad-formed email

2008-04-22 Thread Terry Reedy
Amaury Forgeot d'Arc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | When you think you found a problem with python, please submit an issue | in the python issue tracker: |http://bugs.python.org/ Or post to comp.lang.python / python mailing list / gmane.comp.python.general

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Bill Janssen
Yup, but DrProject (the target application) also serves as a relay and archive for email. We have no control over the agent used for composition, and AFAIK there's no standard way to include encoding information. Greg, Internet-compliant email actually has well-specified mechanisms for

Re: [Python-Dev] GSoC student introduction and sandbox commit privileges request

2008-04-22 Thread Brett Cannon
On Tue, Apr 22, 2008 at 4:35 PM, Rodrigo Bernardo Pimentel [EMAIL PROTECTED] wrote: Hi there, I've just been accepted into this year's Google Summer of Code, to work for the Python Software Foundation on 2to3. My project is to give 2to3 fixers the ability to rank how confident they are on

Re: [Python-Dev] GSoC student introduction and sandbox commit privileges request

2008-04-22 Thread Rodrigo Bernardo Pimentel
On Tue, Apr 22 2008 at 09:02:49PM BRT, Brett Cannon [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 4:35 PM, Rodrigo Bernardo Pimentel [EMAIL PROTECTED] wrote: I've just been accepted into this year's Google Summer of Code (...) Finally, I'd like to request commit privileges to work on a

Re: [Python-Dev] SetType=set in types module ?

2008-04-22 Thread Christian Heimes
Benjamin Peterson schrieb: On Wed, Apr 16, 2008 at 8:08 AM, iks hefem [EMAIL PROTECTED] wrote: Hi, the SetType is not available in the types module, so wouldn't it be needed here ? (in 2.6 by example) Nothing new is currently being added to the types module because we are trying to

Re: [Python-Dev] PyArg_ParseTuple and Py_BuildValue question

2008-04-22 Thread Christian Heimes
Alvin Delagon schrieb: I'm going to construct an SS7 packet in python using struct.pack(). Here's the question, how am I going to pass the packet I wrote in python to my module and back? I already asked this question in comp.lang.python but so far no responses yet. I hope anyone can point me

[Python-Dev] GSoC Student Introduction

2008-04-22 Thread Nick Edds
Hello, My name is Nick Edds. I am going to be working on the 2to3 tool with Collin Winter as my mentor. More specifically, I will be working on improving the performance of the 2to3 tool in general, and its use of patterns in particular. I would like to request commit privileges to work in a

Re: [Python-Dev] GSoC student introduction and sandbox commit privileges request

2008-04-22 Thread Collin Winter
On Tue, Apr 22, 2008 at 5:18 PM, Rodrigo Bernardo Pimentel [EMAIL PROTECTED] wrote: On Tue, Apr 22 2008 at 09:02:49PM BRT, Brett Cannon [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 4:35 PM, Rodrigo Bernardo Pimentel [EMAIL PROTECTED] wrote: I've just been accepted into this year's

Re: [Python-Dev] GSoC Student Introduction

2008-04-22 Thread Benjamin Peterson
On Tue, Apr 22, 2008 at 7:42 PM, Nick Edds [EMAIL PROTECTED] wrote: Hello, My name is Nick Edds. I am going to be working on the 2to3 tool with Collin Winter as my mentor. More specifically, I will be working on improving the performance of the 2to3 tool in general, and its use of patterns in

Re: [Python-Dev] BSDDB3

2008-04-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Trent Nelson wrote: | I remember those rampant BSDDB crashes on Windows well. [...] | basically, the tests weren't cleaning up their environment in | the right order, so BSDDB was getting passed completely and | utterly bogus values. Next week I

Re: [Python-Dev] GSoC Student Introduction

2008-04-22 Thread Brett Cannon
On Tue, Apr 22, 2008 at 7:38 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 7:42 PM, Nick Edds [EMAIL PROTECTED] wrote: Hello, My name is Nick Edds. I am going to be working on the 2to3 tool with Collin Winter as my mentor. More specifically, I will be working

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Stephen J. Turnbull
Bill Janssen writes: Internet-compliant email actually has well-specified mechanisms for including encoding information; see RFCs 2047 and 2231. There's no need to guess; you can just look. You must be very special to get only compliant email. About half my colleagues use RFC 2047 to

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Stephen J. Turnbull
Martin v. Löwis writes: In any case, I'm very skeptical that a general guess encoding module would do a meaningful thing when applied to incorrectly encoded HTML pages. That depends on whether you can get meaningful information about the language from the fact that you're looking at the

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Stephen J. Turnbull
Guido van Rossum writes: To the contrary, an encoding-guessing module is often needed, and guessing can be done with a pretty high success rate. Other Unicode libraries (e.g. ICU) contain guessing modules. I suppose the API could return two values: the guessed encoding and a confidence

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Martin v. Löwis
Yup, but DrProject (the target application) also serves as a relay and archive for email. We have no control over the agent used for composition, and AFAIK there's no standard way to include encoding information. That's not at all the case. MIME defines that in full detail, since 1993.

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Martin v. Löwis
I certainly agree that if the target set of documents is small enough it is possible to hand-code the encoding. There are many applications, however, that need to examine the content of an arbitrary, or at least non-small set of web documents. To name a few such applications: - web

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-22 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I certainly agree that if the target set of documents is small enough it | | Ok. What advantage would you (or somebody working on a similar project) | gain if chardet was part of the standard library? What if it was not

Re: [Python-Dev] socket recv on win32 can be extremly delayed (python bug?)

2008-04-22 Thread Martin v. Löwis
Is there anybody who nows how to solve the problem? If it's really the problem described in the MSKB article, the article also suggests a solution: use non-blocking sockets. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org