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() -- Wolfgang

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
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 bug report, but anyway ... This was client with Python3, server with Python2 The same works with my old port to

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

2016-07-28 Thread Wolfgang Rohdewald
Am Donnerstag, 28. Juli 2016, 11:27:15 CEST schrieb Twisted: > The branch there ports PB to Python 3. There might still be a few coverage > issues, and since I trust codecov, I'm not entiirely sure. But this is > definitely worth at least a first pass review at this point. Great news! I should b

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 ___ Twisted-Py

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
Am Freitag, 27. Mai 2016, 08:13:10 schrieb Itamar Turner-Trauring: > On 05/27/2016 04:19 AM, Craig Rodrigues wrote: > > However, Adi has mentioned that in this document: > > http://twistedmatrix.com/trac/wiki/Plan/Python3, > > the strategy of submitting incremental Python3 fixes is not mentioned.

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
Am Mittwoch, 1. Juli 2015, 11:33:58 schrieb Jørn Lomax: > I'm a gsoc student working on the buildbot project, porting it to py3. > Part of this is looking at porting the dependencies buildbot has in > twisted and try to port them. > > twisted.spread is the most used twisted dependency, so I have

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

2015-03-08 Thread Wolfgang Rohdewald
Am Sonntag, 8. März 2015, 12:30:38 schrieben Sie: > Some months ago someone outlined his idea, I believe in the mailing > list in a thread I participated in. should have tried to find it before posting. That was Glyph On Sep 9, 2014, at 08:01 with the subject Re: [Twisted-Python] Python3: should

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

2015-03-08 Thread Wolfgang Rohdewald
Am Sonntag, 8. März 2015, 10:03:03 schrieb Adi Roiban: > Hi, > > I am trying to help porting Twisted on Py3 and for me the fact that > FilePath requires all paths to be bytes is a constant pain. > > To reduce the Unicode pain when working with string my principle is to > do all internal operation

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

2014-11-03 Thread Wolfgang Rohdewald
there now is https://github.com/wrohdewald/twisted.git branch spread-py3-7598 Not all is finished, especially utf-8 wherever Python 3 allows it, pbfailure, and handling of wired exceptions. what should I do next to start getting this into trunk? Maybe - open a ticket for porting banana - crea

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
Hi, while trying to isolate a bug in my app, I found some strange differences between the implementations of remote_* and perspective_*. 1. in pb.Broker.serialize(), those attributes are set and restored: jellyMethod, jellyArgs, jellyKw. Within twisted Those attributes are not used anywhere

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

2014-10-05 Thread Wolfgang Rohdewald
Am Sonntag, 5. Oktober 2014, 19:58:29 schrieb exar...@twistedmatrix.com: > For example, following the plan, I would have expected to see perhaps > two patches to port the banana module: one to add the missing test > coverage and one to make any and all changes necessary to get the test > suite t

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

2014-10-05 Thread Wolfgang Rohdewald
Am Sonntag, 5. Oktober 2014, 14:20:35 schrieb exar...@twistedmatrix.com: > >>I noticed that you also changed 'x' to b'x' in some places. I did > >>not do that yet because it is not needed for those tickets, I wanted > >>to keep them small and focussed. > > I think I only did this where new uses of

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 so many patches to Twisted. It

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
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 things I already did right) I noticed that you also changed 'x' to b'x' in some places. I did not do that yet because it is not needed for those tickets,

[Twisted-Python] porting twisted.spread to Python3

2014-10-03 Thread Wolfgang Rohdewald
I now have a local git branch with about 70 commits, always rebased onto current trunk. Those test suites pass with Python2 and Python3: test_banana, test_jelly, test_pb, test_pbfailure, test_persisted I also have a real app using PB (kajongg, a KDE game). Running the server and the client with

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

2014-09-29 Thread Wolfgang Rohdewald
Am Montag, 29. September 2014, 00:07:33 schrieb Glyph: > This week I will try to get > merged, which requires exactly pep8 1.5.1 Ubuntu 14.04 installs 1.4.6 I have the current 1.5.7 After downgrading to 1.4.6, twistedchecker works correc

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

2014-09-28 Thread Wolfgang Rohdewald
Am Sonntag, 28. September 2014, 17:15:37 schrieb Glyph: > How did you install twistedchecker? installing is not even needed: git clone https://github.com/twisted/twistedchecker cd twistedchecker ~/src/Twisted/bin/trial twistedchecker trial being the latest from twisted svn trunk, I get the same

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

2014-09-27 Thread Wolfgang Rohdewald
I am getting this traceback on about every source file like: i5:~/ssdsrc/alt/Twisted/twisted/test (pb3) twistedchecker reflect_helper_ZDE.py * Module reflect_helper_ZDE W9001: 1,0: Missing copyright header W9002: 1,0: Missing a reference to test module in header C0103: 1,0: Invalid

[Twisted-Python] jelly and instances

2014-09-09 Thread Wolfgang Rohdewald
doc says: Instance: s is an instance of UserString.UserString, with a __dict__ {'data': 'hello'}:: [\"UserString.UserString\", ['dictionary', ['data', 'hello']]] There is no test for instances. To be precise, no test ever enters jelly._unjelly_instance() I also cannot find any place in jelly

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

2014-09-09 Thread Wolfgang Rohdewald
Am Montag, 8. September 2014, 23:01:50 schrieb Glyph: > This implies a parallel structure might be possible for FilePath: > if you pass its constructor bytes, you get a BytesFilePath; > if you pass it text, you get a TextFilePath. You can't mix the two, > and once you've chosen a path you can't ch

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

2014-09-08 Thread Wolfgang Rohdewald
Am Montag, 8. September 2014, 12:04:46 schrieb exar...@twistedmatrix.com: > PB supports unicode perfectly well and has for many years. This is why > I asked which specific part of PB has a problem. PB transfers names of methods and classes as bytes, not as unicode. Which is logical since PY2 doe

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

2014-09-08 Thread Wolfgang Rohdewald
Am Montag, 8. September 2014, 10:54:44 schrieb exar...@twistedmatrix.com: > Can you point out the specific places where you think PB needs to start > using UTF-8 instead of ASCII? Those are the places that need to be > fixed, not the underlying porting helpers they happen to use. My question is

[Twisted-Python] PEP3131: non-ascii identifiers

2014-09-08 Thread Wolfgang Rohdewald
This does not seem to be supported by Python yet. Should that be enabled at all? If one process with PY3 sends such identifiers to a separate process with PY2, that will fail. I am not sure if that would be a problem, whoever uses this must make sure PY3 is used everywhere. If this should be for

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 see the reviewer check list > it

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

2014-09-07 Thread Wolfgang Rohdewald
The porting guide says No byte paths in sys.path. I am not sure what this means, I would assume that file paths should always be native strings. Or does it mean that sys.path must only contain ascii bytes? doc for FilePath says On both Python 2 and Python 3, paths can only be bytes. and sv

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

2014-09-03 Thread Wolfgang Rohdewald
Am Mittwoch, 3. September 2014, 00:29:59 schrieb Glyph: > > That is my problem. How do I know if the object is of a non-class class? > > isinstance(something, (types.ClassType, type)). but that will make it possible to attach a method even to type "int" Python2: >>> isinstance(int, type) True

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

2014-09-02 Thread Wolfgang Rohdewald
I still do not like "non-class class" because this is a contradiction in itself. Anyway a non-class class is a class whose objects may not get a method attached. So far so good, but that was obvious. Am Dienstag, 2. September 2014, 16:29:41 schrieb Glyph Lefkowitz: > Except I think it might be

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

2014-09-01 Thread Wolfgang Rohdewald
>From spread/jelly.py in _unjelly_method: -if type(im_class) is not types.ClassType: raise InsecureJelly("Method found with non-class class.") Same problem in _unjelly_instance What is a non-class class or rather what sort of types is meant to be insecure? Suggestions for a

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

2014-09-01 Thread Wolfgang Rohdewald
Am Montag, 1. September 2014, 11:57:22 schrieb exar...@twistedmatrix.com: > >Why has this fix never been included? It is necessary for porting to > >Python 3. > > Perhaps because the ticket was never given the "review" keyword - so no > one ever noticed that there was a potential fix attached to

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

2014-09-01 Thread Wolfgang Rohdewald
Hi, while trying to port jelly to Python 3 (banana tests already pass with Python 3), I found a bug in jelly. It has already been reported 3 years ago with ticket 4935. And there is a fix attached to that ticket. This fix resolves the problem for me. Why has this fix never been included? It

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

2014-08-30 Thread Wolfgang Rohdewald
Am Samstag, 30. August 2014, 21:28:19 schrieb Stefan Hesse: > I hope it is ok when I post the link to stackoverflow, where I already > explained the problem. > File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1001, in > write value = networkString('%s' % (value,)) File "/us

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-Python maili

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

2012-06-14 Thread Wolfgang Rohdewald
Am Donnerstag, 14. Juni 2012, 14:46:45 schrieb Vladimir Perić: > As far as Ubuntu itself is concerned, I wasn't aware that Twisted is > available from the default Ubuntu CD. you are right, it is not. I thought all of kdegames is preinstalled but actually only kpat is there. Sorry for the noise. -

[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-Python

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

2012-03-19 Thread Wolfgang Rohdewald
this is twisted 11.0.0 on kubuntu 11.10 if I call cd /usr/share/doc/python-twisted-words/examples/pb_client.py python pb_client.py fdfdasfdfdas.com 1000 a b c I am getting an unhandled error. Same for servers not answering or rejecting. how would I have to modify pb_client if I want to catch an

Re: [Twisted-Python] CopyableFailure fails

2012-02-06 Thread Wolfgang Rohdewald
Am Montag, 6. Februar 2012, 23:12:29 schrieb exar...@twistedmatrix.com: > On 08:07 pm, wolfg...@rohdewald.de wrote: > >Hi, > > >with twisted 11.0.0 and python 2.7, my error fails here: > Hello, > > Please provide a minimal example reproducing the problem so we can > discuss it. See http://sscce

[Twisted-Python] safe_str is not safe

2012-02-06 Thread Wolfgang Rohdewald
after patching CopyableFailure as written, the stack trace now ends with the following lines. The correct exception message is still not shown. It contains unicode chars which reflect.py/safe_str cannot handle. File "/hdd/pub/src/gitgames/kajongg/src/scoringengine.py", line 170, in initRuleset

[Twisted-Python] CopyableFailure fails

2012-02-06 Thread Wolfgang Rohdewald
Hi, with twisted 11.0.0 and python 2.7, my error fails here: File "/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: 'ascii' c

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

2010-01-25 Thread Wolfgang Rohdewald
I would like to announce Kajongg - it is a Mah Jongg game (not yet another solitaire but the real game for four players). It is written 100% in python and regular expressions. The GUI is done with PyQt4, and the network part is written using twisted. Dear twisted people - you have a list of proj

Re: [Twisted-Python] order of remote requests

2009-12-29 Thread Wolfgang Rohdewald
On Tuesday 29 December 2009, David Ripton wrote: > TCP guarantees in-order message delivery. If you send A before B > over the same TCP connection, and A and B reach the client, then > the client will receive A before B. Of course - now I wonder what made me think otherwise. Thank you for your

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
I tried this example: http://twistedmatrix.com/projects/core/documentation/howto/pb-cred.html#auto18 (scripts chatserver.py and chatclient.py) but they do not work with python 2.6.4 (twisted 8.2.0). Before the client can do much, the server function User.detached is called resulting in an except