twisted / twisted

Event-driven networking engine written in Python.
https://www.twisted.org
Other
5.44k stars 1.14k forks source link

Adapter code accessing __instadapt__ raises DeprecationWarning #11276

Closed twisted-trac closed 19 years ago

twisted-trac commented 19 years ago
jml's avatar @jml reported
Trac ID trac#647
Type defect
Created 2004-07-01 11:18:23Z
Searchable metadata ``` trac-id__647 647 type__defect defect reporter__jml jml priority__high high milestone__ branch__ branch_author__ status__closed closed resolution__fixed fixed component__ keywords__ time__1088680703000000 1088680703000000 changetime__1088714394000000 1088714394000000 version__ owner__ cc__itamarst cc__jml ```
twisted-trac commented 13 years ago
Automation's avatar Automation removed owner
twisted-trac commented 19 years ago
itamarst's avatar @itamarst commented
#!html
<pre>
__instadapt__ happens only when you define an __adapt__ on the Interface, which
is *also* deprecated up the wazoo. So I'm not sure there's much point in fixing
this.
</pre>
twisted-trac commented 19 years ago
jml's avatar @jml commented
#!html
<pre>
Sometimes, when you adapt an object to an interface, t.p.components checks if
__instadapt__ is a member of the interface. This calls __getattr__ somehow,
which raises a DeprecationWarning.

I'd patch, but I'm not sure whether we want to ignore then entire __getattr__
apparatus, or just the warning.
</pre>