|
130.
|
|
|
Classes written using twisted.python.components declare which interfaces they implement in this style:
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:48
|
|
131.
|
|
|
<code> class C: __implements__ = IFoo, </code>
|
|
|
type: Content of: <html><body>
|
|
|
|
<code> class C: __implements__ = IFoo, </code>
|
|
Translated and reviewed by
Thomas LAROCHE
|
|
|
|
Located in
upgrades/2.0/components.xhtml:52
|
|
132.
|
|
|
This should be changed to:
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:58
|
|
133.
|
|
|
<code> class C: zope.interface.implements(IFoo) </code>
|
|
|
type: Content of: <html><body>
|
|
|
|
<code> class C: zope.interface.implements(IFoo) </code>
|
|
Translated and reviewed by
Thomas LAROCHE
|
|
|
|
Located in
upgrades/2.0/components.xhtml:61
|
|
134.
|
|
|
What about third party classes dependant on the old style of implements declarations?
|
|
|
type: Content of: <html><body><h3>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:68
|
|
135.
|
|
|
Use <code class="API" base="twisted.python.components">backwardsCompatImplements</code> to fix this.
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:74
|
|
136.
|
|
|
<code> twisted.python.components.backwardsCompatImplements(C) </code>
|
|
|
type: Content of: <html><body>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:78
|
|
137.
|
|
|
What about using third party classes?
|
|
|
type: Content of: <html><body><h3>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:82
|
|
138.
|
|
|
If you are using third party libraries that only declare __implements__, these objects should be made compatible with <code base="twisted.python.components">fixClassImplements</code>:
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:85
|
|
139.
|
|
|
<code> # import o where o is some third party library from thirdparty.lib import o twisted.python.components.fixClassImplements(o.__class__) </code>
|
|
|
type: Content of: <html><body>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
upgrades/2.0/components.xhtml:89
|