Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
18a7eac
bpo-12707: deprecate info(), geturl(), getcode() from HTTPResponse an…
epicfaace Jan 6, 2019
2e93da4
bpo-12707: rename 'code' attribute to 'status'
epicfaace Jan 6, 2019
2db7e1f
bpo-12707: Document properties and deprecation of methods
epicfaace Jan 6, 2019
beadb34
bpo-21257: remove deprecation warnings
epicfaace Jan 6, 2019
2a16f9b
bpo-21257: fix whitespace
epicfaace Jan 6, 2019
f07f456
bpo-12707: remove deprecation warnings from doc
epicfaace Jan 6, 2019
5640148
bpo-12707: remove deprecation warning for addurlinfo.getstatus() in docs
epicfaace Jan 6, 2019
51cd8ad
bpo-12707: rename code to status in test
epicfaace Jan 7, 2019
c199098
bpo-12707: rename info to headers in tests
epicfaace Jan 7, 2019
58ced25
Apply suggestions from code review
eamanu Jan 7, 2019
13d373f
bpo-12707: Add links to doc
epicfaace Jan 7, 2019
357c8b4
bpo-12707 merge changes
epicfaace Jan 7, 2019
b99fb9f
bpo-12707: remove empty line
epicfaace Jan 7, 2019
1cf719c
bpo-12707: fix typos
epicfaace Jan 9, 2019
2c3a63f
bpo-12707: add versionadded directive
epicfaace Jan 9, 2019
c57eb8c
bpo-12707: recommendation to use addinfourl.status instead of .code
epicfaace Jan 9, 2019
2174ea5
Update Doc/library/urllib.request.rst
merwok Jan 9, 2019
47f1656
bpo-12707: use email.message.EmailMessage
epicfaace Jan 9, 2019
10d4720
bpo-12707: clean up wording for headers
epicfaace Jan 9, 2019
1a36dfc
Merge branch 'bpo-12707' of https://github.com/epicfaace/cpython into…
epicfaace Jan 9, 2019
c0e78bc
bpo-12707: re-add deprecation wording in doc
epicfaace Jan 11, 2019
febc206
bpo-12707: Separate tests for new and old attributes
epicfaace Jan 11, 2019
73a5a9a
Update Lib/urllib/request.py
merwok Jan 15, 2019
1f8b27b
bpo-12707: fix indentation and formatting
epicfaace Jan 15, 2019
ac31a4a
Merge branch 'bpo-12707' of https://github.com/epicfaace/cpython into…
epicfaace Jan 15, 2019
c9e8110
bpo-12707: fix indentation
epicfaace Jan 15, 2019
61385d8
bpo-12707: remove reST from docstring
epicfaace Jan 15, 2019
2ee88dd
📜🤖 Added by blurb_it.
blurb-it[bot] Aug 27, 2019
d7575f0
Make NEWS more clear
epicfaace Sep 13, 2019
628c2f0
add Deprecated warnings and update versionadded
epicfaace Sep 13, 2019
5f5b2f9
Fix the call of the 'deprecated' directive
matrixise Sep 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-12707: fix indentation
  • Loading branch information
epicfaace committed Jan 15, 2019
commit c9e81101c60a603c8c60c511ecd7ac73729b0c14
6 changes: 3 additions & 3 deletions Lib/urllib/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
The *cadefault* parameter is ignored.


This function always returns an object which can work as a
:term:`context manager` and has the properties `url`, `headers`, and `status`.
See :class:`urllib.response.addinfourl` for more detail on these properties.
This function always returns an object which can work as a
:term:`context manager` and has the properties `url`, `headers`, and `status`.
See :class:`urllib.response.addinfourl` for more detail on these properties.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reST in docstrings please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks. What is the relationship between docstrings and documentation in python? Are they supposed to be kept in sync?

Copy link
Copy Markdown
Member

@merwok merwok Jan 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python docs don’t use sphinx autodoc to extract docstrings, and the texts are also not usually a copy-paste.

Docstrings should give enough info about how to use the function in an editor tooltip or when calling help(...) or pydoc.

ReST documentations can contain introduction to the domain, detailed usage info, comparisons to other methods or modules, links, etc.


For HTTP and HTTPS URLs, this function returns a http.client.HTTPResponse
object slightly modified. In addition to the three new methods above, the
Expand Down