Ticket #3354 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 2 years ago

Allow new style classes to be used with jelly.setUnjellyableForClassTree

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

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

jelly_isclass.patch Download (0.6 KB) - added by njal 2 years ago.

Change History

Changed 2 years ago by njal

Changed 2 years ago by njal

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

Changed 2 years ago by therve

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

This is a duplicate of #2950.

Note: See TracTickets for help on using tickets.