@_swallowRequestExceptions(fail_return="<STR_LIT>")<EOL>@_retryConnectionErrors<EOL>@_friendlyAuthError<EOL>@_handleAuth<EOL>def publish(namespace, name, version, description_file, tar_file, readme_file,<EOL>readme_file_ext, registry=None):
registry = registry or Registry_Base_URL<EOL>url = '<STR_LIT>' % (<EOL>registry,<EOL>namespace,<EOL>name,<EOL>version<EOL>)<EOL>if readme_file_ext == '<STR_LIT>':<EOL><INDENT>readme_section_name = '<STR_LIT>'<EOL><DEDENT>elif readme_file_ext == '<STR_LIT>':<EOL><INDENT>readme_section_name = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' % readme_file_ext)<EOL><DEDENT>body = OrderedDict([('<STR_LIT>', (None, description_file.read(),'<STR_LIT:application/json>')),<EOL>('<STR_LIT>',('<STR_LIT>', tar_file)),<EOL>(readme_section_name, (readme_section_name, readme_file))])<EOL>headers = _headersForRegistry(registry)<EOL>response = requests.put(url, headers=headers, files=body)<EOL>response.raise_for_status()<EOL>return None<EOL>
Publish a tarblob to the registry, if the request fails, an exception
        is raised, which either triggers re-authentication, or is turned into a
        return value by the decorators. (If successful, the decorated function
        returns None)