Re: [Python-Dev] Running GUI and "GObject.mainloop.run()" together?

2012-12-26 Thread Ajay Garg
Oops.. I am extremely sorry for posting to Python-Dev (I did not intend to; just a bad habit of "Reply-to-All"). Sorry again. On Thu, Dec 27, 2012 at 1:28 AM, Glyph wrote: > On Dec 25, 2012, at 9:05 AM, Ajay Garg wrote: > > > Also, I think I am now starting to get a hang of things; however, on

Re: [Python-Dev] push changesets hooks failing

2012-12-26 Thread Andrew Svetlov
Thanks On Wed, Dec 26, 2012 at 7:50 PM, Georg Brandl wrote: > Should now be fixed. I updated the daemon behind the hook to the newest > version, and hope it will be more stable now. > > Georg > > On 12/26/2012 05:07 PM, Andrew Svetlov wrote: >> Looks like IRC bot is broken for last days. >> I co

Re: [Python-Dev] push changesets hooks failing

2012-12-26 Thread Georg Brandl
Should now be fixed. I updated the daemon behind the hook to the newest version, and hope it will be more stable now. Georg On 12/26/2012 05:07 PM, Andrew Svetlov wrote: > Looks like IRC bot is broken for last days. > I constantly get the same, but it related only to IRC, not to HG repo itself.

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Andrew Svetlov
Thanks for the elaboration! On Wed, Dec 26, 2012 at 6:42 PM, Antoine Pitrou wrote: > On Wed, 26 Dec 2012 13:37:13 +0200 > Andrew Svetlov wrote: >> > >> > As Serhiy's example shows, this mapping of error numbers to subclasses >> > is implemented directly in OSError.__new__. We did this so that co

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Antoine Pitrou
On Wed, 26 Dec 2012 13:37:13 +0200 Andrew Svetlov wrote: > > > > As Serhiy's example shows, this mapping of error numbers to subclasses > > is implemented directly in OSError.__new__. We did this so that code > > could catch the new exceptions, even when dealing with old code that > > raises the l

Re: [Python-Dev] push changesets hooks failing

2012-12-26 Thread Andrew Svetlov
Looks like IRC bot is broken for last days. I constantly get the same, but it related only to IRC, not to HG repo itself. On Wed, Dec 26, 2012 at 5:53 PM, Jesus Cea wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I got this when pushing: > > """ > jcea@ubuntu:~/hg/python/cpython$ hg

[Python-Dev] push changesets hooks failing

2012-12-26 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I got this when pushing: """ jcea@ubuntu:~/hg/python/cpython$ hg push pushing to ssh://h...@hg.python.org/cpython/ searching for changes searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Serhiy Storchaka
It sould be in Python-Ideas: add keyword argument support for OSError and subclasses with suitable default values. I.e. >>> OSError(errno=errno.ENOENT) FileNotFoundError(2, 'No such file or directory') >>> FileNotFoundError(filename='qwerty') FileNotFoundError(2, 'No such file or directory') >>>

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Andrew Svetlov
On Wed, Dec 26, 2012 at 12:16 PM, Nick Coghlan wrote: > On Wed, Dec 26, 2012 at 6:50 PM, Serhiy Storchaka wrote: >> On 25.12.12 23:55, Andrew Svetlov wrote: >>> >>> Currently we have exception tree of classes inherited from OSError >>> When we use C API we can call PyErr_SetFromErrno and >>> PyEr

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Nick Coghlan
On Wed, Dec 26, 2012 at 6:50 PM, Serhiy Storchaka wrote: > On 25.12.12 23:55, Andrew Svetlov wrote: >> >> Currently we have exception tree of classes inherited from OSError >> When we use C API we can call PyErr_SetFromErrno and >> PyErr_SetFromErrnoWithFilename[Object] functions. >> This ones rai

Re: [Python-Dev] Raising OSError concrete classes from errno code

2012-12-26 Thread Serhiy Storchaka
On 25.12.12 23:55, Andrew Svetlov wrote: Currently we have exception tree of classes inherited from OSError When we use C API we can call PyErr_SetFromErrno and PyErr_SetFromErrnoWithFilename[Object] functions. This ones raise concrete exception class (FileNotFoundError for example) looking on im