public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-python/mock/files: mock-1.0.1-fix-python3.4.patch
@ 2014-04-11  0:41 Samuel Damashek (sdamashek)
  0 siblings, 0 replies; only message in thread
From: Samuel Damashek (sdamashek) @ 2014-04-11  0:41 UTC (permalink / raw
  To: gentoo-commits

sdamashek    14/04/11 00:41:55

  Added:                mock-1.0.1-fix-python3.4.patch
  Log:
  Add python3.4 to PYTHON_COMPAT in mock-1.0.1-r1
  
  (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 3C472B56)

Revision  Changes    Path
1.1                  dev-python/mock/files/mock-1.0.1-fix-python3.4.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mock/files/mock-1.0.1-fix-python3.4.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mock/files/mock-1.0.1-fix-python3.4.patch?rev=1.1&content-type=text/plain

Index: mock-1.0.1-fix-python3.4.patch
===================================================================
# Fix test errors with python 3.4 - thanks to Ubuntu developer Barry Warsaw.

diff -r d356250e275d mock.py
--- a/mock.py	Tue Apr 09 14:53:33 2013 +0100
+++ b/mock.py	Wed Feb 26 15:12:18 2014 -0500
@@ -239,12 +239,21 @@
     funcopy.__name__ = func.__name__
     funcopy.__doc__ = func.__doc__
     #funcopy.__dict__.update(func.__dict__)
-    funcopy.__module__ = func.__module__
+    try:
+        funcopy.__module__ = func.__module__
+    except AttributeError:
+        pass
     if not inPy3k:
         funcopy.func_defaults = func.func_defaults
         return
-    funcopy.__defaults__ = func.__defaults__
-    funcopy.__kwdefaults__ = func.__kwdefaults__
+    try:
+        funcopy.__defaults__ = func.__defaults__
+    except AttributeError:
+        pass
+    try:
+        funcopy.__kwdefaults__ = func.__kwdefaults__
+    except AttributeError:
+        pass
 
 
 def _callable(obj):





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-11  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11  0:41 [gentoo-commits] gentoo-x86 commit in dev-python/mock/files: mock-1.0.1-fix-python3.4.patch Samuel Damashek (sdamashek)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox