Skip to content

Commit

Permalink
Use get_metadata_version in upload_file
Browse files Browse the repository at this point in the history
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
  • Loading branch information
pganssle committed Nov 6, 2018
1 parent f852ffe commit 6f23fcb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion setuptools/command/upload.py
Expand Up @@ -84,7 +84,7 @@ def upload_file(self, command, pyversion, filename):
'md5_digest': hashlib.md5(content).hexdigest(),

# additional meta-data
'metadata_version': '1.0',
'metadata_version': str(meta.get_metadata_version()),
'summary': meta.get_description(),
'home_page': meta.get_url(),
'author': meta.get_contact(),
Expand Down
1 change: 0 additions & 1 deletion setuptools/tests/test_upload.py
Expand Up @@ -33,7 +33,6 @@ def _parse_upload_body(body):


class TestUploadTest:
@pytest.mark.xfail(reason='Issue #1381')
@mock.patch('setuptools.command.upload.urlopen')
def test_upload_metadata(self, patch, tmpdir):
dist = Distribution()
Expand Down

0 comments on commit 6f23fcb

Please sign in to comment.