[issue43646] ForwardRef name conflict during evaluation

2021-04-17 Thread Ken Jin
Ken Jin added the comment: @tefra, thanks for testing. That's great to hear! And once again, thanks for the excellent bug report in your original message. @tefra and @gvanrossum, I'm closing this issue as it is now fixed in 3.10. If any of you feel that's wrong, please don't hesitate to re-o

[issue43646] ForwardRef name conflict during evaluation

2021-04-15 Thread Christodoulos Tsoulloftas
Christodoulos Tsoulloftas added the comment: @kj I can confirm the issue is resolved with Python 3.10.0a7+ -- status: pending -> open ___ Python tracker ___ __

[issue43646] ForwardRef name conflict during evaluation

2021-04-13 Thread Ken Jin
Ken Jin added the comment: @tefra, now that issue42904 has been solved, can you test your code again with 3.10.0a8? (it's not out yet, so you may have to pull the code from CPython's GitHub master branch and build CPython) Running your code again, it seems to be fixed: Python 3.10.0a7+ >>>

[issue43646] ForwardRef name conflict during evaluation

2021-03-28 Thread Ken Jin
Ken Jin added the comment: Wow, thank you for the excellent bug report! Surprisingly, issue42904 's patch fixes this problem as well. I've spent a few hours trying to debug this, and here's some findings: TLDR: 3.9.1 - 3.10 added ForwardRef recursive evaluation. A guess is that since get_ty

[issue43646] ForwardRef name conflict during evaluation

2021-03-28 Thread Christodoulos Tsoulloftas
New submission from Christodoulos Tsoulloftas : Consider two modules with the same name forward references with the same type construct ./a.py ``` from typing import Optional class Root: a: Optional["Person"] class Person: value: str ``` ./b.py ``` from typing import Optiona