Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56fe474

Browse files
committed
Issue #27349: Fix typo in distutils upload command
1 parent d37de3c commit 56fe474

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/distutils/command/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def upload_file(self, command, pyversion, filename):
9191
data = {
9292
# action
9393
':action': 'file_upload',
94-
'protcol_version': '1',
94+
'protocol_version': '1',
9595

9696
# identify release
9797
'name': meta.get_name(),

Lib/distutils/tests/test_upload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,14 @@ def test_upload(self):
130130

131131
# what did we send ?
132132
headers = dict(self.last_open.req.headers)
133-
self.assertEqual(headers['Content-length'], '2161')
133+
self.assertEqual(headers['Content-length'], '2162')
134134
content_type = headers['Content-type']
135135
self.assertTrue(content_type.startswith('multipart/form-data'))
136136
self.assertEqual(self.last_open.req.get_method(), 'POST')
137137
expected_url = 'https://pypi.python.org/pypi'
138138
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
139139
self.assertTrue(b'xxx' in self.last_open.req.data)
140+
self.assertIn(b'protocol_version', self.last_open.req.data)
140141

141142
# The PyPI response body was echoed
142143
results = self.get_logs(INFO)

0 commit comments

Comments
 (0)