[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: I agree that this is a release blocker for 2.6.3 -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Alan Isaac
Alan Isaac alan.is...@gmail.com 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?

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl ge...@python.org 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 rep...@bugs.python.org http://bugs.python.org/issue6844

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Brett Cannon
Brett Cannon br...@python.org 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 rep...@bugs.python.org

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-16 Thread Georg Brandl
Georg Brandl ge...@python.org 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 rep...@bugs.python.org

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Alan Isaac
Alan Isaac alan.is...@gmail.com 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 rep...@bugs.python.org

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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 rep...@bugs.python.org

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___ ___ Python-bugs-list

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-09 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Making this a release blocker to see what Barry thinks of this. -- priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Can I add a field to the PyBaseExceptionObject struct? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Brett Cannon
Brett Cannon br...@python.org 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Duncan Grisby
Duncan Grisby duncan-pyt...@grisby.org 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___ ___ Python-bugs-list

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon br...@python.org 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Mon, Sep 7, 2009 at 12:35, Jean-Paul Calderonerep...@bugs.python.org wrote: Jean-Paul Calderone exar...@divmod.com added the comment: After looking at this more carefully, I find myself wondering what exactly is being deprecated at all.

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Mon, Sep 7, 2009 at 13:01, Jean-Paul Calderonerep...@bugs.python.org wrote: Jean-Paul Calderone exar...@divmod.com added the comment: Hm.  That PEP is marked as rejected, though.  I guess it was partially implemented, those changes

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___ ___ Python-bugs-list

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Alan Isaac
Alan Isaac alan.is...@gmail.com 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Mon, Sep 7, 2009 at 14:57, Jean-Paul Calderonerep...@bugs.python.org wrote: Jean-Paul Calderone exar...@divmod.com added the comment: Alright.  So in Python 3.1, this is the behavior: BaseException().message (attribute error)

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Alan Isaac
New submission from Alan Isaac alan.is...@gmail.com: 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

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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: http://twistedmatrix.com/trac/changeset/27062). This seemed reasonable

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread ivank
ivank i...@ludios.org added the comment: That trac link should be http://twistedmatrix.com/trac/changeset/27062 -- nosy: +ivank ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6844 ___