Fix crash in attrs_plugin when using a converter#4583
Closed
euresti wants to merge 1 commit intopython:masterfrom
Closed
Fix crash in attrs_plugin when using a converter#4583euresti wants to merge 1 commit intopython:masterfrom
euresti wants to merge 1 commit intopython:masterfrom
Conversation
gvanrossum
approved these changes
Feb 17, 2018
Member
gvanrossum
left a comment
There was a problem hiding this comment.
It's definitely better than nothing. :-)
glyph
added a commit
to glyph/klein
that referenced
this pull request
Feb 20, 2018
python/mypy#4397 to be present in a release
Contributor
Author
|
Any idea when the release might be? I have a better fix that makes it work correctly for local functions. Just wanting to know if I should rush on that. |
Contributor
Author
|
My fix builds on this change so this should land too. |
Member
|
Here's the release schedule: #4606 |
Contributor
Author
|
Can this be merged? I'd hate for someone who's testing out the attrs support in master getting crashes. Or the better fix in #4607 but that needs review. |
Member
yedpodtrzitko
pushed a commit
to kiwicom/mypy
that referenced
this pull request
Mar 15, 2018
Fixes python#4583 (and more). My first pass at this only supported converters that were reachable from the root. With this code the converter can be a local function too. Also now when we can't detect the type of the converter the init type becomes Any.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found this issue running mypy on our codebase.
Sadly I don't know how to fix the problem completely and support subclasses and incremental mode but I'll leave that for another day.