~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to doc/upgrades/2.0/components.html

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>Twisted Documentation: The Twisted Zope Interfaces FAQ</title><link href="../../howto/stylesheet.css" type="text/css" rel="stylesheet" /></head><body bgcolor="white"><h1 class="title">The Twisted Zope Interfaces FAQ</h1><div class="toc"><ol><li><a href="#auto0">FAQ</a></li><ul><li><a href="#auto1">Why is Twisted switching to Zope Interfaces?</a></li><li><a href="#auto2">Why is Twisted switching to Zope Interfaces rather than PyProtocols?</a></li><li><a href="#auto3">Will this affect my deployment?</a></li><li><a href="#auto4">How can I update my own code?</a></li><li><a href="#auto5">
 
2
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>Twisted Documentation: The Twisted Zope Interfaces FAQ</title><link href="../../howto/stylesheet.css" type="text/css" rel="stylesheet" /></head><body bgcolor="white"><h1 class="title">The Twisted Zope Interfaces FAQ</h1><div class="toc"><ol><li><a href="#auto0">Twisted components system in 2.0</a></li><li><a href="#auto1">FAQ</a></li><ul><li><a href="#auto2">Why is Twisted switching to Zope Interfaces?</a></li><li><a href="#auto3">Why is Twisted switching to Zope Interfaces rather than PyProtocols?</a></li><li><a href="#auto4">Will this affect my deployment?</a></li><li><a href="#auto5">How can I update my own code?</a></li><li><a href="#auto6">
3
3
 
4
4
What about third party classes dependant on the old style of implements
5
5
declarations?
6
6
 
7
 
</a></li><li><a href="#auto6">What about using third party classes?</a></li></ul><li><a href="#auto7">Acknowledgements</a></li></ol></div><div class="content"><span></span><p>Twisted code's own use of the <code class="API">twisted.python.components</code> package has been updated to use <a href="http://www.zope.org/Wikis/Interfaces/FrontPage">Zope Interfaces</a> in
 
7
</a></li><li><a href="#auto7">What about using third party classes?</a></li></ul><li><a href="#auto8">Acknowledgements</a></li></ol></div><div class="content"><span></span><h2>Twisted components system in 2.0<a name="auto0"></a></h2><p>Twisted code's own use of the <code class="API">twisted.python.components</code> package has been updated to use <a href="http://www.zope.org/Wikis/Interfaces/FrontPage">Zope Interfaces</a> in
8
8
the 2.0 release.</p><p>New code developed using the 2.0 release of Twisted Core should use Zope
9
9
Interfaces directly rather than using the twisted.python.components
10
 
package.</p><h2>FAQ<a name="auto0"></a></h2><h3>Why is Twisted switching to Zope Interfaces?<a name="auto1"></a></h3><p>
 
10
package.</p><h2>FAQ<a name="auto1"></a></h2><h3>Why is Twisted switching to Zope Interfaces?<a name="auto2"></a></h3><p>
11
11
The twisted.python.components package is a large amount of on-going
12
12
maintainence. Using the Zope Interface package also provides a greater level of
13
13
compatibility between Twisted interfaces and Zope interfaces.
14
 
</p><h3>Why is Twisted switching to Zope Interfaces rather than PyProtocols?<a name="auto2"></a></h3><p>
 
14
</p><h3>Why is Twisted switching to Zope Interfaces rather than PyProtocols?<a name="auto3"></a></h3><p>
15
15
The Zope Interface package was chosen over PyProtocols because of its greater
16
16
conceptual similarity to twisted.python.components.
17
 
</p><h3>Will this affect my deployment?<a name="auto3"></a></h3><p>
 
17
</p><h3>Will this affect my deployment?<a name="auto4"></a></h3><p>
18
18
No. Releases of Twisted Core will include Zope Interfaces.
19
 
</p><h3>How can I update my own code?<a name="auto4"></a></h3><p>
 
19
</p><h3>How can I update my own code?<a name="auto5"></a></h3><p>
20
20
Classes written using twisted.python.components declare which interfaces they
21
21
implement in this style:
22
22
</p><code>
32
32
What about third party classes dependant on the old style of implements
33
33
declarations?
34
34
 
35
 
<a name="auto5"></a></h3><p>
 
35
<a name="auto6"></a></h3><p>
36
36
Use <code base="twisted.python.components" class="API">backwardsCompatImplements</code> to fix this.
37
37
</p><code>
38
38
twisted.python.components.backwardsCompatImplements(C)
39
 
</code><h3>What about using third party classes?<a name="auto6"></a></h3><p>
 
39
</code><h3>What about using third party classes?<a name="auto7"></a></h3><p>
40
40
If you are using third party libraries that only declare __implements__, these
41
41
objects should be made compatible with <code base="twisted.python.components">fixClassImplements</code>: </p><code>
42
42
# import o where o is some third party library
46
46
</code><p>
47
47
This will make sure that __implements__ declarations get converted to the new
48
48
style of implements declarations.
49
 
</p><h2>Acknowledgements<a name="auto7"></a></h2><p>This document is the work of Jason A. Mobarak, with contributions from Mary
 
49
</p><h2>Acknowledgements<a name="auto8"></a></h2><p>This document is the work of Jason A. Mobarak, with contributions from Mary
50
50
Gardiner.</p><!-- 
51
51
<h3>Will my code break?</h3>
52
52
 
128
128
Zope Interface package.
129
129
 
130
130
</p>
131
 
--></div><p><a href="../../howto/index.html">Index</a></p><span class="version">Version: 2.4.0</span></body></html>
 
 
b'\\ No newline at end of file'
 
131
--></div><p><a href="../../howto/index.html">Index</a></p><span class="version">Version: 2.5.0</span></body></html>
 
 
b'\\ No newline at end of file'