[issue27485] urllib.splitport -- is it official or not?

Cheryl Sabella report at bugs.python.org
Tue Jun 13 18:59:11 EDT 2017


Cheryl Sabella added the comment:

Thank you.

>From my understanding, urllib didn't officially supported the split* functions (splittype, splithost, splitport, splinport, splituser, splitpasswd, splitattr, splitquery, splitvalue, splittag) even though they were migrated to urllib.parse.  The 2.7 documentation recommended using urlparse and stated that these split* functions would not be exposed in Python 3, but they are.

The proposal would be as Senthil suggested - to raise a DeprecationWarning if the current names are used and to rename them with a single underscore (to _split*).

However, I did have some questions.  
1. With the DeprecationWarning for the current function names, should the return value be a call to the _split* function or should it call urlparse/urlsplit?
2. Some of the return values from these split* functions can be different than urlsplit, as Martin showed in msg270215.  It seems that the return values should remain the same for now, but would the differences need to be documented? 
3. These functions are used in requests.py.  Should they be changed to use the _split* functions or changed to use urlparse?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27485>
_______________________________________


More information about the Python-bugs-list mailing list