Change:
This might just be darwin; haven't tried on Linux. $ nix-shell -p these derivations will be built: /nix/store/dpcwgrlydrrlbdrnf0mi9hmr0kjvia89-python3.7-fire- building '/nix/store/dpcwgrlydrrlbdrnf0mi9hmr0kjvia89-python3.7-fire-'... unpacking sources unpacking source archive /nix/store/20rzw7yi3yvjb7w2ixzj6aqa5fim6p1q-source source root is source setting SOURCEDATEEPOCH to timestamp of file patching sources configuring building running bdistwheel The [wheel] section is deprecated. Use [bdistwheel] instead. running build running buildpy creating build creating build/lib creating build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire copying -build/lib/fire installing to running install running installlib creating creating creating copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - copying - running installegginfo running egginfo creating writing writing dependencylinks to writing requirements to writing top-level names to writing manifest file '' reading manifest file '' reading manifest template '' writing manifest file '' Copying to running installscripts creating creating 'dist/fire-0.1.3-py2.py3-none-' and adding '' to it adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding '' adding 'fire-' adding 'fire-' adding 'fire-' adding 'fire-' adding 'fire-' removing installing /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire- /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire- Processing ./fire-0.1.3-py2.py3-none- Requirement already satisfied: six in /nix/store/qayyh24znx8kixy7wqz6i5416nyljzxk-python3.7-six-1.12.0/lib/python3.7/site-packages (from fire==0.1.3) (1.12.0) Installing collected packages: fire Successfully installed fire-0.1.3 /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire- post-installation fixup strip is /nix/store/3ibh116gnggzgsvrq8vvalmqyipk8cy9-cctools-binutils-darwin/bin/strip stripping (with command strip and flags -S) in /nix/store/b96a60g0apqx015sscpv8jywnjd8svcq-python3.7-fire-0.1.3/lib patching script interpreter paths in /nix/store/b96a60g0apqx015sscpv8jywnjd8svcq-python3.7-fire-0.1.3 running install tests ============================= test session starts ============================== platform darwin -- Python 3.7.2, pytest-4.2.1, py-1.7.0, pluggy-0.8.1 hypothesis profile 'default' -database=DirectoryBasedExampleDatabase('/private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-') rootdir: /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-, inifile: plugins: hypothesis-4.7.3 collected 160 items . [ 0%] ...... [ 4%] ... [ 6%] .. [ 7%] .............. [ 16%] ............. [ 24%] ........... [ 31%] ... [ 33%] ...............F........F..................... [ 61%] .F........ [ 68%] .F....... [ 73%] .. [ 75%] .................... [ 87%] .. [ 88%] ... [ 90%] ............... [100%] =================================== FAILURES =================================== _ FireTest.testFireKeywordArgs _ self = <fire.firetest.FireTest testMethod=testFireKeywordArgsdef testFireKeywordArgs(self): self.assertEqual( fire.Fire( tc.Kwargs, command=['props', '--name', 'David', '--age', '24']), {'name': 'David', 'age': 24}) # Run this test both with a list command and a string command. self.assertEqual( fire.Fire( tc.Kwargs, command=['props', '--message', '"This is a message it has -- in it"']), # Quotes stripped {'message': 'This is a message it has -- in it'}) self.assertEqual( fire.Fire( tc.Kwargs, command=['props', '--message', 'This is a message it has -- in it']), {'message': 'This is a message it has -- in it'}) self.assertEqual( fire.Fire( tc.Kwargs, command='props --message "This is a message it has -- in it"'), {'message': 'This is a message it has -- in it'}) self.assertEqual( fire.Fire(tc.Kwargs, command=['upper', '--alpha', 'A', '--beta', 'B']), 'ALPHA BETA') self.assertEqual( fire.Fire( tc.Kwargs, 'alpha beta') component = <class 'fire.testcomponents.Kwargs'command = ['upper', '--alpha', 'A', '--beta', 'B', '-', ...], name = '' def Fire(component=None, command=None, name=None): """This function, Fire, is the main entrypoint for Python Fire. Executes a command either from the argument or from by recursively traversing the target object 's members consuming arguments, evaluating functions, and instantiating classes as it goes. When building a CLI with Fire, your main method should call this function. Args: component: The initial target component. command: Optional. If supplied, this is the command executed. If not supplied, then the command is taken from instead. This can be a string or a list of strings; a list of strings is preferred. name: Optional. The name of the command as entered at the command line. Used in interactive mode and for generating the completion script. Returns: The result of executing the Fire command. Execution begins with the initial target component. The component is updated by using the command arguments to either access a member of the current component, call the current component (if it's a function), or instantiate the current component (if it's a class). When all arguments are consumed and there's no function left to call or class left to instantiate, the resulting current component is the final result. Raises: ValueError: If the command argument is supplied, but not a string or a sequence of arguments. FireExit: When Fire encounters a FireError, Fire will raise a FireExit with code 2. When used with the help or trace flags, Fire will raise a FireExit with code 0 if successful. """ name = name or ([0]) # Get args as a list. if isinstance(command, six.stringtypes): args = (command) elif isinstance(command, (list, tuple)): args = command elif command is None: # Use the command line args by default if no command is specified. args = [1:] else: raise ValueError('The command argument must be a string or a sequence of ' 'arguments.') # Determine the calling context. caller = ()[1] callerframe = caller[0] callerglobals = callerframe.fglobals callerlocals = callerframe.flocals context = {} (callerglobals) (callerlocals) componenttrace = Fire(component, args, context, name) if componenttrace.HasError(): for helpflag in ['-h', '--help']: if helpflag in componenttrace.elements[-1].args: command = '{cmd} -- --help'.format(cmd=componenttrace.GetCommand()) print(('WARNING: The proper way to show help is {cmd}.n' 'Showing help anyway.n').format((command)), ) print('Fire trace:n{trace}n'.format(trace=componenttrace), ) result = componenttrace.GetResult() print( helputils.HelpString(result, componenttrace, componenttrace.verbose), ) E 2 FireExit ----------------------------- Captured stdout call ----------------------------- name: David age: 24 message: This is a message it has -- in it message: This is a message it has -- in it message: This is a message it has -- in it ALPHA BETA ----------------------------- Captured stderr call ----------------------------- Fire trace: Initial component Instantiated class "Kwargs" (/private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-) Accessed property "upper" (/private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-) Called routine "upper" (/private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-) Accessed property "lower" ('The function received no value for the required argument:', 'self') Type: builtinfunctionormethod String form: <built-in method lower of str object at 0x1116ffef0Docstring: Return a copy of the string converted to lowercase. Usage: upper --alpha A --beta B - lower SELF upper --alpha A --beta B - lower --self SELF _ FireTest.testFireObjectWithDict _ self = <fire.firetest.FireTest testMethod=testFireObjectWithDictdef testFireObjectWithDict(self): self.assertEqual( fire.Fire(tc.TypedProperties, command=['delta', 'echo']), 'E') self.assertEqual( component = <class 'fire.testcomponents.TypedProperties'command = ['delta', 'echo', 'lower'], name = '' def Fire(component=None, command=None, name=None): """This function, Fire, is the main entrypoint for Python Fire. Executes a command either from the argument or from by recursively traversing the target object 's members consuming arguments, evaluating functions, and instantiating classes as it goes. When building a CLI with Fire, your main method should call this function. Args: component: The initial target component. command: Optional. If supplied, this is the command executed. If not supplied, then the command is taken from instead. This can be a string or a list of strings; a list of strings is preferred. name: Optional. The name of the command as entered at the command line. Used in interactive mode and for generating the completion script. Returns: The result of executing the Fire command. Execution begins with the initial target component. The component is updated by using the command arguments to either access a member of the current component, call the current component (if it's a function), or instantiate the current component (if it's a class). When all arguments are consumed and there's no function left to call or class left to instantiate, the resulting current component is the final result. Raises: ValueError: If the command argument is supplied, but not a string or a sequence of arguments. FireExit: When Fire encounters a FireError, Fire will raise a FireExit with code 2. When used with the help or trace flags, Fire will raise a FireExit with code 0 if successful. """ name = name or ([0]) # Get args as a list. if isinstance(command, six.stringtypes): args = (command) elif isinstance(command, (list, tuple)): args = command elif command is None: # Use the command line args by default if no command is specified. args = [1:] else: raise ValueError('The command argument must be a string or a sequence of ' 'arguments.') # Determine the calling context. caller = ()[1] callerframe = caller[0] callerglobals = callerframe.fglobals callerlocals = callerframe.flocals context = {} (callerglobals) (callerlocals) componenttrace = Fire(component, args, context, name) if componenttrace.HasError(): for helpflag in ['-h', '--help']: if helpflag in componenttrace.elements[-1].args: command = '{cmd} -- --help'.format(cmd=componenttrace.GetCommand()) print(('WARNING: The proper way to show help is {cmd}.n' 'Showing help anyway.n').format((command)), ) print('Fire trace:n{trace}n'.format(trace=componenttrace), ) result = componenttrace.GetResult() print( helputils.HelpString(result, componenttrace, componenttrace.verbose), ) E 2 FireExit ----------------------------- Captured stdout call ----------------------------- E ----------------------------- Captured stderr call ----------------------------- Fire trace: Initial component Instantiated class "TypedProperties" (/private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire-) Accessed property "delta" Accessed property "echo" Accessed property "lower" ('The function received no value for the required argument:', 'self') Type: builtinfunctionormethod String form: <built-in method lower of str object at 0x1100c7340Docstring: Return a copy of the string converted to lowercase. Usage: delta echo lower SELF delta echo lower --self SELF __ HelpUtilsTest.testHelpStringBuiltin _ self = <fire.helputilstest.HelpUtilsTest testMethod=testHelpStringBuiltindef testHelpStringBuiltin(self): helpstring = helputils.HelpString('test'.upper) self.assertIn('Type: builtinfunctionormethod', helpstring) self.assertIn('String form: <built-in method upper of', helpstring) E AssertionError: 'Usage: [VARS ...] [--KWARGS ...]' not found in 'Type: builtinfunctionormethodnString form: <built-in method upper of str object at 0x11028d458nDocstring: Return a copy of the string converted to uppercase.nnUsage: SELFn --self SELF' AssertionError _ InspectUtilsTest.testGetFullArgSpecFromBuiltin _ self = <fire.inspectutilstest.InspectUtilsTest testMethod=testGetFullArgSpecFromBuiltindef testGetFullArgSpecFromBuiltin(self): spec = inspectutils.GetFullArgSpec('test'.upper) E AssertionError: Lists differ: ['self'] != [] E E First list contains 1 additional elements. E First extra element 0: E 'self' E E - ['self'] E + [] AssertionError =============================== warnings summary =============================== /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire- DeprecationWarning: 'U' mode is deprecated self.fromlines = open(fromfile, 'U').readlines() /private/var/folders/8g/qgvf93s1b40dd8nhsvqkm0000gn/T/nix-build-python3.7-fire- DeprecationWarning: 'U' mode is deprecated self.tolines = open(tofile, 'U').readlines() -- Docs: ============== 4 failed, 156 passed, 12 warnings in 1.80 seconds =============== builder for '/nix/store/dpcwgrlydrrlbdrnf0mi9hmr0kjvia89-python3.7-fire-' failed with exit code 1 error: build of '/nix/store/dpcwgrlydrrlbdrnf0mi9hmr0kjvia89-python3.7-fire-' failed nix-shell -p nix-info --run "nix-info -m" system: host os: multi-user?: sandbox: version: channels(abathur): nixpkgs: FWIW, I'm also running bash 5 () as my default shell atm, but I see the same error when I manually run launch a bash 4 () shell to run this in. I haven't updated channel in a bit but I don't see any open/recent issue or PR.

Discussion:
<del> { stdenv, buildPythonPackage, fetchFromGitHub, six, hypothesis, mock </del> <ins> { stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, six, hypothesis, mock </ins> , python-Levenshtein, pytest }: buildPythonPackage rec {

py.test ''; <ins> patches = [ # Add Python 3.7 support. Remove with the next release (fetchpatch { url = "https://github.com/google/python-fire/commit/668007ae41391f5964870b4597e41493a936a11e.patch"; sha256 = "0rf7yzv9qx66zfmdggfz478z37fi4rwx4hlh3dk1065sx5rfksi0"; }) ]; </ins> meta = with stdenv.lib; { description = "A library for automatically generating command line interfaces";