[Reality] deprecation fixes (maybe)
Jp Calderone
reality@twistedmatrix.com
Tue, 5 Nov 2002 13:12:30 -0500
--bCsyhTFzCvuiizWE
Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr"
Content-Disposition: inline
--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Attached patch gets rid of the authorizer/service deprecation warnings.
Dunno if it's correct (or I wouldn't be posting it here).
--=20
It is practically impossible to teach good programming style to
students that have had prior exposure to BASIC: as potential
programmers they are mentally mutilated beyond hope of
regeneration. -- Dijkstra
--
1:00pm up 3 days, 23:51, 7 users, load average: 0.15, 0.17, 0.13
--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="depr.patch"
Content-Transfer-Encoding: quoted-printable
Index: plumbing.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/Reality/reality/plumbing.py,v
retrieving revision 1.2
diff -u -r1.2 plumbing.py
--- plumbing.py 10 Oct 2002 00:25:04 -0000 1.2
+++ plumbing.py 5 Nov 2002 17:39:27 -0000
@@ -98,7 +99,7 @@
"""
=20
self.write(telnet.IAC+ telnet.WONT+ telnet.ECHO+".....\r\n")
- req =3D self.factory.reality.application.authorizer.getIdentityReq=
uest(self.username)
+ req =3D self.factory.reality.authorizer.getIdentityRequest(self.us=
ername)
self.pw =3D password
req.addCallbacks(self.loggedIn, self.notLoggedIn)
req.arm()
Index: realities.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/Reality/reality/realities.py,v
retrieving revision 1.1
diff -u -r1.1 realities.py
--- realities.py 8 Oct 2002 18:56:39 -0000 1.1
+++ realities.py 5 Nov 2002 17:39:27 -0000
@@ -29,7 +29,7 @@
import twisted
from twisted.python import reflect, reference, delay
from twisted.spread import pb
-from twisted.cred import identity
+from twisted.cred import identity, authorizer
from twisted.persisted import styles
=20
# Sibling Imports
@@ -43,7 +43,7 @@
def __init__(self, name=3D'Reality', app=3DNone):
delay.Delayed.__init__(self)
reference.Resolver.__init__(self, self)
- pb.Service.__init__(self, name, app)
+ pb.Service.__init__(self, name, authorizer=3Dauthorizer.DefaultAut=
horizer(), serviceParent=3Dapp)
self._counter =3D 0
self._ids =3D {} #{id: object}
self._names =3D {} #{name: [objects]}
--liOOAslEiF7prFVr--
--bCsyhTFzCvuiizWE
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
iD8DBQE9yAoOedcO2BJA+4YRAgFKAJ4j55wlMUvxiUB6fgcJJ6fWmCMU9wCg0Juu
kg8BXOZl9QsAAVnaxjYh6uo=
=cUmv
-----END PGP SIGNATURE-----
--bCsyhTFzCvuiizWE--