]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merge 3.4
authorDonald Stufft <donald@stufft.io>
Wed, 3 Aug 2016 22:49:19 +0000 (18:49 -0400)
committerDonald Stufft <donald@stufft.io>
Wed, 3 Aug 2016 22:49:19 +0000 (18:49 -0400)
1  2 
Lib/distutils/config.py
Lib/distutils/tests/test_config.py
Lib/distutils/tests/test_upload.py

Simple merge
index c7bbd6d108c24ffca162c48e0f528d05bcfb9135,8286e1d9ac6742443271af5150f2981ce541700b..a3844974f2ad2b3535ec7a830b7ad4b928887f54
@@@ -121,20 -113,6 +121,20 @@@ class PyPIRCCommandTestCase(BasePyPIRCC
          finally:
              f.close()
  
-                   ('repository', 'https://upload.pypi.io/legacy/'),
 +    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.org/legacy/'),
 +                  ('server', 'server3'), ('username', 'cbiggles')]
 +        self.assertEqual(config, waited)
 +
 +
  def test_suite():
      return unittest.makeSuite(PyPIRCCommandTestCase)
  
index ce61b9ea54394b7989cdf96d44b90731d29631cc,cbbbe33bb064afd45a034097d89b67b8a97f72b8..2cb2f6ce93864b6a855d880c5319d725a059f4e4
@@@ -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)