Inconsistent behaviour for 'path' in URI constructor

Bug #435790 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.uri
Triaged
Low
Unassigned

Bug Description

If you construct a URI like this:
   uri = URI(scheme='http', host='example.com', path='foo/bar')

You will end up with a URI like this:
   print str(uri)
   http://example.comfoo/bar

I'd expect a URI like:
   http://example.com/foo/bar

Or at least an error, asserting that the path should begin with a leading '/'. This is what other parts of lazr.uri do with paths without leading slashes. I'd much prefer implicitly adding one, but at least lazr.uri should be consistent, whatever it does.

Tags: tech-debt
Curtis Hovey (sinzui)
tags: added: tech-debt
Changed in lazr.uri:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.