[Python-Dev] pthread sem PyThread_acquire_lock

2009-06-27 Thread Florian Mayer

Hello.
As this is my first post I will try to introduce myself as requested in 
the welcome email. If you aren't interested in my person, just continue 
reading at the next paragraph. I'm a student from Vienna/Austria. I 
attend what would match high school in the United States. I have been 
writing Python for about 3 years now and have just began to dig into the 
implementation of CPython.


Now to my real question. I have noticed that PyThread_acquire_lock 
swallows all signals with pthread using sems. Looking at the source code 
it appears that this is intended, but I cannot see the reason for that. 
It seems the pthread sem implementation is the only one doing so. Can 
any of you tell me the reason why it swallows signals?


I have already prepared a patch that introduces a new _noswallow 
function if sem are used and uses this in threadmodule.c. But if there 
isn't any real reason for it to swallow exceptions, I think it would be 
wisest to change that.


Best regards,
Florian Mayer
___
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] pthread sem PyThread_acquire_lock

2009-06-27 Thread Martin v. Löwis
> Now to my real question. I have noticed that PyThread_acquire_lock
> swallows all signals with pthread using sems. Looking at the source code
> it appears that this is intended, but I cannot see the reason for that.
> It seems the pthread sem implementation is the only one doing so. Can
> any of you tell me the reason why it swallows signals?

Can you please explain what you mean by "swallowing"?
What is the sequence of actions triggering the case you are talking
about, what happens, and what do you expect to happen instead?
Also, how would you fix this (in principle, not what the specific
patch would look like)?

Regards,
Martin
___
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] pthread sem PyThread_acquire_lock

2009-06-27 Thread Florian Mayer

Martin v. Löwis wrote:
> Can you please explain what you mean by "swallowing"?
The signals don't get through when acquiring the lock.
> What is the sequence of actions triggering the case you are talking
> about, what happens, and what do you expect to happen instead?
Create a Lock object, call .acquire and try to press Ctrl-C, the 
keyboardinterrupt is swallowed

> Also, how would you fix this (in principle, not what the specific
> patch would look like)?
Remove the loop that explicitly does this in a new function and use that 
one in threadmodule.c for lock.acquire.

>
> Regards,
> Martin
Best regards,
Florian

PS: Sorry for sending this message twice.
___
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] pthread sem PyThread_acquire_lock

2009-06-27 Thread Florian Mayer

Martin v. Löwis wrote:

Can you please explain what you mean by "swallowing"?

The signals don't get through when acquiring the lock.

What is the sequence of actions triggering the case you are talking
about, what happens, and what do you expect to happen instead?
Easiest way is to create a Queue.Queue and call .get() on it and try to 
Ctrl-C it.

Also, how would you fix this (in principle, not what the specific
patch would look like)?

Remove the loop that explicitly does this in a new function and use that
one in threadmodule.c for lock.acquire.


Regards,
Martin

Best regards,
Florian

PS: Excuse me, I messed up things once again.

___
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


[Python-Dev] [RELEASED] Python 3.1 final

2009-06-27 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the first
production release of Python 3.1.

Python 3.1 focuses on the stabilization and optimization of the features and
changes that Python 3.0 introduced.  For example, the new I/O system has been
rewritten in C for speed.  File system APIs that use unicode strings now handle
paths with undecodable bytes in them. Other features include an ordered
dictionary implementation, a condensed syntax for nested with statements, and
support for ttk Tile in Tkinter.  For a more extensive list of changes in 3.1,
see http://doc.python.org/3.1/whatsnew/3.1.html or Misc/NEWS in the Python
distribution.

To download Python 3.1 visit:

 http://www.python.org/download/releases/3.1/

The 3.1 documentation can be found at:

 http://docs.python.org/3.1

Bugs can always be reported to:

 http://bugs.python.org


Enjoy!

--
Benjamin Peterson
Release Manager
benjamin at python.org
(on behalf of the entire python-dev team and 3.1's contributors)
___
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] [RELEASED] Python 3.1 final

2009-06-27 Thread Raymond Hettinger




On behalf of the Python development team, I'm thrilled to announce the first
production release of Python 3.1.


Sweet!


Raymond
___
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] [RELEASED] Python 3.1 final

2009-06-27 Thread Christian Heimes
Benjamin Peterson schrieb:
> On behalf of the Python development team, I'm thrilled to announce the first
> production release of Python 3.1.

Gratulations! You did a fantastic job! :)

Christian

PS: I hope that I'm able to spare more of my work time on the
development of Python 3.2 ...
___
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] [RELEASED] Python 3.1 final

2009-06-27 Thread Arc Riley
On Sat, Jun 27, 2009 at 6:59 PM, Christian Heimes  wrote:

>
> Gratulations! You did a fantastic job! :)


+1 !
___
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] [RELEASED] Python 3.1 final

2009-06-27 Thread Nick Coghlan
Benjamin Peterson wrote:
> On behalf of the Python development team, I'm thrilled to announce the first
> production release of Python 3.1.

Excellent news!

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---
___
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