Fix problems spying on classmethods.

Review Request #9761 — Created March 8, 2018 and submitted

chipx86
kgb
master
f1537a3...
kgb

When spying on methods, we replaced the method with a new instance, with
the intended purpose of preventing spies on an instance method from
impacting other instance methods. This caused subtle problems for
classmethods, which caused state to not be tracked quite right and to
leak.

This change fixes this, ensuring we don't override any classmethods.

Unit tests pass on all supported Python versions.

The breakages I encountered spying on classmethods in some Djblets
unit tests went away.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (40fd435)
Loading...