You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When evaluating this package, I noticed that the pathname of an HTTPS address is output with a leading backslash, but for an SSH address without one, which means for my application that I have to check which protocol is used in order to edit the pathname if necessary.
My expectation would be that the pathname always returns the same regardless of the protocol (ideally without a leading backslash)
Steps to reproduce
The following code demonstrates the issue, the assertion is triggered, which proves the inconsistent API.
@oschneidewind: there's a wrinkle here, namely that ssh distinguishes between user@hostname:foo, and user@hostname:/foo. The former means "foo, relative to user's default directory (usually their home dir)", whereas the latter means "absolute path /foo, (ie. relative to filesystem root)". So whilst it'd be very unusual to see, say, github give you an absolute path in the SSH URL, it doesn't mean such a path can't exist in a URL, and it wouldn't be the same thing.
@mathrick I agree with you, the thing with the ssh url is unlikely but not impossible, but it bothers me that it is inconsistent between the protocols, this can also be solved by leaving out the slash in http parser.
If I use the parser, I want a consistent result. Otherwise I have to parse it myself, and then the package has less value.
Description
When evaluating this package, I noticed that the pathname of an HTTPS address is output with a leading backslash, but for an SSH address without one, which means for my application that I have to check which protocol is used in order to edit the pathname if necessary.
My expectation would be that the pathname always returns the same regardless of the protocol (ideally without a leading backslash)
Steps to reproduce
The following code demonstrates the issue, the assertion is triggered, which proves the inconsistent API.
Versions
Python 3.12.3
Expected behaviour
The pathname is always the same regardless of the protocol and the assertion is not triggered.
Actual behaviour
It does matter which URL is parsed, the assertion is triggered, which requires an additional processing step.
Additional information
The text was updated successfully, but these errors were encountered: