Message 244515 - Python tracker
This is essentially the same as Issue 22852. The title just refers to stripping an empty #fragment, but the netloc and query components are also affected. I have a patch there which needs reviewing, if you are interested. Or if you have any alternative ideas on how to solve this they would be welcome too.