Wilfredo Sánchez Vega

Results 96 comments of Wilfredo Sánchez Vega

And still deprecate `as_uri`. You can get the `EncodedURL` back out if you need that, but it seems we think you probably don't.

@glyph confused the hell out of me above. Oh, my bad. No, I don't was to add `as_text`; I was mis-remembering the name of `to_text`. I mean to propose that...

It would be helpful to catch this error and print the URL that produced it, so one might see what data is tripping us up.

Here are some failing examples: ```console error-causing bytes: b'\x80' URL: URL.from_text('http://0.0/%80') ``` ```console error-causing bytes: b'\xe1\x8c\x84\xc3\xa9\xf1\xb1\xa9\x9d\x9b' URL: URL.from_text('https://ɓ.ő𣫫á:26/ጄé\U00071a5d%9b') ``` ```console error-causing bytes: b'\xe1\x8c\x84\xc3\xa9\xf1\xb1\xa9\x9d\x9b0' URL: URL.from_text('https://𐎹pɓ.ő𣫫á:51159/ጄé\U00071a5d%9b0/E7*\x13𐬃\x94\x8e') ``` ```console error-causing bytes: b'\xe1\x8c\x84\xc3\xa9\xf1\xb1\xa9\x9d\x9b0'...

…which one can reproduce in the REPL: ```python >>> from hyperlink import EncodedURL, DecodedURL >>> encodedURL = EncodedURL.from_text('http://0.0/%80') >>> encodedURL URL.from_text('http://0.0/%80') >>> DecodedURL(encodedURL) Traceback (most recent call last): File "",...

@glyph @mahmoud I'm curious if you think this may suggest a bug in Hyperlink… that we have allowed the creation of an EncodedURL which cannot be decoded…?

I'm running into a by-platform equivalent of this. If I try to import `epoll` from the `select` module on macOS, I get an `[attr-defined]` error, but on Linux, that's fine....

Note the `select` issue I mention above appears to be new between Mypy `0.770` and `0.782`.

@gvanrossum Oh, OK, I didn't realize that Mypy could be told to do platform-specific things. I'll read more. https://github.com/twisted/twisted/pull/1416#issuecomment-702425277 describes the issue in a bit more detail.

Closing this in favor of the Twisted issue above, as there is nothing to fix in Klein.