Skip to content

Commit 6f23fcb

Browse files
committed
Use get_metadata_version in upload_file
Previously this value was hard-coded to '1.0', which was inaccurate for many packages. Fixes #1381
1 parent f852ffe commit 6f23fcb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

setuptools/command/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def upload_file(self, command, pyversion, filename):
8484
'md5_digest': hashlib.md5(content).hexdigest(),
8585

8686
# additional meta-data
87-
'metadata_version': '1.0',
87+
'metadata_version': str(meta.get_metadata_version()),
8888
'summary': meta.get_description(),
8989
'home_page': meta.get_url(),
9090
'author': meta.get_contact(),

setuptools/tests/test_upload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def _parse_upload_body(body):
3333

3434

3535
class TestUploadTest:
36-
@pytest.mark.xfail(reason='Issue #1381')
3736
@mock.patch('setuptools.command.upload.urlopen')
3837
def test_upload_metadata(self, patch, tmpdir):
3938
dist = Distribution()

0 commit comments

Comments
 (0)