Closed plankthom closed 2 years ago
Removal of SemanticAnalyzer.builtin_type
:
https://github.com/python/mypy/commit/5bd2641ab53d4261b78a5f8f09c8d1e71ed3f14a#diff-6d2a87e2b0fdefc2766ed8e178d16253286bc574ee6798df140f081941bc5746
Sorry that I forgot to update the announcement. Currently please use named_type
instead.
Could someone please submit a PR for this? (using a hasattr()
for compatibility) Sorry, but I don't have much time to work on this myself.
I should be able to take care of this, but I don't access to the PyPI project.
@ilevkivskyi Could you make me a maintainer at https://pypi.org/project/sqlalchemy-stubs/?
Alternatively, I wonder if we could (or should) add back builtin_type
as an alias to named_type
, but mark it as deprecated.
IIUC this should now work with mypy 0.931, so I am closing this issue.
Actually, we can still switch to the newer "official" API method, so re-opening again. PRs are welcome :-)
@ilevkivskyi would you like to hasattr()
on builtin_type
in case it goes away again? using hasattr()
on named_type
doesn't work as named_type
DID exist in mypy < .930 but apparently the functionality diffed a bit at that time.
I have no plans to remove builtin_type
. Keeping it around is not a significant burden.
@shawnwall Essentially, yes. We can have this just in case (but since Jukka says it will be there, it is not a priority).
Upgrading to mypy 0.930 triggered the following INTERNAL ERROR issue:
Considering the announcement in https://github.com/python/mypy/issues/6617 , I assume this should be solved here ...
Workaround: keep mypy pinned on version 0.921