Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
Phillip J. Eby wrote: > So, I think for your plan to work, you would have to eliminate reference > counting, in order to bring the lock overhead down to a manageable level. There's a possibility it wouldn't be atrociously bad. Seems like it would only add the 3 instructions or whatever overhead

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
Martin Devera wrote: > As I've written in "Big reader lock" paragraph of the original proposal, these > objects could be handled by not blocking in read path But as was just pointed out, because of refcounting, there's really no such thing as read-only access to an object. What *looks* like read-

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
Martin Devera wrote: > Regarding implementation, I wanted to look for some opinions before starting > to > implement something as big as this patch. Probably someone can look and say, > hey > it is stupit, you forgot that FILL_IN ... ;-) If I understand correctly, your suggestion for avoidi

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Brett Cannon
On 9/18/06, Greg Ewing <[EMAIL PROTECTED]> wrote: Armin Rigo wrote:> My (limited) understanding of the motivation for relative imports is> that they are only here as a transitional feature.  Fully-absolute> imports are the official future. Guido does seem to have a dislike for relative imports,but

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > Armin Rigo wrote: > > there > > is no clean way from a test module 'foo.bar.test.test_hello' to import > > 'foo.bar.hello': the top-level directory must first be inserted into > > sys.path magically. > > I've felt for a long time that problems like this > w

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Greg Ewing
Armin Rigo wrote: > My (limited) understanding of the motivation for relative imports is > that they are only here as a transitional feature. Fully-absolute > imports are the official future. Guido does seem to have a dislike for relative imports, but I don't really understand why. The usefulnes

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Martin v. Löwis
Martin Devera schrieb: > It is based on assumption that an object is typicaly used by single > thread. You must lock it anyway just for case if another thread steps > on it. The idea is that each object is "owned" by a thread. Owner can > use its objects without locking. If a thread wants to use f

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Phillip J. Eby
At 07:08 PM 9/18/2006 +0200, Martin Devera wrote: > >> So that you are right. It is not RCU. It only uses similar technique > as RCU > >> uses for free-ing old copy of data. > >> > >> It is based on assumption that an object is typicaly used by single > thread. > > > > Which thread owns builtins?

Re: [Python-Dev] Testsuite fails on Windows if a space is in the path

2006-09-18 Thread Giovanni Bajo
Martin v. Löwis wrote: >> People are well-advised to accept the installer's default directory. > > That's very true, but difficult to communicate. Too many people > actually > complain about that, and some even bring reasonable arguments (such > as the ACL in c:\ being too permissive for a softwar

Re: [Python-Dev] Before 2.5 - More signed integer overflows

2006-09-18 Thread Neal Norwitz
On 9/18/06, Tim Peters <[EMAIL PROTECTED]> wrote: > [Neal Norwitz] > >> I'm getting a crash when running test_builtin and test_calendar (at > >> least) with gcc 4.1.1 on amd64. It's happening in pymalloc, though I > >> don't know what the cause is. I thought I tested with gcc 4.1 before, > >> but

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Martin Devera
>> So that you are right. It is not RCU. It only uses similar technique as RCU >> uses for free-ing old copy of data. >> >> It is based on assumption that an object is typicaly used by single thread. > > Which thread owns builtins? Or module dictionaries? If two threads are > running the same f

Re: [Python-Dev] Before 2.5 - More signed integer overflows

2006-09-18 Thread Tim Peters
[Neal Norwitz] >> I'm getting a crash when running test_builtin and test_calendar (at >> least) with gcc 4.1.1 on amd64. It's happening in pymalloc, though I >> don't know what the cause is. I thought I tested with gcc 4.1 before, >> but probably would have been in debug mode. Neil, in context i

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Jean-Paul Calderone
On Mon, 18 Sep 2006 17:06:47 +0200, Martin Devera <[EMAIL PROTECTED]> wrote: >Martin v. Löwis wrote: >> Martin Devera schrieb: >>> RCU like locking >>> Solution I have in mind is similar to RCU. In Python we have quiscent >>> state - when a thread returns to main loop of interpreter. >> >> Ther

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Martin Devera
Martin v. Löwis wrote: > Martin Devera schrieb: >> RCU like locking >> Solution I have in mind is similar to RCU. In Python we have quiscent >> state - when a thread returns to main loop of interpreter. > > There might be a terminology problem here. RCU is read-copy-update, > right? I fail to

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Martin v. Löwis
Martin Devera schrieb: > RCU like locking > Solution I have in mind is similar to RCU. In Python we have quiscent > state - when a thread returns to main loop of interpreter. There might be a terminology problem here. RCU is read-copy-update, right? I fail to see the copy (copy data structure

Re: [Python-Dev] Testsuite fails on Windows if a space is in the path

2006-09-18 Thread Martin v. Löwis
Tim Peters schrieb: > These are the MS docs for cmd.exe's inscrutable quoting rules after /C: > > """ > If /C or /K is specified, then the remainder of the command line after > the switch is processed as a command line, where the following logic is > used to process quote (") characters: > >

Re: [Python-Dev] Testsuite fails on Windows if a space is in the path

2006-09-18 Thread Martin v. Löwis
Jean-Paul Calderone schrieb: > You can find the quoting/dequoting rules used by cmd.exe documented on msdn: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pluslang_Parsing_C.2b2b_.Command.2d.Line_Arguments.asp > > Interpreting them is something of a challenge (m

[Python-Dev] deja-vu .. python locking

2006-09-18 Thread Martin Devera
Hello, as someone has written in FAQ, sometimes someone starts a thread about finer grained locking in Python. Ok here is one. I don't want to start a flamewar. I only seek suggestions and constructive critic. I have some ideas whose are new in this context (I believe) and I only wanted to make t

Re: [Python-Dev] Before 2.5 - More signed integer overflows

2006-09-18 Thread Martin v. Löwis
Neal Norwitz schrieb: > I'm getting a crash when running test_builtin and test_calendar (at > least) with gcc 4.1.1 on amd64. It's happening in pymalloc, though I > don't know what the cause is. I thought I tested with gcc 4.1 before, > but probably would have been in debug mode. Can't really ch

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Nick Coghlan
Fabio Zadrozny wrote: > I've been playing with the new features and there's one thing about > the new relative import that I find a little strange and I'm not sure > this was intended... > > When you do a from . import xxx, it will always fail if you're in a > top-level module, and when executing

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Armin Rigo
Hi Fabio, On Sun, Sep 17, 2006 at 03:38:42PM -0300, Fabio Zadrozny wrote: > I've been playing with the new features and there's one thing about > the new relative import that I find a little strange and I'm not sure > this was intended... My (limited) understanding of the motivation for relative