bpo-33503: Fix the broken pypi link in the source and the documentati… · python/cpython@19177fb (original) (raw)
`@@ -212,12 +212,12 @@ Example
`
212
212
`-------
`
213
213
``
214
214
`` To demonstrate several uses of the :func:pprint
function and its parameters,
``
215
``
`` -
let's fetch information about a project from PyPI <https://pypi.python.org/pypi>
_::
``
``
215
`` +
let's fetch information about a project from PyPI <https://pypi.org>
_::
``
216
216
``
217
217
` >>> import json
`
218
218
` >>> import pprint
`
219
219
` >>> from urllib.request import urlopen
`
220
``
`-
with urlopen('http://pypi.python.org/pypi/Twisted/json') as url:
`
``
220
`+
with urlopen('http://pypi.org/project/Twisted/json') as url:
`
221
221
` ... http_info = url.info()
`
222
222
` ... raw_data = url.read().decode(http_info.get_content_charset())
`
223
223
` >>> project_info = json.loads(raw_data)
`
`` @@ -248,9 +248,9 @@ In its basic form, :func:pprint
shows the whole object::
``
248
248
` 'maintainer': '',
`
249
249
` 'maintainer_email': '',
`
250
250
` 'name': 'Twisted',
`
251
``
`-
'package_url': 'http://pypi.python.org/pypi/Twisted',
`
``
251
`+
'package_url': 'http://pypi.org/project/Twisted',
`
252
252
` 'platform': 'UNKNOWN',
`
253
``
`-
'release_url': 'http://pypi.python.org/pypi/Twisted/12.3.0',
`
``
253
`+
'release_url': 'http://pypi.org/project/Twisted/12.3.0',
`
254
254
` 'requires_python': None,
`
255
255
` 'stable_version': None,
`
256
256
` 'summary': 'An asynchronous networking framework written in Python',
`
`` @@ -264,7 +264,7 @@ In its basic form, :func:pprint
shows the whole object::
``
264
264
` 'python_version': 'source',
`
265
265
` 'size': 2615733,
`
266
266
` 'upload_time': '2012-12-26T12:47:03',
`
267
``
`-
'url': 'https://pypi.python.org/packages/source/T/Twisted/Twisted-12.3.0.tar.bz2'},
`
``
267
`+
'url': 'https://pypi.org/packages/source/T/Twisted/Twisted-12.3.0.tar.bz2'},
`
268
268
` {'comment_text': '',
`
269
269
` 'downloads': 5224,
`
270
270
` 'filename': 'Twisted-12.3.0.win32-py2.7.msi',
`
`` @@ -274,7 +274,7 @@ In its basic form, :func:pprint
shows the whole object::
``
274
274
` 'python_version': '2.7',
`
275
275
` 'size': 2916352,
`
276
276
` 'upload_time': '2012-12-26T12:48:15',
`
277
``
`-
'url': 'https://pypi.python.org/packages/2.7/T/Twisted/Twisted-12.3.0.win32-py2.7.msi'}]}
`
``
277
`+
'url': 'https://pypi.org/packages/2.7/T/Twisted/Twisted-12.3.0.win32-py2.7.msi'}]}
`
278
278
``
279
279
`The result can be limited to a certain depth (ellipsis is used for deeper
`
280
280
`contents)::
`
`@@ -301,9 +301,9 @@ contents)::
`
301
301
` 'maintainer': '',
`
302
302
` 'maintainer_email': '',
`
303
303
` 'name': 'Twisted',
`
304
``
`-
'package_url': 'http://pypi.python.org/pypi/Twisted',
`
``
304
`+
'package_url': 'http://pypi.org/project/Twisted',
`
305
305
` 'platform': 'UNKNOWN',
`
306
``
`-
'release_url': 'http://pypi.python.org/pypi/Twisted/12.3.0',
`
``
306
`+
'release_url': 'http://pypi.org/project/Twisted/12.3.0',
`
307
307
` 'requires_python': None,
`
308
308
` 'stable_version': None,
`
309
309
` 'summary': 'An asynchronous networking framework written in Python',
`
`@@ -339,9 +339,9 @@ cannot be split, the specified width will be exceeded::
`
339
339
` 'maintainer': '',
`
340
340
` 'maintainer_email': '',
`
341
341
` 'name': 'Twisted',
`
342
``
`-
'package_url': 'http://pypi.python.org/pypi/Twisted',
`
``
342
`+
'package_url': 'http://pypi.org/project/Twisted',
`
343
343
` 'platform': 'UNKNOWN',
`
344
``
`-
'release_url': 'http://pypi.python.org/pypi/Twisted/12.3.0',
`
``
344
`+
'release_url': 'http://pypi.org/project/Twisted/12.3.0',
`
345
345
` 'requires_python': None,
`
346
346
` 'stable_version': None,
`
347
347
` 'summary': 'An asynchronous networking '
`