Skip to content

More consistent handling of trailing slashes #1543

@purplezimmermann

Description

@purplezimmermann

Is your feature request related to a problem?

It’s a follow-up to #1542 –& I hope it doesn’t get nitpicky ;) – these issues just pop up in my unit tests ... I’ve also realized that I’m essentially re-opening #153 w/ this:

>>> URL('http://github.com') == URL('http://github.com/')
True

>>> str(URL('http://github.com')) == str(URL('http://github.com/'))
False

Describe the solution you'd like

Remove trailing slashes in .__str__() conversion – or completely, as proposed in #153 (comment)

>>> str(URL('http://github.com/'))
'http://github.com'

Describe alternatives you've considered

Using direct URL comparison – which leads me back to #1542 ;)

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions