New submission from Olof Johansson: Hi,
The urlparse library's "netloc" attribute is today further split into the following attributes: username, password, hostname, port. The attributes preceding the @ (username, password) are refered to in RFC 3986 [1] as "userinfo", the format of which is scheme dependant. E.g. the (expired) internet draft for SSH/SFTP urls [2] have connection parameters within the userinfo (user;cparams@host). In some cases, the deprecated "username:password" syntax is required to be supported even with, e.g. "connection parameters". For this reason, I propose a new attribute, "userinfo", that exposes the "raw" userinfo string, without any splitting on : etc. I've had a go at a patch, with updated unit tests and documentation. Any feedback is welcome! Regards, 1: http://tools.ietf.org/rfc/rfc3986.txt 2: http://tools.ietf.org/id/draft-ietf-secsh-scp-sftp-ssh-uri-04.txt ---------- components: None files: urlparse_userinfo.diff keywords: patch messages: 179447 nosy: olof priority: normal severity: normal status: open title: urlparse: add userinfo attribute type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file28649/urlparse_userinfo.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16909> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com