Generated .pyi files reference 'long', which is not Python 3 compatible
gvanrossum opened this issue · 0 comments
gvanrossum commented
I can think of two ways to fix this:
- The easy way: replace
'long'
with'int'
here - Do something with the override_dict
A potential problem for (1) would be that it will not only change the generated .pyi files but also the generated .py files. I do think that even in Python 2 the distinction between int and long is rarely useful though, so perhaps this is acceptable.
The problem with (2) is that it's a lot more code, since the architecture for the override_dict doesn't really map cleanly to the way is_integer_type() is used. (In order to allow separate mappings for Int32, UIint32, Int64 and UInt64, we'd need 4 isinstance checks.)