Re: [Twisted-Python] How to get caller’s IP address in Perspective Broker server

2017-01-19 Thread Wolfgang Rohdewald
Am Montag, 16. Januar 2017, 22:50:36 CET schrieb Glyph Lefkowitz: > This is untested but hopefully it will be close enough to put you on your > way. Make sense? if you plan to use the portal/realm/avatar things later on, you can use avatar.source() -- Wo

Re: [Twisted-Python] [Twisted] #7598: Port twisted.spread.pb to Python3

2016-08-11 Thread Wolfgang Rohdewald
Am Dienstag, 2. August 2016, 10:45:32 CEST schrieb Wolfgang Rohdewald: > Am Donnerstag, 28. Juli 2016, 11:27:15 CEST schrieb Twisted: > > #7598: Port twisted.spread.pb to Python3 > > did you test with client on Python2 and server on Python3 and vice versa? > > Not a b

Re: [Twisted-Python] [Twisted] #7598: Port twisted.spread.pb to Python3

2016-08-02 Thread Wolfgang Rohdewald
Am Dienstag, 2. August 2016, 03:39:58 CEST schrieb Glyph Lefkowitz: > Probably we should up-convert from bytes automatically in the places > where we know python will be using the values as identifiers, including > callRemote and the keys in a __dict__. Attached is some grep for my port showing

Re: [Twisted-Python] [Twisted] #7598: Port twisted.spread.pb to Python3

2016-08-02 Thread Wolfgang Rohdewald
netResult = object.remoteMessageReceived(self, message, netArgs, netKw) File "/home/wr/src/kajongg/src/twisted/spread/flavors.py", line 120, in remoteMessageReceived state = method(*args, **kw) builtins.TypeError: remote_move() keywords must be strings -- Wolfgang _

Re: [Twisted-Python] [Twisted] #7598: Port twisted.spread.pb to Python3

2016-07-28 Thread Wolfgang Rohdewald
ews! I should be able to do some testing next week -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Porting PB to python3

2016-06-12 Thread Wolfgang Rohdewald
Am Freitag, 10. Juni 2016, 12:39:20 CEST schrieb Craig Rodrigues: > I hope you haven't lost interest in this, and are still willing to push > forward. Maybe in autumn. But I rather hope somebody else would continue with this. -- Wolfgang

Re: [Twisted-Python] Need clarification on reviews for Python 3 fixes for Twisted

2016-06-04 Thread Wolfgang Rohdewald
Am Samstag, 4. Juni 2016, 04:41:37 schrieb Craig Rodrigues: > On Fri, May 27, 2016 at 6:14 AM, Wolfgang Rohdewald < > wolfgang@rohdewald.de> wrote: > > > Am Freitag, 27. Mai 2016, 08:13:10 schrieb Itamar Turner-Trauring: > > > > This would have been helpful w

Re: [Twisted-Python] Need clarification on reviews for Python 3 fixes for Twisted

2016-05-27 Thread Wolfgang Rohdewald
rt is now bitrotting. I did try hard to deliver simple changes (like print()) before tackling harder problems but not much of all that went into the source code. Interest in PB does not seem very high. Anyway there still is the public git fork (I did mention it here at that time) - if anybody

Re: [Twisted-Python] Porting twisted.spread.banana to py3

2015-07-03 Thread Wolfgang Rohdewald
ificial maxint to use for python3. I might want to note that it is > not used for comparison, but to create an integer over a given size: i5:~/tmp/twisted/twisted/test (spread-py3-7598) git show a0d35fa commit a0d35fa912b055bd65fb76b597de1d64675711d8 Author: Wolfgang Rohdewald Date: Sun Nov 2

Re: [Twisted-Python] Porting twisted.spread.banana to py3

2015-07-01 Thread Wolfgang Rohdewald
cieved (banana.py:174). A chunk is added to the > buffer. On python3, how should the distinction be made between string > and bytes. Buffer seems to be a string, the chunk seems to be bytes, and > sometimes opposite. I believe that chunk is a banana-encoded string, so ther

Re: [Twisted-Python] t.p.filepath and Unicode

2015-03-08 Thread Wolfgang Rohdewald
ython3: should paths be bytes or str? -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] t.p.filepath and Unicode

2015-03-08 Thread Wolfgang Rohdewald
accepts all types of string. It keeps a 1:1 copy of that string and has attributes returning the variant that the caller needs, converting on the fly. There also is bug report 7166. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] porting twisted.spread to Python3

2014-11-03 Thread Wolfgang Rohdewald
- create a branch with all commits for that - do a pull request I do not want to create one big patch because I think it is helpful to have more smaller commits. But I probably should wait with all that until ticket 7664 is merged. -- Wolfgang

Re: [Twisted-Python] spread: differences between remote_ and perspective_ needing an explanation

2014-10-11 Thread Wolfgang Rohdewald
Am Samstag, 11. Oktober 2014, 23:30:56 schrieb Wolfgang Rohdewald: > 2. Those implementations differ: > remote_*: return broker.serialize(state, self.perspective) > perspective_*: return broker.serialize(state, self, method, args, kw) > view_*: return broker.ser

[Twisted-Python] spread: differences between remote_ and perspective_ needing an explanation

2014-10-11 Thread Wolfgang Rohdewald
AttributeError when call is made to remote_ method that doesn't exist -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] porting twisted.spread to Python3

2014-10-05 Thread Wolfgang Rohdewald
> suite to pass on Python 3. Impossible. test_jelly imports pb, test_pb imports jelly. But I can of course reduce the number of tickets related to porting and put more than one patchfile into them. -- Wolfgang ___ Twisted-Python mailing list Tw

Re: [Twisted-Python] my branches merged by you (exarkun)

2014-10-05 Thread Wolfgang Rohdewald
of the module to > >>be tested. > > I'm also unsure about this one. Cases like svn r43221 Hoist the use of this private API to a single location in a helper function. which explains why we need to use the private API. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] porting twisted.spread to Python3

2014-10-05 Thread Wolfgang Rohdewald
Am Sonntag, 5. Oktober 2014, 13:48:12 schrieb exar...@twistedmatrix.com: > On 3 Oct, 11:09 pm, wolfgang@rohdewald.de wrote: > >I now have a local git branch with about 70 commits, always > >rebased onto current trunk. > > It makes me sad to learn you're carrying

Re: [Twisted-Python] my branches merged by you (exarkun)

2014-10-05 Thread Wolfgang Rohdewald
That should have been exarkun, not itamar. Sorry for that. Am Sonntag, 5. Oktober 2014, 11:59:40 schrieb Wolfgang Rohdewald: > Thanks for fixing my mistakes! > > Based on your fixes I started a personal checklist, see below. > Is that list correct so far? (it will not include thin

[Twisted-Python] my branches merged by you (itamar)

2014-10-05 Thread Wolfgang Rohdewald
m in docstrings test docstring: describe what happens, including exceptions doc: avoid mentioning the private API -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] porting twisted.spread to Python3

2014-10-03 Thread Wolfgang Rohdewald
). REMOVE AGAIN python.compat: nativeIdentifier accepts non-unicode. NEEDED WHY? TEST CASE MISSING test.test_{banana,jelly,pb,pbfailure,persisted}: from __future__ test.test_pbfailure: make literal strings bytes test.test_pbfailure: replace StringIO with io.BytesIO spread.flavors

Re: [Twisted-Python] twistedchecker TypeError: modifiedBlankLines() takes exactly 6 arguments (7 given)

2014-09-29 Thread Wolfgang Rohdewald
hecker works correctly. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] twistedchecker TypeError: modifiedBlankLines() takes exactly 6 arguments (7 given)

2014-09-28 Thread Wolfgang Rohdewald
ame error pylint --version No config file found, using default configuration pylint 0.26.0, astng 0.24.3, common 0.61.0 Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] -- Wolfgang ___ Twisted-Python mailing list Twisted-Pyt

[Twisted-Python] twistedchecker TypeError: modifiedBlankLines() takes exactly 6 arguments (7 given)

2014-09-27 Thread Wolfgang Rohdewald
or (): File "/usr/lib/python2.7/dist-packages/pep8-1.5.7-py2.7.egg/pep8.py", line 1278, in run_check return check(*arguments) TypeError: modifiedBlankLines() takes exactly 6 arguments (7 given) -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] jelly and instances

2014-09-09 Thread Wolfgang Rohdewald
s jelly._unjelly_instance() I also cannot find any place in jelly.py where an Instance would be jellied. There is instance_atom = 'instance' but instance_atom is not used anywhere. Is this outdated code? If not, could you please give me a code example using this? -- Wolfgang _

Re: [Twisted-Python] Python3: should paths be bytes or str?

2014-09-09 Thread Wolfgang Rohdewald
hosen a path you can't choose a different one. this sounds good. After the port of pb to PY3 is done, I might have a look at it, it probably should be done before trying to port modules.py and trial to PY3. -- Wolfgang ___ Twisted-Python

Re: [Twisted-Python] PEP3131: non-ascii identifiers

2014-09-08 Thread Wolfgang Rohdewald
ges defined by PEP 3131. see my first mail in this thread: take test_pb.py, rename getSimple to getSimpleä, run the test. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] PEP3131: non-ascii identifiers

2014-09-08 Thread Wolfgang Rohdewald
ocs, IMHO. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] PEP3131: non-ascii identifiers

2014-09-08 Thread Wolfgang Rohdewald
ng(s): if not isinstance(s, unicode): raise TypeError("Can only convert text to bytes on Python 3, I got %r" % (s,)) -return s.encode('ascii') + return s.encode('utf-8') def networkChar(integer): ""&q

Re: [Twisted-Python] Python3: should paths be bytes or str?

2014-09-08 Thread Wolfgang Rohdewald
Am Montag, 8. September 2014, 02:14:10 schrieb exar...@twistedmatrix.com: > On 01:26 am, wolfgang@rohdewald.de wrote: > >The porting guide says > > > >No byte paths in sys.path. > > What porting guide is that? https://twistedmatrix.com/trac/wiki/Plan/Python3

[Twisted-Python] Python3: should paths be bytes or str?

2014-09-07 Thread Wolfgang Rohdewald
ng(moduleObject)), File "/home/wr/ssdsrc/Twisted/twisted/python/modules.py", line 627, in _findEntryPathString if _isPackagePath(FilePath(topPackageObj.__file__)): File "/home/wr/ssdsrc/Twisted/twisted/python/filepath.py", line 664, in __init__ assert isinstance(path,

Re: [Twisted-Python] what is a non-class class?

2014-09-03 Thread Wolfgang Rohdewald
on itself will reject most: >>> a=int >>> a.x=5 Traceback (most recent call last): File "", line 1, in TypeError: can't set attributes of built-in/extension type 'int' -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] what is a non-class class?

2014-09-02 Thread Wolfgang Rohdewald
asses. I cannot check if the object is of type "type" because int is also of type "type". An int certainly should not get a method attached. Then we could just as well remove this check. That is why I proposed to instead exclude a list of basic types int

[Twisted-Python] what is a non-class class?

2014-09-01 Thread Wolfgang Rohdewald
>>> class B: ... pass ... >>> type(B) Python 3.3: >>> class A: ... pass ... >&g

Re: [Twisted-Python] jelly with new-style classes: method references are not resolved

2014-09-01 Thread Wolfgang Rohdewald
re was a potential fix attached to it. So I should formally be able to review this since I am not the author. What I can say for certain is that the fix looks OK, and porting to Python3 depends on it. Could somebody else please review this ticket 4935? -- Wolfgang ___

[Twisted-Python] jelly with new-style classes: method references are not resolved

2014-09-01 Thread Wolfgang Rohdewald
is necessary for porting to Python 3. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Twisted throws error for more or less no reason

2014-08-30 Thread Wolfgang Rohdewald
ly pass-through bytes on Python 2") # Ensure we're limited to ASCII subset: s.decode('ascii') You could check if what you get here is not a str but unicode. You could change the error message to include the type and value of s -- Wolfgang _

Re: [Twisted-Python] Maximum number of SSL connections to the server

2014-01-13 Thread Wolfgang Rohdewald
Am Montag, 13. Januar 2014, 18:58:01 schrieb Sumanth Puram: > Now it fails after 1010 successful connections which limit did you raise? Per process or systemwide? 1010 sound like you have a limit of 1024 somewhere -- Wolfgang ___ Twisted-Pyt

Re: [Twisted-Python] twisted/python3/ubuntu 12.10

2012-06-14 Thread Wolfgang Rohdewald
r the noise. -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] twisted/python3/ubuntu 12.10

2012-06-14 Thread Wolfgang Rohdewald
it seems that Ubuntu 12.10 will only preinstall Python3, no Python2.7. So programs using twisted (including my own) will not come preinstalled. how is progress going with twisted and Python3? -- Wolfgang ___ Twisted-Python mailing list Twisted

[Twisted-Python] unhandled error in example pb_client.py

2012-03-19 Thread Wolfgang Rohdewald
amen geh\xc3\xb6rt keine Adresse." so it is translated to German. But pb_client.py returns english messages if I insert and use myClient. $LANG is the same for both: de_DE.UTF-8 so why does pb_client not translate the message? -- Wolfgang ___ Twist

Re: [Twisted-Python] CopyableFailure fails

2012-02-06 Thread Wolfgang Rohdewald
"/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7-linux-x86_64.egg/twisted/spread/pb.py", line 407, in getStateToCopy state['value'] = str(self.value) # Exception instance exceptions.UnicodeEncodeError: UnicodeEncodeError('ascii', u'just one unicode char:\xe4', 22, 23, 'ordinal not in range(128)') -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] safe_str is not safe

2012-02-06 Thread Wolfgang Rohdewald
542,7 @@ w(self.type + "\n") else: w("%s: %s\n" % (reflect.qual(self.type), -reflect.safe_str(self.value))) +reflect.safe_repr(self.value))) # chaining if isinstance(self.value, Fa

[Twisted-Python] CopyableFailure fails

2012-02-06 Thread Wolfgang Rohdewald
repr(self.value) # Exception instance if isinstance(self.type, str): state['type'] = self.type else: -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-05 Thread Wolfgang
unusable web ui so -1 on that. Also python has moved to mercurial and bitbucket catched up in features to github. Why should we move to a "no Python system" ? Regards, Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatri

Re: [Twisted-Python] ClientFactory: implementing Request/Response with a persistent connection

2011-02-05 Thread Wolfgang Powisch
Am 2011-02-03 23:26, schrieb Johann Borck: > Then there's a project called txconnpool at > http://pypi.python.org/pypi/txconnpool, maybe it does what you want. thx ... that's great. except that it costs me some time to realize that it's missing error-handling and a errback'ing Protocol causes it

[Twisted-Python] ClientFactory: implementing Request/Response with a persistent connection

2011-02-02 Thread Wolfgang Powisch
Hello, I need to talk to a Line-based TCP service from a Twisted Application. The remote server will accept requests and send a response. I do NOT want to open a NEW TCP-Connection for each request. Are there any examples how to send concurrent requests over a single conenction ? .. so that my m

[Twisted-Python] Kajongg - a new game base on PyQt and twisted

2010-01-25 Thread Wolfgang Rohdewald
projects using twisted - if you want to add Kajongg, please go ahead! http://www.kde-apps.org/content/show.php/kajongg?content=103206 source code: svn co svn://anonsvn.kde.org/home/kde/trunk/playground/games/kajongg -- Wolfgang ___ Twisted-Python

Re: [Twisted-Python] order of remote requests

2009-12-29 Thread Wolfgang Rohdewald
k you for your explanation! -- Wolfgang ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] order of remote requests

2009-12-29 Thread Wolfgang Rohdewald
On Tuesday 29 December 2009, Andrew Bennetts wrote: > Wolfgang Rohdewald wrote: > > when I send two remote calls A and B over the network, in that > > order, using the twisted perspective broker callRemote method, > > is it granted that A is processed first on the other side e

[Twisted-Python] order of remote requests

2009-12-29 Thread Wolfgang Rohdewald
Hi, when I send two remote calls A and B over the network, in that order, using the twisted perspective broker callRemote method, is it granted that A is processed first on the other side even if B arrives first? Or should I only send B after I got an answer to A? -- Wolfgang

[Twisted-Python] pb, viewable, avatars: The example chatserver is buggy

2009-11-17 Thread Wolfgang Rohdewald
documentation should perhaps mention that the client can only connect to the server once because the server code does not remove a user from her group when she detaches. Is there any more complete example anywhere with better error handling? -- Wolfgang

Re: [Twisted-Python] adbapi and long-running transactions

2009-04-10 Thread Wolfgang Powisch (privat)
Am 10.04.2009 18:16, Wolfgang Powisch (privat) schrieb: > What I need now is to start a Transaction and access this Transaction from > multiple callbacks within my application-code in the main-thread. In the last > callback (and/or errback) I will then either commit or rollback the >

[Twisted-Python] adbapi and long-running transactions

2009-04-10 Thread Wolfgang Powisch (privat)
unction called with connectionpool._deferToThread -> this doesn't work, because I seem to end up in the wrong thread and another (or no) transaction. thx in advance for your help regards, Wolfgang ___ Twisted-Python mail