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
{{ message }}
Repository navigation
ParseResultBytes.unsplit() raises AttributeError for a reference without an authority #163
Any reference without an authority (/a, a, mailto:x, ?q) crashes the bytes variant, while the str variant round-trips. Reproduced on 2.0.0 (main 3bd3832).
The traceback: unsplit calls copy_with(lazy_normalize=False), which calls _generate_authority, which reads the authority property, and that property does self.reference.authority.encode(self.encoding) (parseresult.py:409) without checking for None. The other bytes properties (scheme, path, …) are guarded the same way authority should be.
Happy to send a PR with a test if you would take one.
Activity