[issue672115] Assignment to __bases__ of direct object subclasses

2022-03-22 Thread Géry

Change by Géry :


--
versions: +Python 3.11 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2022-03-22 Thread Géry

Change by Géry :


--
nosy: +maggyero

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2016-12-07 Thread Eli Collins

Changes by Eli Collins :


--
nosy: +eli.collins

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2016-07-11 Thread Memeplex

Memeplex added the comment:

I understand Michael's comment http://bugs.python.org/issue672115#msg14169 but 
I'm failing to see how it's directly related to this issue: as Michael himself 
said it's even relevant for the object-subclass-object hack or for any 
hierarchy whatsoever. Is the comment warning about the entire writable-bases 
idea? It feels to me like the behavior should be consistently extended or 
consistently banned, but currently some cases work, another cases don't, and 
there seems to be no clear rationale supporting this state of affairs. Am I 
wrong?

--
nosy: +memeplex

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2015-06-11 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
type: behavior - enhancement
versions: +Python 3.6 -Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2015-06-10 Thread Boris

Changes by Boris bor...@appliedinfogroup.com:


--
nosy: +borisompol

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2014-03-13 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2013-05-27 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2013-05-27 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
nosy: +lukasz.langa

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2013-05-25 Thread Mark Lawrence

Mark Lawrence added the comment:

Has any work been done on typeobject.c to render this obsolete?  Failing that 
are there any souls brave enough to take on typeobject.c?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2012-10-22 Thread Krzysztof Jurewicz

Changes by Krzysztof Jurewicz krzysztof.jurew...@gmail.com:


--
nosy: +krzysiekj

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2012-06-26 Thread florian-rathgeber

Changes by florian-rathgeber florian.rathge...@gmail.com:


--
nosy: +florian-rathgeber

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2012-03-31 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee: mwh - 
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2012-02-23 Thread Adam Venturella

Adam Venturella aventure...@gmail.com added the comment:

I too just found the same issue, dunno if it was settled on as being a bug per 
se. 

class object(object): pass 

Also worked for me. I don't feel great about doing that though. So I opted for 
more verbose name as not to collide with object

I have to wonder, since it's been 9 years, if all of us finding this issue are 
guilty of doing it wrong =)

--
nosy: +aventurella

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2010-08-17 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
stage:  - needs patch
type:  - behavior
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2010-05-27 Thread Hari Krishna Dara

Hari Krishna Dara harid...@gmail.com added the comment:

I just hit up on this same bug and the class object(object): pass workaround 
worked fine. I too would like to know how safe this workaround is, could 
someone more insightful please comment on this?

--
nosy: +Hari.Krishna.Dara

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2009-05-30 Thread Lars

Lars gemer...@gmail.com added the comment:

ok, i see what you mean, for me at this time the most important question
is whta does 

class object(object)
pass

do, why can i change baseclasses after i redeclare object this way, and
will it get me into trouble when i use this to let users dynamically
define classes and inheritence relationships?

cheers

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2009-05-29 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Lars, I think that your question has a simple explanation, and is not
related to the original issue:
- On 4th line, the variable named A is bound to a new type object.
This type has no attribute by itself.
- The first dir(A) displays the attributes of the bases class, which are
the previous A and B: you see ['one', 'two']
- The second dir(A) displays the attributes of the bases class, which
are B and C: you see ['two', 'three']

The instruction A = type(...) causes A to refer to another object; it
does not change the object previously contained in A.

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2009-04-21 Thread Lars

Lars gemer...@gmail.com added the comment:

in my project i need to be able to let the user dynamically make and
remove inheritance relationships between classes and in my testing i
think i have run into this issue assigning to __bases__. the

class object(object):
pass

trick seems to work, but i can't really oversee the consequenses. I also
saw another variation which might be the same issue:

A= type(A, (object,), {'one': 1})
B= type(B, (object,), {'two': 2})
C= type(C, (object,), {'three': 3})

A = type(A,(A,B),{})

print dir(A)
print A.__bases__
print '---'
A.__bases__ = (B,C)
print dir(A)
print A.__bases__
print '---'

no exceptions, but the second dir(A) shows that A has lost its attribute
'one'

if the class object(object) trick is not safe, is there a way to get the
dynamic inheritance behaviour in another way, e.g. through metaclasses?

--
nosy: +farcat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2008-07-21 Thread lorph

lorph [EMAIL PROTECTED] added the comment:

Is anyone still working on this? It seems like an oddity of python that
has been a stumbling block for me to create a super reload.

I've found that i am able to bypass this problem by creating the
following definition:

class object(object):pass

However, this feels like an ugly hack.

--
nosy: +lorph

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2008-07-21 Thread Michael Hudson

Michael Hudson [EMAIL PROTECTED] added the comment:

Another 3 and a bit years on wink I still think my comment
http://bugs.python.org/msg14169 is the crux of the issue.  It's even
relevant to your class object(object): pass hack!

I'm not at all likely to work on this any time soon myself.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com