-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Acceptance test fail on "typing.py" #4206
Acceptance test fail on "typing.py" #4206
Comments
This is a problem introduced in astroid 2.5.1 apparentely. |
The error is a direct result of pylint-dev/astroid#916. To make it work, I needed to insert intermediate classes that don't exist, like |
Probably linked but the error seems different:
|
Continuing the discussion from pylint-dev/astroid#919 here:
@Pierre-Sassoulas I understand the issue. I just don't how to to fix it. As far as I know we can only choose between the acceptance test passing OR Generic Type Alias working at the moment. We had many open issue for the later whereas I've seen only this one for the acceptance test. What do you have in mind to fix it? |
I did not follow that very closely, could you explain why we can't have both ? Trying to reproduce the crash with a minimal example proved to be too hard for the time I had. |
For pylint-dev/astroid#916 to work, I needed to create and insert custom classes that don't exist into the MRO. This was because in the stdlib the typing classes ( To be perfectly honest, I wasn't sure it would work out completely perfect. However besides for your issue, I haven't seen any. |
We could release without the bug fix and make a new release as soon as it is fixed. |
@Pierre-Sassoulas As things stand at the moment, the fix will probably not be ready soon. What do you think about releasing I haven't seen any issues pop-up other than this one regarding the acceptance test, so it should be ok. |
Yeap, I was going to suggest the same thing, as we must handle duplicate of issue already fixed in pylint's master. |
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Trevor Gamblin <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Trevor Gamblin <[email protected]> (cherry picked from commit b06d10f) Signed-off-by: Armin Kuster <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Trevor Gamblin <[email protected]>
What's New in astroid 2.5.3? ============================ Release Date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the `collections` and `typing` brain so that `pylint`s acceptance tests are fine. Closes pylint-dev/pylint#4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes pylint-dev/pylint#2822 Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Trevor Gamblin <[email protected]>
The followint test:
pytest -m acceptance -k "test_libmodule[typing.py]"
Fail with the following stacktrace:
The text was updated successfully, but these errors were encountered: