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.
Created on 2002年08月26日 18:24 by dyoo, last changed 2022年04月10日 16:05 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue600362-py26-v3.diff | orsenthil, 2008年09月03日 15:21 | |||
| issue600362-py3k-v3.diff | orsenthil, 2008年09月03日 15:21 | |||
| Messages (14) | |||
|---|---|---|---|
| msg61094 - (view) | Author: Danny Yoo (dyoo) | Date: 2002年08月26日 18:24 | |
The location of the url-handling functions are distributed among several modules, and it would be good to consolidate them to make them easier to find. The urlparse.urlparse() function splits an url into its relative pieces. However, it does not parse out the query string into a dictionary --- that role is played by cgi.parse_qs(). And to convert a dictionary back to a query string, the programmer needs to know that that function is in urllib.urlencode. It would be nice to have cgi.parse_qs() and urllib.urlencode() in a unified place, within in the urlparse module if appropriate. This will help reduce the amount of hunting-and-pecking that beginners do when they're trying to deal with URLs. See: http://mail.python.org/pipermail/tutor/2002-August/016823.html for more information. Thanks! |
|||
| msg61095 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2003年05月13日 03:25 | |
Logged In: YES user_id=357491 This is a problem. Should a wrapper in urlparse for cgi.parse_qs but created or should it just be documented that to parse a query string you should use cgi.parse_qs? |
|||
| msg61868 - (view) | Author: Raghuram Devarakonda (draghuram) (Python triager) | Date: 2008年01月30日 16:12 | |
I know that Senthil has been working on consolidating url related functionalities so I am adding him to the list. |
|||
| msg67601 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2008年06月01日 20:52 | |
parse_qs and parse_qsl moved to urlparse with this patch. I dont think urlencode would be a good method for urlparse. But this will cease to exist with the addressing of 3108. |
|||
| msg68551 - (view) | Author: Humberto Diógenes (hdiogenes) * | Date: 2008年06月21日 22:20 | |
The patch is not applying cleanly. BTW, urlparse has been renamed to urllib.parse, but the old docs are still there (urlparse.rst). |
|||
| msg68557 - (view) | Author: Humberto Diógenes (hdiogenes) * | Date: 2008年06月22日 04:00 | |
Correction: the patch does apply cleanly to 2.6, without breaking tests. It just needs to be ported to 3.0 (new urllib package). |
|||
| msg68946 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2008年06月29日 11:02 | |
- Updated patches for Python 2.6 and Python 3.0 - Moved the tests. - Updated docs. Somebody please review this so that it can checked in. |
|||
| msg69099 - (view) | Author: Facundo Batista (facundobatista) * (Python committer) | Date: 2008年07月02日 14:59 | |
Hi Senthil, some details: - You should not withdraw the parse_qsl from cgi.rst (btw, why didn't you extracted also the parse_qs one?), but put a Deprecation message, saying that the user should use it from the urlparse module. - In cgi.py, in the added message "parse query string functions called from urlparse", you should say that this is for backward compatibility reasons. - You defined an "unquote" function in urlparse.py. Isn't this function the same that already exists in urllib? Why can't you just use that one? Thank you!! |
|||
| msg71151 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2008年08月14日 20:25 | |
Hi Facundo, This issue/comments somehow escaped from my noticed, initially. I have addressed your comments in the new set of patches. 1) Previous patch Docs had issues. Updated the Docs patch. 2) Included message in cgi.py about parse_qs, parse_qsl being present for backward compatiblity. 3) The reason, py26 version of patch has quote function from urllib is to avoid circular reference. urllib import urlparse for urljoin method. So only way for us use quote is to have that portion of code in the patch as well. Please have a look the patches. As this request has been present from a long time ( 2002年08月26日 !), is it possible to include this change in b3? Thanks, Senthil |
|||
| msg71214 - (view) | Author: Facundo Batista (facundobatista) * (Python committer) | Date: 2008年08月16日 14:06 | |
This is ok, maybe with some small changes in the docs. I asked in python-dev if this should go now or wait until 2.7/3.1 |
|||
| msg71915 - (view) | Author: Matt Giuca (mgiuca) | Date: 2008年08月25日 09:44 | |
It seems like parse_multipart and parse_header are very strongly related to parse_qs. (eg. if you want to process HTTP requests you'll want to call parse_qs for x-www-form-urlencoded and parse_multipart for multipart/form-data). Should these be moved too? (They aren't part of the url syntax though, so it doesn't make sense for them to be in urlparse). |
|||
| msg72284 - (view) | Author: Facundo Batista (facundobatista) * (Python committer) | Date: 2008年09月01日 18:52 | |
Senthil, please update the patchs, adding a DeprecationWarning in 3.0 and a PendingDeprecationWarning in 2.6. Thanks! |
|||
| msg72387 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2008年09月03日 15:21 | |
Facundo, I have updated the patch against the trunk. Added the PendingDeprecationWarning for py26 and DeprecationWarning for py3k. All tests pass ok. Please verify and plan to apply this patch before rc1. |
|||
| msg72430 - (view) | Author: Facundo Batista (facundobatista) * (Python committer) | Date: 2008年09月03日 22:52 | |
Commited in r66196 and r66199, this went into 2.6/3.0 rc1!! Thank you all for the effort! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月10日 16:05:37 | admin | set | github: 37091 |
| 2008年09月03日 22:52:24 | facundobatista | set | status: open -> closed resolution: fixed messages: + msg72430 |
| 2008年09月03日 15:21:52 | orsenthil | set | files: - issue600362-py3k-v2.diff |
| 2008年09月03日 15:21:44 | orsenthil | set | files: - issue600362-py26-v2.diff |
| 2008年09月03日 15:21:33 | orsenthil | set | files: + issue600362-py3k-v3.diff |
| 2008年09月03日 15:21:04 | orsenthil | set | files:
+ issue600362-py26-v3.diff messages: + msg72387 |
| 2008年09月01日 18:52:27 | facundobatista | set | messages: + msg72284 |
| 2008年08月25日 09:44:12 | mgiuca | set | nosy:
+ mgiuca messages: + msg71915 |
| 2008年08月16日 14:06:49 | facundobatista | set | messages: + msg71214 |
| 2008年08月14日 20:26:56 | orsenthil | set | files: - issue600362-py3k.diff |
| 2008年08月14日 20:26:49 | orsenthil | set | files: - issue600362-py26.diff |
| 2008年08月14日 20:26:30 | orsenthil | set | files: + issue600362-py3k-v2.diff |
| 2008年08月14日 20:26:04 | orsenthil | set | files:
+ issue600362-py26-v2.diff messages: + msg71151 |
| 2008年07月02日 15:00:39 | facundobatista | set | assignee: facundobatista messages: + msg69099 nosy: + facundobatista |
| 2008年06月30日 16:58:38 | benjamin.peterson | link | issue2829 superseder |
| 2008年06月29日 11:02:52 | orsenthil | set | messages: + msg68946 |
| 2008年06月29日 11:01:39 | orsenthil | set | files: + issue600362-py3k.diff |
| 2008年06月29日 11:01:12 | orsenthil | set | files: + issue600362-py26.diff |
| 2008年06月29日 11:00:26 | orsenthil | set | files: - issue600362.diff |
| 2008年06月22日 04:00:38 | hdiogenes | set | messages: + msg68557 |
| 2008年06月21日 22:20:37 | hdiogenes | set | nosy:
+ hdiogenes messages: + msg68551 |
| 2008年06月01日 20:52:45 | orsenthil | set | files:
+ issue600362.diff keywords: + patch messages: + msg67601 |
| 2008年01月30日 16:12:14 | draghuram | set | nosy:
+ draghuram, orsenthil messages: + msg61868 versions: + Python 2.6, Python 3.0 |
| 2002年08月26日 18:24:42 | dyoo | create | |