More consistent handling of trailing slashes
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 215
- Avg merge
- 1d 2m
- Merged PRs (30d)
- 13
Description
### 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:
```python
>>> 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 https://github.com/aio-libs/yarl/issues/153#issuecomment-357327176
```python
>>> 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
- [x] I agree to follow the aio-libs Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.