[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl added the comment: OK, I added another test for pickling, committed in r74845, and backported to 2.6 in r74848. -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Brett Cannon
Brett Cannon added the comment: Just looked at the patch and it looks good to me. I say go ahead and commit, Georg. -- assignee: loewis -> georg.brandl stage: -> commit review ___ Python tracker _

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl added the comment: Yes, it should be fixed, but it is not related. I'm setting it as a release blocker as well. -- ___ Python tracker ___ __

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Alan Isaac
Alan Isaac added the comment: I hope it is not too annoying to link these ... I asked thhis of Jean-Paul but now I'll ask it of George. Since you are working on this, can you see if http://bugs.python.org/issue6108 is related or in any case can be fixed at the same time? Thanks. --

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl added the comment: Huh. I just made some tests to find out if exceptions with a message set survive pickling in 2.6.2 and unpickling in patched trunk. I found that the message attribute isn't pickled at all in 2.6.2, so there should be no cross-version compatibility problems with p

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl added the comment: The patch leads to crashes with all the exceptions that have their own structs; since they are derived from BaseException they must start with the same binary layout as PyBaseExceptionObject (pointers to any exception will be cast to PyBaseExceptionObject). This

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I'm not sure I'll be able to work on this again for a while after this morning, so here's a patch. I don't really understand how the exception structs are involved here, so I don't really know why the patch works, but it seems to. If there's something wro

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I agree that this is a release blocker for 2.6.3 -- nosy: +barry ___ Python tracker ___ ___ Python-

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: FWIW, I'm waiting to hear about the acceptability of adding fields to the exception structure(s) before I work on this patch. -- ___ Python tracker ___

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Alan Isaac
Alan Isaac added the comment: Since you are working on this, can you see if http://bugs.python.org/issue6108 is related or in any case can be fixed at the same time? Thanks. -- ___ Python tracker ___

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-09 Thread Brett Cannon
Brett Cannon added the comment: Making this a release blocker to see what Barry thinks of this. -- priority: -> release blocker ___ Python tracker ___ __

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Brett Cannon
Brett Cannon added the comment: I had a feeling you were going to ask that. =) I think it's fine, and from what I can tell from PEP 384 it's okay as long as it is in no way publicly exposed. But I have added Martin to the nosy list to make sure I am not messing up the ABI somehow in a micro r

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Can I add a field to the PyBaseExceptionObject struct? -- ___ Python tracker ___ ___ Python-bug

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon added the comment: On Mon, Sep 7, 2009 at 14:57, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > > Alright.  So in Python 3.1, this is the behavior: > BaseException().message > (attribute error) BaseException("foo").message > (attribute error)

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Alright. So in Python 3.1, this is the behavior: >>> BaseException().message (attribute error) >>> BaseException("foo").message (attribute error) >>> BaseException("foo", "bar").message (attribute error) >>> x = BaseException() >>> x.message = "foo" >>> x

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Alan Isaac
Alan Isaac added the comment: > The 'message' attribute itself is deprecated > as it didn't exist prior to being introduced in 2.5. That seems to me to be the wrong way to phrase it, and indeed that kind of phrasing implies the current bug. For example, it leads to the incorrect statement that

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Georg Brandl
Changes by Georg Brandl : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon added the comment: On Mon, Sep 7, 2009 at 13:01, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > > Hm.  That PEP is marked as rejected, though.  I guess it was partially > implemented, those changes included in the Python 2.5 release, and then > it was decid

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hm. That PEP is marked as rejected, though. I guess it was partially implemented, those changes included in the Python 2.5 release, and then it was decided that it was a bad idea, rejected, and the changes undone for 3.x (what about 2.7)? Or did somethin

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon added the comment: On Mon, Sep 7, 2009 at 12:35, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > > After looking at this more carefully, I find myself wondering what > exactly is being deprecated at all. The message attribute as introduced in Python 2.5 bas

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: After looking at this more carefully, I find myself wondering what exactly is being deprecated at all. Brett said: > it's needed for anyone who came to rely on the feature in their 2.5 code from Python. Can someone help me understand what the feature is?

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon added the comment: If someone can come up w/ a patch to make this work for all of you I would be happy to review it and backport to 2.6. But the deprecation warning cannot go away as it's needed for anyone who came to rely on the feature in their 2.5 code from Python. --

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Duncan Grisby
Duncan Grisby added the comment: This affects my application too. We have a large body of code that uses exception classes automatically generated from CORBA IDL, with attributes named "message". It is infeasible for us to change to use a different attribute name. We've ended up with dirty hacks

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread ivank
ivank added the comment: That trac link should be http://twistedmatrix.com/trac/changeset/27062 -- nosy: +ivank ___ Python tracker ___ ___

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This also affects Twisted. We worked around it a couple months ago by putting a read-only `message` property onto our Exception subclass (Here's the revision: ). This seemed reasonable enough, but it turns ou

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Alan Isaac
New submission from Alan Isaac : In Python 2.6 if I subclass Exception and intialize my instances with a `message` attribute, I get a DeprecationError via BaseException. Of course there is no problem in Py3, because adding a `message` attribute to instances of a subclass is in fact **not** a pro