This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Allow to explicitly set the method of urllib.request.Request
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: eric.araujo, orsenthil, tebeka
Priority: normal Keywords: needs review, patch

Created on 2011-07-22 17:51 by tebeka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
request-method.diff tebeka, 2011-07-22 17:51 review
request-method.diff tebeka, 2011-07-25 18:19 New patch based on code review comments. review
fbf2f56d225f.diff eric.araujo, 2011-07-27 15:12 review
Repositories containing patches
ssh://hg@bitbucket.org/tebeka/cpython
https://bitbucket.org/tebeka/cpython
https://tebeka@bitbucket.org/tebeka/cpython
http://bitbucket.org/tebeka/cpython#request-method
Messages (7)
msg140898 - (view) Author: Miki Tebeka (tebeka) * Date: 2011-07-22 17:51
Currently urllib.request.Request decides if it's a "GET" or "POST" by the presence of data. However sometimes you want to do an "POST" request without data (in my case, it Crucible REST API). Or provide another method. The attached patched added a `method` argument to Request __init__.
msg140908 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-22 21:15
Looks good.  I have made one comment on Rietveld.
msg141155 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-26 12:50
Roundup can’t connect with SSH, it needs a public HTTP URI.  The one I added requires authentication, can you fix that?
msg141198 - (view) Author: Miki Tebeka (tebeka) * Date: 2011-07-26 23:52
My bad about the hg location, it was a private repo (for some reason this is the bitbucket default).

I tried to remove the other repos, but for some reason this doesn't work. The right one is https://bitbucket.org/tebeka/cpython#request-method
msg141235 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-27 15:35
Apart from one change (testing for “self._request is not None”), the patch is ready.  Thanks!
msg174673 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-11-03 19:03
Senthil, any objections on committing this?
msg176107 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-11-22 14:10
Hello Miki Tebeka,

The change requested by this issue (and provided by the patch) is already in place in 3.3. This was committed as part of issue1673007 has the same behavior too. 

I am closing this as duplicate.

Thank you,
Senthil
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56823
2012-11-22 14:10:16orsenthilsetstatus: open -> closed
resolution: duplicate
messages: + msg176107
2012-11-03 19:03:55eric.araujosetmessages: + msg174673
2011-07-27 15:35:13eric.araujosetmessages: + msg141235
2011-07-27 15:12:36eric.araujosetfiles: + fbf2f56d225f.diff
2011-07-26 23:52:54tebekasetmessages: + msg141198
2011-07-26 23:50:33tebekasethgrepos: + hgrepo49
2011-07-26 23:49:15tebekasethgrepos: + hgrepo48
2011-07-26 12:50:39eric.araujosetmessages: + msg141155
2011-07-26 12:49:36eric.araujosethgrepos: + hgrepo47
2011-07-25 18:19:58tebekasetfiles: + request-method.diff
hgrepos: + hgrepo46
2011-07-22 21:15:24eric.araujosetassignee: orsenthil

messages: + msg140908
nosy: + eric.araujo, orsenthil
2011-07-22 19:57:53petri.lehtinensetkeywords: + needs review
stage: patch review
2011-07-22 18:00:22santoso.wijayasetversions: + Python 3.3, - Python 3.2
2011-07-22 17:51:42tebekasetcomponents: + Library (Lib)
2011-07-22 17:51:34tebekasettype: enhancement
2011-07-22 17:51:26tebekacreate