New submission from James Allsopp <jamesaalls...@googlemail.com>:

Hi,
I like to build my Url's using url unparse, e.g.
site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', ''))
r = requests.get(site_to_test)

However, we reach a lot of sites through SSH tunnels, as our network is heavily 
locked down, and need to specify a port. Unfortunately, we can parse a url with 
a port, and get site_to_test.port = '9097' we can't run it the other way, e.g. 
this fails.
site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', 
'',port=9097))

This should be easy to fix and there's a use case for it.
Thanks

----------
components: Library (Lib)
messages: 354180
nosy: James Allsopp
priority: normal
severity: normal
status: open
title: urlparse gives no method to build a url with a port
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38408>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to