Issue 22366: urllib.request.urlopen should take a "context" (SSLContext) argument (original) (raw)

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: Arfrever, alex, christian.heimes, dstufft, giampaolo.rodola, janssen, larry, ncoghlan, orsenthil, pitrou, python-dev
Priority: normal Keywords: needs review, patch

Created on 2014-09-08 17:45 by alex, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
urlopen-context.diff alex,2014-09-08 18:21 review
urlopen-context.diff alex,2014-09-08 20:12 review
urlopen-context.diff alex,2014-09-09 03:48 review
Messages (16)
msg226594 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-08 17:45
Instead of the ca* arguments it currently takes, these can all be encapsulated into an SSLContext argument, which the underlying http.client already supports.
msg226595 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-08 18:21
Attached patch against the default branch adds support for this.
msg226609 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-08 20:12
Added a versionchanged directive to the docs.
msg226619 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-09 03:48
New patch switches to a ValueError and includes a test case that it's raised.
msg226672 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-09-10 01:42
With the final review comment addressed, this could go in. Since you have commit rights, please feel free to commit it. (else, please assign this to me and I will commit and follow up with the buildbots)
msg226676 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-10 02:57
Replied to the review; let me know if you agree with my comment.
msg227077 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-09-19 01:02
Just wanted to ping you on this Senthil about committing this.
msg227080 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-19 07:23
New changeset c0b0dda16009 by Senthil Kumaran in branch 'default': Issue #22366: urllib.request.urlopen will accept a context object (SSLContext) https://hg.python.org/cpython/rev/c0b0dda16009
msg227081 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-09-19 07:26
Committed this in 3.5. (Since this is adding an new argument, it should not be backported to 3.4). Thank you!
msg227091 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-09-19 12:40
Alex said he needed this in order to implement PEP 476, and I thought PEP 476 was going in to 3.4 (hopefully for 3.4.2, which I'm tagging in like 24 hours).
msg227092 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2014-09-19 13:30
Larry, it's probably easiest to cover the backport under issue 22417 with the rest of the proposed PEP 476 changes.
msg227101 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-09-19 14:20
My worry is not about the timing. I can add it immediately, but are we convinced on having a new argument (API Change) for 3.4.2 ?
msg227106 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-19 16:51
New changeset 9c3249b358d0 by Alex Gaynor in branch 'default': PEP476: Updated based on proposed API from Nick. Also note that #22366 has been landed. https://hg.python.org/peps/rev/9c3249b358d0
msg230514 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-11-02 18:19
New changeset 13f46fc1a002 by Senthil Kumaran in branch '3.4': backport context argument of urlopen (#22366) for pep 476 https://hg.python.org/cpython/rev/13f46fc1a002
msg230562 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-11-03 20:40
Please update versionchanged to 3.4.3 on default branch.
msg231574 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-11-23 17:46
New changeset 1882157b298a by Benjamin Peterson in branch '2.7': allow passing cert/ssl information to urllib2.urlopen and httplib.HTTPSConnection https://hg.python.org/cpython/rev/1882157b298a
History
Date User Action Args
2022-04-11 14:58:07 admin set github: 66562
2014-11-24 04:58:39 benjamin.peterson set versions: + Python 2.7
2014-11-23 17:46:30 python-dev set messages: +
2014-11-03 20:40:56 Arfrever set messages: +
2014-11-02 22:12:44 Arfrever set versions: + Python 3.4
2014-11-02 18:19:24 python-dev set messages: +
2014-09-21 09:57:07 Arfrever set nosy: + Arfrevertitle: urllib.request.urlopen shoudl take a "context" (SSLContext) argument -> urllib.request.urlopen should take a "context" (SSLContext) argument
2014-09-19 16:51:38 python-dev set messages: +
2014-09-19 14:20:29 orsenthil set messages: +
2014-09-19 13:38:56 ncoghlan link issue22417 dependencies
2014-09-19 13:30:05 ncoghlan set nosy: + ncoghlanmessages: +
2014-09-19 12:40:38 larry set nosy: + larrymessages: +
2014-09-19 07:26:02 orsenthil set status: open -> closedversions: - Python 3.4messages: + resolution: fixedstage: resolved
2014-09-19 07:23:42 python-dev set nosy: + python-devmessages: +
2014-09-19 01:02:06 alex set messages: +
2014-09-10 02:57:40 alex set assignee: alex -> orsenthilmessages: +
2014-09-10 01:43:26 orsenthil set assignee: alex
2014-09-10 01:42:24 orsenthil set messages: +
2014-09-09 03:48:36 alex set files: + urlopen-context.diffmessages: +
2014-09-08 20:12:22 alex set files: + urlopen-context.diffmessages: +
2014-09-08 18:21:44 alex set keywords: + patch, needs reviewfiles: + urlopen-context.diffmessages: +
2014-09-08 17:45:52 alex create