| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
(Ah I think the methods were only in 3.13.0b3 actually) |
Sorry, something went wrong.
|
Looks like we'll have to wait for the release of 3.13b3 before adding the new-in-3.13 methods. They exist on 3.13b3 but not on 3.13b2, so stubtest is complaining. I'd be fine with any of the following options:
|
Sorry, something went wrong.
Unless there's a specific reason why someone might want or need to import something from _symtable rather than symtable, I'd prefer it if we avoided writing stubs for these internal modules which are implementation details of the runtime. (If anything from _symtable was reexported from symtable as public API, I could make a case for including the module, as it's generally good to accurately reflect in the stubs the module things were actually defined in. But it doesn't look like anything is reexported in symtable as public API.) |
Sorry, something went wrong.
Yes that's what I was just checking! since docs.python.org reports 3.13b2 I thought it was the "next" release and not the one that was "just" released. Not sure if it's possible for the docs to actually know which feature was added after a release and that is not yet available in the release that can be downloaded. I'll ask Hugo on CPython for that.
I think it's easier to do that. It's less error-prone (otherwise, I'd need to update the allow_list afterwards, so it's still 2 commits where 1 could have been fine), and more complete IMO (because if someone has 3.14, they would also expect the features from 3.13 since it was written in the docs that this feature was available). And I don't want to change 3.13 with 3.14 and then change it back again afterwards... (also, the use of an enumeration is somewhat breaking between 3.12 and 3.13 so it's important to know that in 3.13, something changed IMO). I'll leave it as a draft until the next release.
No, indeed. It's just importing names but since _socket also had that kind of treatment (where there are a lot of constants), I wondered about it. But if I don't need to, it's easier for me! |
Sorry, something went wrong.
I hope it isn't! Since instances of StrEnum are also instances of str (and all members of a StrEnum enumeration are instances of StrEnum), it should be fully backwards compatible, no? |
Sorry, something went wrong.
|
Actually, the types are compatible but not the values. We did not change what is returned in 3.12.x but in 3.13, it was decided to change the values. Because the old values were incorrect (semantically speaking, like "TypeVar bound" was returned for the symbol table of a default type parameter value...). And we used an enumeration to avoid a constant string which could not be changed in the future. |
Sorry, something went wrong.
|
Got it, thanks! (And thanks for the PR!) |
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This incorporates the changes of the following PRs:
@JelleZijlstra Should I also write the stubs for _symtable or should I leave it to the IDEs? (PyCharm generates it automatically from the compiled file, but I don't know for others).