Commit 33185837 authored by Paul Ganssle's avatar Paul Ganssle

Use get_metadata_version in upload_file

Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes #1381
parent 386fcdbe
...@@ -84,7 +84,7 @@ class upload(orig.upload): ...@@ -84,7 +84,7 @@ class upload(orig.upload):
'md5_digest': hashlib.md5(content).hexdigest(), 'md5_digest': hashlib.md5(content).hexdigest(),
# additional meta-data # additional meta-data
'metadata_version': '1.0', 'metadata_version': str(meta.get_metadata_version()),
'summary': meta.get_description(), 'summary': meta.get_description(),
'home_page': meta.get_url(), 'home_page': meta.get_url(),
'author': meta.get_contact(), 'author': meta.get_contact(),
......
...@@ -33,7 +33,6 @@ def _parse_upload_body(body): ...@@ -33,7 +33,6 @@ def _parse_upload_body(body):
class TestUploadTest: class TestUploadTest:
@pytest.mark.xfail(reason='Issue #1381')
@mock.patch('setuptools.command.upload.urlopen') @mock.patch('setuptools.command.upload.urlopen')
def test_upload_metadata(self, patch, tmpdir): def test_upload_metadata(self, patch, tmpdir):
dist = Distribution() dist = Distribution()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment