Opened 9 years ago

Closed 9 years ago

#3354 enhancement closed duplicate (duplicate)

Allow new style classes to be used with jelly.setUnjellyableForClassTree

Reported by: njal Owned by:
Priority: normal Milestone:
Component: pb Keywords:
Cc: Branch:
Author:

Description

Currently, twisted.spread.jelly.setUnjellyableForClassTree uses the check type(i_) == types.ClassType, which only works for old style classes to determine whether it should check if i_ is a subclass of the given base class.

In order for it to work with new style classes, I've written a patch that makes use of inspect.isclass (which to my knowledge is available back to python 2.1 -- correct me if I'm mistaken here).

Attachments (1)

jelly_isclass.patch (613 bytes) - added by njal 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by njal

Attachment: jelly_isclass.patch added

comment:1 Changed 9 years ago by njal

I've checked that unit tests for twisted.spread.pb and twisted.spread.jelly runs after applying the patch.

comment:2 Changed 9 years ago by therve

Resolution: duplicate
Status: newclosed

This is a duplicate of #2950.

comment:3 Changed 7 years ago by <automation>

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