➜

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.

作者 martin.panter
收信人 berker.peksag, chad.birch, cvrebert, demian.brecht, martin.panter, orsenthil, serhiy.storchaka
日期 2015-03-23.04:57:00
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1427086620.64.0.430516538197.issue20059@psf.upfronthosting.co.za>
In-reply-to
内容
Patch v2 just changes a test to use “with self.assertRaises()”.

The behaviour of urlparse() succeeding and then result.port failing is indeed odd and surprising. Hopefully documenting this behaviour will help with the “surprising” aspect. But changing it would surely break compatibility. For example, the following is still potentially useful:

>>> urlsplit("http://localhost:ipp/").netloc
'localhost:ipp'

On Unix, some programs look up port names in /etc/services, even though this is not valid for URLs according to the RFCs, and urlsplit().port does not support it. In this case “ipp” would be whatever port the Internet Printing Protocol server is configured to run on.
历史
日期 用户 动作 参数
2015-03-23 04:57:00martin.panter修改recipients: + martin.panter, orsenthil, cvrebert, berker.peksag, serhiy.storchaka, demian.brecht, chad.birch
2015-03-23 04:57:00martin.panter修改messageid: <1427086620.64.0.430516538197.issue20059@psf.upfronthosting.co.za>
2015-03-23 04:57:00martin.panter链接issue20059 messages
2015-03-23 04:57:00martin.panter创建