Ticket #3054 defect closed fixed

Opened 5 years ago

Last modified 5 years ago

Small error in the documentation for pb

Reported by: njal Owned by:
Priority: normal Milestone:
Component: pb Keywords:
Cc: Branch: branches/setcopierforclass-docs-3054-3
Author: exarkun Launchpad Bug:

Description

I was looking at the documentation for t.s.pb today (for Copyable specifically), and after following the pb-intro-howto, I found the following small issues:

http://twistedmatrix.com/trac/browser/trunk/doc/core/howto/pb-intro.xhtml#L243

should read

flavors.setCopierForClass(Foo, RemoteFoo) # (or even setUnjellyableForClass)

As it stands now, using str(Foo), will result the follow if defined in module 'model':

twisted.spread.jelly.InsecureJelly: Module model not allowed (in type model.Foo).

I have not checked this with any other python-version than python 2.5.1 on OS X Leopard.

Also, the docstring for this function: http://twistedmatrix.com/trac/browser/trunk/twisted/spread/jelly.py#L191 refers to MyCopier, but this probably should read MyJellier?

197	
198	        jellier.setUnjellyableForClass('module.package.Class', MyJellier).
199	
200	    Call this at the module level immediately after its class
201	    definition. MyCopier should be a subclass of RemoteCopy.

Attachments

pbintro.patch Download (1.0 KB) - added by njal 5 years ago.
Diff against current trunk that changes the documentation and docstring.

Change History

Changed 5 years ago by njal

Diff against current trunk that changes the documentation and docstring.

1

Changed 5 years ago by exarkun

  • owner changed from warner to exarkun
  • status changed from new to assigned

2

Changed 5 years ago by exarkun

  • branch set to branches/setcopierforclass-docs-3054
  • author set to exarkun

(In [22697]) Branching to 'setcopierforclass-docs-3054'

3

Changed 5 years ago by exarkun

  • owner exarkun deleted
  • status changed from assigned to new
  • keywords review added

I got rid of the rest of the uses of the setCopier APIs and gave pb.py an __all__ too. I deprecated some things too and did some other random junk.

4

Changed 5 years ago by therve

  • keywords review removed
  • owner set to exarkun
  • what's the purpose of _version1 in twisted/init.py?
  • pyflakes errors: twisted/enterprise/util.py:9: 'Version' imported but unused
  • there are modifications in 2 untested files, gtkmanhole and spelunk_gnome. Tickets should probably be opened to add test for them

Thanks.

5

Changed 5 years ago by exarkun

(In [22728]) remove unused Version and unused import

refs #3054

6

Changed 5 years ago by exarkun

  • branch changed from branches/setcopierforclass-docs-3054 to branches/setcopierforclass-docs-3054-2

(In [23246]) Branching to 'setcopierforclass-docs-3054-2'

7

Changed 5 years ago by exarkun

  • branch changed from branches/setcopierforclass-docs-3054-2 to branches/setcopierforclass-docs-3054-3

(In [23708]) Branching to 'setcopierforclass-docs-3054-3'

8

Changed 5 years ago by exarkun

  • keywords review added
  • owner exarkun deleted

Forgot about this for a while. Points from the review have been addressed, I think (I didn't file any tickets, I just dropped the changes in question).

9

Changed 5 years ago by therve

  • keywords review removed
  • owner set to exarkun

The deprecation should be updated to 8.2, now that 8.1 has been released. Otherwise, looks good.

10

Changed 5 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [23712]) Merge setcopierforclass-docs-3054-3

Author: exarkun Reviewer: therve Fixes: #3054

Update code and documentation which uses setCopierForClass to use setUnjellyableForClass, which has been the preferred name for this API for many years. Minor other improvements to nearby code.

11

Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.