classification
Title: Issue a python 3 warning when old style classes are defined.
Type: enhancement Stage: patch review
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, alex, benjamin.peterson, ezio.melotti, pitrou, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-04-15 03:01 by alex, last changed 2015-02-10 08:49 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
old-style-classes.diff alex, 2014-04-15 03:01 review
Messages (5)
msg216273 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-04-15 03:01
This will assist in porting applications from Python2 to Python3.
msg216926 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-04-21 00:05
Your changes in ceval.c introduce a bug (missing braces).

Besides, I'm not sure it's a good idea. What if you're extending a class provided by a third-party library?
(just because it's an old-style class doesn't mean it won't work fine under 3.x)
msg216933 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-04-21 01:20
As I said on irc, I predict this will be extremely spammy not only on the stdlib but also on dependencies which people have no control over.
msg218520 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-05-14 11:06
I agree that this is not a good idea. Old-style classes are legal in Python 2 and this syntax is legal in Python 3 where it means new-style classes and in most cases there is no difference between new-style and old-style classes.
msg228516 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-10-05 00:40
Can this be closed as "won't fix" or what?
History
Date User Action Args
2015-02-10 08:49:31serhiy.storchakasetstatus: pending -> closed
resolution: rejected
2014-10-05 01:08:40ezio.melottisetstatus: open -> pending
2014-10-05 00:40:56BreamoreBoysetstatus: pending -> open
nosy: + BreamoreBoy
messages: + msg228516

2014-06-01 15:16:27serhiy.storchakasetstatus: open -> pending
2014-05-14 11:06:00serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg218520
2014-04-21 01:20:52benjamin.petersonsetmessages: + msg216933
2014-04-21 00:05:35pitrousetnosy: + pitrou, benjamin.peterson
messages: + msg216926
2014-04-20 23:00:17ezio.melottisetnosy: + ezio.melotti

components: + Interpreter Core
stage: patch review
2014-04-15 03:01:53alexcreate