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

Fix --incremental crash on Type[...] #4038

Merged
merged 2 commits into from Oct 11, 2017

Conversation

Projects
None yet
3 participants
@ilevkivskyi
Collaborator

ilevkivskyi commented Sep 30, 2017

This fixes the second traceback reported in #3852. This also improves member lookup on Type[...] by moving it to a later stage (checkmember.py instead of some manipulations in TypeType constructor that are dangerous during de-serialization).

By the way it looks like the first traceback reported in #3852 is just another manifestation of #3052, but instead of just deleting a class it is replaced by a Var or by a FunctionDef.

Also fixes #4058.

@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Sep 30, 2017

Member

Is this something urgent (fixing a regression in a recent change) that should be cherry-picked into the release branch? Or is this something that has been around for a long time? It seems the second crash in #3852 is related to pointing mypypath to site-packages, which is not recommended.

Member

gvanrossum commented Sep 30, 2017

Is this something urgent (fixing a regression in a recent change) that should be cherry-picked into the release branch? Or is this something that has been around for a long time? It seems the second crash in #3852 is related to pointing mypypath to site-packages, which is not recommended.

@ilevkivskyi

This comment has been minimized.

Show comment
Hide comment
@ilevkivskyi

ilevkivskyi Oct 2, 2017

Collaborator

Is this something urgent (fixing a regression in a recent change) that should be cherry-picked into the release branch? Or is this something that has been around for a long time?

The bug is quite old (around a year), it started to be a crash in 0.510. So I don't think it is something urgent.

It seems the second crash in #3852 is related to pointing mypypath to site-packages, which is not recommended.

The crash doesn't depend on MYPYPATH setting, but the probability to find more dynamic code in libraries is higher. For example, the crash appears on type(f) , where f is a callable other than class object.

Collaborator

ilevkivskyi commented Oct 2, 2017

Is this something urgent (fixing a regression in a recent change) that should be cherry-picked into the release branch? Or is this something that has been around for a long time?

The bug is quite old (around a year), it started to be a crash in 0.510. So I don't think it is something urgent.

It seems the second crash in #3852 is related to pointing mypypath to site-packages, which is not recommended.

The crash doesn't depend on MYPYPATH setting, but the probability to find more dynamic code in libraries is higher. For example, the crash appears on type(f) , where f is a callable other than class object.

@ilevkivskyi ilevkivskyi referenced this pull request Oct 9, 2017

Closed

Release 0.540 planning #4084

@JukkaL JukkaL self-assigned this Oct 9, 2017

self.item = item.fallback
else:
self.item = item
self.item = item

This comment has been minimized.

@JukkaL

JukkaL Oct 10, 2017

Collaborator

Why does this change help? Is it because the type attribute of an Instance might refer to FakeInfo during deserialization?

@JukkaL

JukkaL Oct 10, 2017

Collaborator

Why does this change help? Is it because the type attribute of an Instance might refer to FakeInfo during deserialization?

This comment has been minimized.

@ilevkivskyi

ilevkivskyi Oct 10, 2017

Collaborator

Yes.

@ilevkivskyi

ilevkivskyi Oct 10, 2017

Collaborator

Yes.

This comment has been minimized.

@ilevkivskyi

ilevkivskyi Oct 10, 2017

Collaborator

(Or previously to None)

@ilevkivskyi

ilevkivskyi Oct 10, 2017

Collaborator

(Or previously to None)

@JukkaL

JukkaL approved these changes Oct 11, 2017

LGTM. Thanks for the fix!

@JukkaL JukkaL merged commit bd1b3d7 into python:master Oct 11, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment