[Python-Dev] GC Changes

2007-10-01 Thread Justin Tulloss
Hello, I've been doing some tests on removing the GIL, and it's becoming clear that some basic changes to the garbage collector may be needed in order for this to happen efficiently. Reference counting as it stands today is not very scalable. I've been looking into a few options, and I'm leaning

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Nick Maclaren
Greg Ewing [EMAIL PROTECTED] wrote: I don't know PRECISELY what you mean by universal newlines mode I mean precisely what Python means by the term: any of \r, \n or \r\n represent a newline, and no distinction is made between them. Excellent. While this over-simplifies the issue, let's

Re: [Python-Dev] GC Changes

2007-10-01 Thread Gustavo Carneiro
On 01/10/2007, Justin Tulloss [EMAIL PROTECTED] wrote: Hello, I've been doing some tests on removing the GIL, and it's becoming clear that some basic changes to the garbage collector may be needed in order for this to happen efficiently. Reference counting as it stands today is not very

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Paul Moore
On 01/10/2007, Nick Maclaren [EMAIL PROTECTED] wrote: So, damn the outside system, EXACTLY what does Python mean by such characters, and EXACTLY what uses of them are discouraged as having unspecified meanings? If we could get an answer to that precisely enough to write a parse tree with all

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Nick Maclaren
Paul Moore [EMAIL PROTECTED] wrote: So, damn the outside system, EXACTLY what does Python mean by such characters, and EXACTLY what uses of them are discouraged as having unspecified meanings? If we could get an answer to that precisely enough to write a parse tree with all terminals

Re: [Python-Dev] GC Changes

2007-10-01 Thread Jeremy Hylton
On 10/1/07, Justin Tulloss [EMAIL PROTECTED] wrote: Hello, I've been doing some tests on removing the GIL, and it's becoming clear that some basic changes to the garbage collector may be needed in order for this to happen efficiently. Reference counting as it stands today is not very

Re: [Python-Dev] building with -Wwrite-strings

2007-10-01 Thread Armin Rigo
Hi Martin, On Fri, Sep 28, 2007 at 11:09:54PM +0200, Martin v. Löwis wrote: What's wrong with static const char *kwlist[] = {x, base, 0}; The following goes wrong if we try again to walk this path: http://mail.python.org/pipermail/python-dev/2006-February/060689.html Armin

Re: [Python-Dev] building with -Wwrite-strings

2007-10-01 Thread Lisandro Dalcin
Yes, you are completely right. I ended up realizing that a change like this would break almost all third-party extension. But... What about of doing this for Py3K? Third-party extension have to be fixed anyway. On 10/1/07, Armin Rigo [EMAIL PROTECTED] wrote: Hi Martin, On Fri, Sep 28, 2007

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Steve Holden
Michael Foord wrote: Steven Bethard wrote: On 9/29/07, Michael Foord [EMAIL PROTECTED] wrote: Terry Reedy wrote: There are two normal ways for internal Python text to have \r\n: 1. Read from a file with \r\r\n. Then \r\r\n is correct output (on the same platform). 2. Intentially

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Michael Foord
Steve Holden wrote: Michael Foord wrote: Steven Bethard wrote: On 9/29/07, Michael Foord [EMAIL PROTECTED] wrote: Terry Reedy wrote: There are two normal ways for internal Python text to have \r\n: 1. Read from a file with \r\r\n. Then \r\r\n is correct

Re: [Python-Dev] OpenSSL httplib bug

2007-10-01 Thread Bill Janssen
I believe this is already fixed in 2.6 with the new SSL code (I got the same error writing the unit tests and fixed it). Thanks for reporting it, though. Bill ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Bill Janssen
Well, it's an OS level difference and I thought that in general Python *doesn't* try to protect you from OS differences. I think that's the key point. In general, Python tries to present a translucent interface to the OS in which OS differences can show through, in contrast to other languages

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
Guido van Rossum wrote: The best solution for IronPython is probably to have the occasional wrapper around .NET APIs that translates between \r\n and \n on the boundary between Python and .NET; That's probably true. I was responding to the notion that IronPython shouldn't need any wrappers. To

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
Justin Tulloss wrote: Is the trend going to be to move away from reference counting and towards the mark-and-sweep implementation that currently exists, or is reference counting a firmly ingrained tradition? It's hard to predict the future, but the general feeling I get is that many people

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
Nick Maclaren wrote: if Python's own interpretation is ambiguous, it is a sure recipe for different translators being incompatible, Python's own interpretation is not ambiguous. The problem at hand is people wanting to use some random mixture of Python and .NET conventions. -- Greg Ewing,

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
Michael Foord wrote: It is also different from how libraries like wxPython behave - where they *don't* protect you from OS differences and if a textbox has '\r\n' line endings - that is what you get... That sounds like an undesirable deficiency of those library wrappers, especially

Re: [Python-Dev] GC Changes

2007-10-01 Thread Justin Tulloss
The cyclic GC kicks in when memory is running low. When what memory is running low? Its default pool? System memory? Justin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] GC Changes

2007-10-01 Thread Adam Olsen
On 10/1/07, Greg Ewing [EMAIL PROTECTED] wrote: Justin Tulloss wrote: Would somebody care to give me a brief overview on how the current gc module interacts with the interpreter The cyclic GC kicks in when memory is running low. Since This isn't true at all. It's triggered by heuristics

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
Justin Tulloss wrote: When what memory is running low? Its default pool? System memory? I'm not sure of the details, but I think it keeps a high-water mark of the amount of memory allocated for Python objects so far. When that is reached, it tries to free up memory by cyclic GC, and only

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
Adam Olsen wrote: This isn't true at all. It's triggered by heuristics based on the total number of allocated objects. Hmmm, all right, it seems I don't know what I'm talking about. I'll shut up now before I spread any more misinformation. Sorry. -- Greg Ewing, Computer Science Dept,

Re: [Python-Dev] GC Changes

2007-10-01 Thread Adam Olsen
On 10/1/07, Greg Ewing [EMAIL PROTECTED] wrote: Adam Olsen wrote: This isn't true at all. It's triggered by heuristics based on the total number of allocated objects. Hmmm, all right, it seems I don't know what I'm talking about. I'll shut up now before I spread any more misinformation.

Re: [Python-Dev] GC Changes

2007-10-01 Thread Aahz
[xposted to python-ideas, reply-to python-ideas, leaving python-dev in to correct misinformation] On Tue, Oct 02, 2007, Greg Ewing wrote: The cyclic GC kicks in when memory is running low. Not at all. The sole and only basis for GC is number of allocations compared to number of

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Terry Reedy
Nick Maclaren [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | The question is independent of what the outside system believes a | text file should look like, and is solely what Python believes a | sequence of characters should mean. For example, does 'A\r\nB' | mean that B is

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Guido van Rossum
Does anyone else have the feeling that discussions with Mr. MacLaren don't usually bear any fruit? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org