@contextmanager
def args(**kwargs):
 kwargs_str = ','.join([('%s=%r' % (k, v)) for (k, v) in kwargs.items()])
 raise DeprecationWarning('\n\nsh.args() has been deprecated because it was never thread safe.  use the\nfollowing instead:\n\n    sh2 = sh({kwargs})\n    sh2.your_command()\n\nor\n\n    sh2 = sh({kwargs})\n    from sh2 import your_command\n    your_command()\n\n'.format(kwargs=kwargs_str))

@ contextmanager def args ( ** kwargs ) : kwargs_str = ',' . join ( [ ( '%s=%r' % ( k , v ) ) for ( k , v ) in kwargs . items ( ) ] ) raise DeprecationWarning ( '\n\nsh.args() has been deprecated because it was never thread safe.  use the\nfollowing instead:\n\n    sh2 = sh({kwargs})\n    sh2.your_command()\n\nor\n\n    sh2 = sh({kwargs})\n    from sh2 import your_command\n    your_command()\n\n' . format ( kwargs = kwargs_str ) )
setup argument parsing .