This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: small sanity checks for user-defined mros
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: anthonybaxter Nosy List: anthonybaxter, loewis, mwh, rhettinger
Priority: normal Keywords: patch

Created on 2005-03-15 14:16 by mwh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mro-argh-safe-2.diff mwh, 2005-03-15 14:21 mwh's patch #2
Messages (7)
msg47983 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-03-15 14:16
I the course of looking at bug 1153075 (which is a nastier problem) I 
found a couple of sillies: no checking was done that a user defined 
mro() function returns a sequence or that said sequence contains 
types or classes.  This patch fixes this, at least, and I'd like to get it 
into 2.4.1.
msg47984 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-03-15 14:21
Logged In: YES 
user_id=6656

Argh, this is what I meant to upload.
msg47985 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2005-03-16 11:13
Logged In: YES 
user_id=80475

Are you sure to want to backport this directly to a release
candidate without it having lived on the head for a while? 
Seems a little dangerous at this stage for something that is
arguably not actually broken right now.
msg47986 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-03-16 11:17
Logged In: YES 
user_id=6656

Well, possibly I'm rushing unecessarily.

OTOH "arguably not actually broken" is simply not true.
msg47987 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2005-03-16 20:30
Logged In: YES 
user_id=80475

If I read it correctly, you're adding useful argument
checking that is helpful when the user does something wrong.
 However, nothing is currently preventing them from using it
correctly.

Unless it is a critical fix, it should probably go on the
head and ultimately into Py2.4.2.
msg47988 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-03-17 09:29
Logged In: YES 
user_id=6656

You have appreciated that these are crash bugs? I think it's
a little bit more than "useful argument checking".

OTOH, essentially noone defines mro() functions so it's not
that big a deal.
msg47989 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-06 13:48
This was committed as r41845, as part of #1153075, AFAICT. mwh, if you think there are still changes pending, please resubmit.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41704
2005-03-15 14:16:25mwhcreate