From: Donald Stufft Date: Wed, 3 Aug 2016 22:49:19 +0000 (-0400) Subject: Merge 3.4 X-Git-Tag: v3.6.0a4~78^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef330d35c8223157cf2d395915efbdce41a3173f;p=thirdparty%2FPython%2Fcpython.git Merge 3.4 --- ef330d35c8223157cf2d395915efbdce41a3173f diff --cc Lib/distutils/tests/test_config.py index c7bbd6d108c2,8286e1d9ac67..a3844974f2ad --- a/Lib/distutils/tests/test_config.py +++ b/Lib/distutils/tests/test_config.py @@@ -121,20 -113,6 +121,20 @@@ class PyPIRCCommandTestCase(BasePyPIRCC finally: f.close() + def test_config_interpolation(self): + # using the % character in .pypirc should not raise an error (#20120) + self.write_file(self.rc, PYPIRC) + cmd = self._cmd(self.dist) + cmd.repository = 'server3' + config = cmd._read_pypirc() + + config = list(sorted(config.items())) + waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'), - ('repository', 'https://upload.pypi.io/legacy/'), ++ ('repository', 'https://upload.pypi.org/legacy/'), + ('server', 'server3'), ('username', 'cbiggles')] + self.assertEqual(config, waited) + + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --cc Lib/distutils/tests/test_upload.py index ce61b9ea5439,cbbbe33bb064..2cb2f6ce9386 --- a/Lib/distutils/tests/test_upload.py +++ b/Lib/distutils/tests/test_upload.py @@@ -134,10 -131,9 +134,10 @@@ class uploadTestCase(BasePyPIRCCommandT content_type = headers['Content-type'] self.assertTrue(content_type.startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') - expected_url = 'https://upload.pypi.io/legacy/' + expected_url = 'https://upload.pypi.org/legacy/' self.assertEqual(self.last_open.req.get_full_url(), expected_url) self.assertTrue(b'xxx' in self.last_open.req.data) + self.assertIn(b'protocol_version', self.last_open.req.data) # The PyPI response body was echoed results = self.get_logs(INFO)