Hello community,

here is the log from the commit of package python-fire for openSUSE:Factory 
checked in at 2019-03-11 11:15:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fire (Old)
 and      /work/SRC/openSUSE:Factory/.python-fire.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-fire"

Mon Mar 11 11:15:06 2019 rev:4 rq:682933 version:0.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fire/python-fire.changes  2019-02-20 
14:10:52.482948591 +0100
+++ /work/SRC/openSUSE:Factory/.python-fire.new.28833/python-fire.changes       
2019-03-11 11:15:17.365341995 +0100
@@ -1,0 +2,6 @@
+Sat Mar  9 00:26:12 CET 2019 - Matej Cepl <mc...@suse.com>
+
+- Add fix-issue-164.patch patch to fix gh#google/python-fire#164
+  and we can run whole test suite.
+
+-------------------------------------------------------------------

New:
----
  fix-issue-164.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-fire.spec ++++++
--- /var/tmp/diff_new_pack.Bj2Nxo/_old  2019-03-11 11:15:18.273341669 +0100
+++ /var/tmp/diff_new_pack.Bj2Nxo/_new  2019-03-11 11:15:18.277341668 +0100
@@ -25,6 +25,7 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/google/python-fire
 Source:         
https://files.pythonhosted.org/packages/source/f/fire/fire-%{version}.tar.gz
+Patch0:         fix-issue-164.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -45,6 +46,7 @@
 
 %prep
 %setup -q -n fire-%{version}
+%autopatch -p1
 
 %build
 %python_build
@@ -54,8 +56,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-# gh#google/python-fire#164
-%python_expand pytest-%{$python_bin_suffix} -k 'not (testFireKeywordArgs or 
testFireObjectWithDict or testHelpStringBuiltin or 
testGetFullArgSpecFromBuiltin)' fire
+%python_expand pytest-%{$python_bin_suffix} -v fire
 
 %files %{python_files}
 %license LICENSE

++++++ fix-issue-164.patch ++++++
>From 2cc070bb50577ec45fae640b56e02c69feb6f82c Mon Sep 17 00:00:00 2001
From: Andrew Au <csh...@gmail.com>
Date: Fri, 22 Feb 2019 16:23:03 -0800
Subject: [PATCH] Fix issue 164

---
 fire/helputils_test.py    |  1 -
 fire/inspectutils.py      | 10 ++++++----
 fire/inspectutils_test.py |  2 --
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/fire/helputils_test.py b/fire/helputils_test.py
index 0557122..c3d5055 100644
--- a/fire/helputils_test.py
+++ b/fire/helputils_test.py
@@ -88,7 +88,6 @@ def testHelpStringBuiltin(self):
     helpstring = helputils.HelpString('test'.upper)
     self.assertIn('Type:        builtin_function_or_method', helpstring)
     self.assertIn('String form: <built-in method upper of', helpstring)
-    self.assertIn('Usage:       [VARS ...] [--KWARGS ...]', helpstring)
 
   def testHelpStringIntType(self):
     helpstring = helputils.HelpString(int)
diff --git a/fire/inspectutils.py b/fire/inspectutils.py
index 45f7ce6..244a84f 100644
--- a/fire/inspectutils.py
+++ b/fire/inspectutils.py
@@ -74,10 +74,12 @@ class with an __init__ method.
     if six.PY2 and hasattr(fn, '__init__'):
       fn = fn.__init__
   else:
-    # If the function is a bound method, we skip the `self` argument.
-    is_method = inspect.ismethod(fn)
-    skip_arg = is_method and fn.__self__ is not None
-
+    if inspect.ismethod(fn):
+      # If the function is a bound method, we skip the `self` argument.
+      skip_arg = fn.__self__ is not None
+    elif inspect.isbuiltin(fn):
+      # If the function is a bound builtin, we skip the `self` argument.
+      skip_arg = fn.__self__ is not None
   return fn, skip_arg
 
 
diff --git a/fire/inspectutils_test.py b/fire/inspectutils_test.py
index 8c6dd9a..ba42865 100644
--- a/fire/inspectutils_test.py
+++ b/fire/inspectutils_test.py
@@ -56,8 +56,6 @@ def testGetFullArgSpecFromBuiltin(self):
     spec = inspectutils.GetFullArgSpec('test'.upper)
     self.assertEqual(spec.args, [])
     self.assertEqual(spec.defaults, ())
-    self.assertEqual(spec.varargs, 'vars')
-    self.assertEqual(spec.varkw, 'kwargs')
     self.assertEqual(spec.kwonlyargs, [])
     self.assertEqual(spec.kwonlydefaults, {})
     self.assertEqual(spec.annotations, {})

Reply via email to