twisted / twisted

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

PATCH: Pass correct __module__ and __doc__ to InterfaceClass #10415

Closed twisted-trac closed 19 years ago

twisted-trac commented 19 years ago
jml's avatar @jml reported
Trac ID trac#646
Type defect
Created 2004-06-30 19:23:28Z

Attachments:

Searchable metadata ``` trac-id__646 646 type__defect defect reporter__jml jml priority__high high milestone__ branch__ branch_author__ status__closed closed resolution__fixed fixed component__ keywords__ time__1088623408000000 1088623408000000 changetime__1088628065000000 1088628065000000 version__ owner__ cc__itamarst cc__jml ```
twisted-trac commented 13 years ago
Automation's avatar Automation removed owner
twisted-trac commented 19 years ago
jml's avatar @jml commented
#!html
<pre>
_All_ classes inheriting from t.p.components were producing DeprecationWarnings,
saying that they should use only interface.Attributes and functions. This was
because __module__ and sometimes __doc__ were in the attrs dict passed to
MetaInterface.

Attached is a patch that retrieves and deletes __module__ and __doc__ from
attrs, and passes them to InterfaceClass.

This removes a significant number of DeprecationWarnings.

Tested successfully in Python 2.3 under Windows, against subversion HEAD of June
30, 1:22PM UTC.
</pre>
twisted-trac commented 19 years ago
jml's avatar @jml commented
#!html
<pre>
Apologies for the pdb crap.
Changing the stacklevel may not have been for the better. Not sure.
</pre>
twisted-trac commented 19 years ago
jml's avatar @jml commented
#!html
<pre>
Sorry for the spam, Itamar.

- No PDB crap
- No commented out crap
- Special case __instadapt__ doesn't need deprecation warnings.
</pre>