-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mypyc] Add bytes primitive type #9611
Conversation
There were various test failures because of a bad annotation in |
Now we have a problem with We could fix typeshed -- maybe the return type should be In any case these issues are very useful findings. Mypyc is a good at finding typeshed bugs! |
The match group thing keeps coming up, I'm in favour of a Union Any return (with maybe some overloads for when we don't need it): python/typeshed#3902 (comment) |
What's the status quo of the match group thing? Is it still a blocker of this? |
I think that it's still an issue. I kind of forgot about this PR. The typeshed fix should be fairly straightforward (but it needs to be synced back to mypy). |
|
Hi! @hauntsaninja, I'm working on bytes primitives, shall we sync the typeshed to fix current match.group issue? |
Sure, I opened #10862 |
Closing in favor of #10881. |
This adds minimal support for the
bytes
primitive type. This won'timprove performance until we implement some more primitives.
Actually, this will likely degrade performance a bit, since we now add
type checks for
bytes
values.Unfortunately, most of the
bytes
operations we'd need are private inCPython, so we'll need to either depend on implementation details or
reimplement (or copy+paste) a bunch of code.
Work on mypyc/mypyc#644.