classification
Title: Update urllib.parse.__all__
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: berker.peksag, fdrake, martin.panter, orsenthil, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-02-08 11:38 by martin.panter, last changed 2015-04-07 16:09 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
urllib.parse-all.patch martin.panter, 2015-02-08 11:43 review
urllib.parse-all.v2.patch martin.panter, 2015-03-31 04:23 review
Messages (9)
msg235556 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-02-08 11:38
+"DefragResult", "ParseResult", "SplitResult",
+"DefragResultBytes", "ParseResultBytes", "SplitResultBytes"]

Also adds test case.
msg235558 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2015-02-08 15:54
Thanks for the tests. Reviewed the patch and looks good to me.
msg236885 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-28 14:06
Exposed classes are the types of results returned by urllib.parse functions. It is very unlikely that they will be directly used by the user. I see the only benefit of adding these class to __all__ that they will become visible for pydoc. Is it worth to apply the patch to maintained releases or to 3.5 only?
msg236914 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-02-28 21:45
For what it’s worth, I have used the the SplitResult class directly to build URLs from components, and to get at the hostname:port parsing functionality, as described in Issue 23416. As well as pydoc, I notice when things are missing from __all__ when I try to do “from <module> import *” to experiment in the interactive interpreter. Though I’m not fussed if this only goes into 3.5.
msg238775 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-03-21 08:33
These classes were introduced by Fred in issue624325. Is it intentional that they were not added to __all__ Fred?
msg238782 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-03-21 09:46
*Result and *ResultBytes classes are documented at https://docs.python.org/3/library/urllib.parse.html#urllib.parse.DefragResult

+1 for adding them to __all__.
msg239662 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-03-31 04:23
urllib.parse-all.v2.patch removes indentation from a blank line and merges recent changes to avoid a potential conflict.
msg239669 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-03-31 05:41
I think it would be safer not commit this patch in 3.4 and 2.7. The patch LGTM.
msg240216 - (view) Author: Roundup Robot (python-dev) Date: 2015-04-07 16:09
New changeset a48e76252952 by Serhiy Storchaka in branch 'default':
Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
https://hg.python.org/cpython/rev/a48e76252952
History
Date User Action Args
2015-04-07 16:09:57serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2015-04-07 16:09:30python-devsetnosy: + python-dev
messages: + msg240216
2015-04-07 15:58:43serhiy.storchakasetassignee: serhiy.storchaka
versions: - Python 3.4
2015-03-31 05:41:31serhiy.storchakasetmessages: + msg239669
2015-03-31 04:23:25martin.pantersetfiles: + urllib.parse-all.v2.patch

messages: + msg239662
2015-03-21 09:46:17berker.peksagsetnosy: + berker.peksag
messages: + msg238782
2015-03-21 08:33:35serhiy.storchakasetnosy: + fdrake
messages: + msg238775
2015-02-28 21:45:39martin.pantersetmessages: + msg236914
2015-02-28 14:06:50serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg236885
2015-02-28 13:57:49serhiy.storchakasetversions: + Python 3.4, Python 3.5
2015-02-08 15:54:32orsenthilsetnosy: + orsenthil

messages: + msg235558
stage: commit review
2015-02-08 11:43:17martin.pantersetfiles: - urllib.parse-all.patch
2015-02-08 11:43:07martin.pantersetfiles: + urllib.parse-all.patch
2015-02-08 11:38:46martin.pantercreate