Re: [Twisted-Python] Filing Bugs

2013-12-04 Thread Daniel Sank
> I've filed a website bug about the whole issue (should probably be 3 separate 
> bugs, but I really don't have the patience):

Thanks. I have bunch of functionality and documentation bugs in
twisted.spread.pb to report but as things are right now I can't.

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Filing Bugs

2013-12-04 Thread Gerrat Rickert
> > I assume there's something obvious that I'm missing, but it's flying
> below my visual radar, because I've tried looking everywhere on the
> site.
> 
> I had exactly this problem last night. I googled "twisted password
> reset" and found this page
> 
> http://twistedmatrix.com/trac/reset_password
> 
> I got it to send me a reset password, but that password didn't work (as
> explained in my mailing list post I sent last night).


So, since I couldn't remember my username from before, I decided to just 
register for a new account.
During registration, it informed me:
"Warning: Another account or group already exists, who's name differs from  only by case or is identical"

So I was likely just trying to re-use the same username...
It then took a few tries to guess at the right case for the previous username I 
had used.

...and so finally, I hit upon the right case, and it sent me an email with a 
new password

*Which (as you've mentioned) doesn't work.*

I've filed a website bug about the whole issue (should probably be 3 separate 
bugs, but I really don't have the patience):
https://bugs.launchpad.net/twisted-website/+bug/1257934


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Filing Bugs

2013-12-04 Thread Daniel Sank
> I assume there’s something obvious that I’m missing, but it’s flying below my 
> visual radar, because I’ve tried looking everywhere on the site.

I had exactly this problem last night. I googled "twisted password
reset" and found this page

http://twistedmatrix.com/trac/reset_password

I got it to send me a reset password, but that password didn't work
(as explained in my mailing list post I sent last night).

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Filing Bugs

2013-12-04 Thread Gerrat Rickert
I'd like to file a bug, but the site requires a login.

I'm sure I've registered before, but don't remember my username or password.
Neither the "login" link or "Register" link has any information about how to 
reset a password.
Nor is it present on the home page, or in the FAQ.

...although the Register link does state that:
"Entering an email address will enable you to reset your password if you ever 
forget it."
(I'm pretty sure I did enter an email address when I registered ages ago)

I assume there's something obvious that I'm missing, but it's flying below my 
visual radar, because I've tried looking everywhere
on the site.

I give up...can someone point me to the page/link where I can reset my password 
(to http://twistedmatrix.com - not the mailing list - resetting my password on 
the mailing list is obvious and straightforward).

Thanks,
Gerrat

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Unit testing AMP responder method registration

2013-12-04 Thread Laurens Van Houtven
On Wed, Dec 4, 2013 at 9:02 AM,  wrote:

> https://bazaar.launchpad.net/~game- hackers/game/trunk/view/head:/
> game/test/test_network.py#L418
>


Thanks! I'll see how I can incorporate this. It does seem like the obvious
test. Right now this is more spread out in my tests: I currently test the
locator directly and the command separately.

cheers
lvh
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-04 Thread Glyph

On Dec 2, 2013, at 11:45 AM, Daniel Sank  wrote:

>> One way to fix this is to manually construct a ViewPoint rather than a 
>> Viewable and pass that to the client.
> 
> For the sake of trying to get my current project to work and so that I
> can understand what's really going on and fix the bugs in pb: how
> would I do the similar thing for a Cacheable? Looking at the source so
> far I'm having trouble figuring out where things like Viewable come
> into play.

This isn't quite as clean as with ViewPoint, but it's not all that bad either.  
Basically, you need to inject the correct perspective into the 
RemoteCacheObserver which is constructed; unfortunately it reads it only from 
the jellier.

So: fix the jellier :-).

So something like this might do the trick:

class Perspectiveize(Jellyable):
def __init__(self, perspective, obj):
self.perspective = perspective
self.obj = obj
def jellyFor(self, jellier):
old = jellier.invoker.serializingPerspective
jellier.invoker.serializingPerspective = self.perspective
try:
return self.obj.jellyFor(jellier)
finally:
jellier.invoker.serializingPerspective = old

Untested, but I think it should do the trick.  One caveat though; if the 'obj' 
(in your case, Cacheable) that you wrap with this is serialized twice within 
the same top-level call to 'jelly', (i.e. if there are multiple references to 
it from within a single return message or remote method call) the second time 
it is serialized, it will simply serialize a reference to the first; this means 
you have to be careful to be sure that the Perspectiveize object is serialized 
before the Cacheable itself if the Cacheable is to be serialized at all.

Good luck,

-glyph

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Unit testing AMP responder method registration

2013-12-04 Thread exarkun

On 3 Dec, 01:19 pm, _...@lvh.io wrote:

Hi!

I'm trying to write code using TDD and AMP. I'm trying to figure out 
how to

write a unit test for:

@MyCommand.responder

Specifically, I would assume that test:

1. Tests that the responder locator has a responder for MyCommand;
2. That responder matches the decorated method

(1) is easy, (2) not so much. Since usually the responder locator gives 
me

this nasty "doit" function that isn't introspectable (unless
it.func_closure[0].cell_contents.im_func counts as "introspection"), 
I'm

not sure how to write that unit test.

I do have end-to-end tests for this, obviously: I would like to also 
have

regular tests :)


Here's what I've done:

https://bazaar.launchpad.net/~game- 
hackers/game/trunk/view/head:/game/test/test_network.py#L418


Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python