Use __future__.absolute_import for spies function.

Review Request #8720 — Created Feb. 6, 2017 and submitted

Information

kgb
master
899b741...

Reviewers

kgb

I was encountering a bizarre problem where running a unit test that included a
spy was failing with ImportError: cannot import name currentframe. After
doing some digging, I found out that the inspect module that was being
imported was actually django.utils.inspect rather than the top-level
standard library inspect. Adding absolute_import fixes this.

Was able to run my unit test successfully.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        kgb/spies.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        kgb/spies.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (cb39328)