Opened 7 years ago

Closed 6 years ago

#3054 defect closed fixed (fixed)

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
(diff, github, buildbot, log)
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 (1)

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

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by njal

Diff against current trunk that changes the documentation and docstring.

comment:1 Changed 7 years ago by exarkun

  • Owner changed from warner to exarkun
  • Status changed from new to assigned

comment:2 Changed 7 years ago by exarkun

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

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

comment:3 Changed 7 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted
  • Status changed from assigned to new

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.

comment:4 Changed 7 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.

comment:5 Changed 7 years ago by exarkun

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

refs #3054

comment:6 Changed 6 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'

comment:7 Changed 6 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'

comment:8 Changed 6 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).

comment:9 Changed 6 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.

comment:10 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:11 Changed 4 years ago by <automation>

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