From 5ffe204ea7c6d45932fa672f3cc11ecd06969746 Mon Sep 17 00:00:00 2001
From: Michael Foord <michael@voidspace.org.uk>
Date: Sun, 25 Mar 2012 23:27:12 +0100
Subject: [PATCH] unittest.mock: removed another bit of Python 2 only code

---
 mock.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mock.py b/mock.py
index f112345..389a9cb 100644
--- a/mock.py
+++ b/mock.py
@@ -1235,12 +1235,6 @@ class _patch(object):
                     patching.__exit__(*exc_info)
 
         patched.patchings = [self]
-        if hasattr(func, 'func_code'):
-            # not in Python 3
-            patched.compat_co_firstlineno = getattr(
-                func, "compat_co_firstlineno",
-                func.func_code.co_firstlineno
-            )
         return patched
 
 
-- 
GitLab