-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[refactor] Remove code that "disables deprecation warnings about \u" #19606
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
base: master
Are you sure you want to change the base?
[refactor] Remove code that "disables deprecation warnings about \u" #19606
Conversation
Probably now useless: it doesn't seem to do anything anymore as far as I can tell. And I checked a couple of things, and old documentation. This is essentially a revert of python#7635 aka python@bd00106, although not 100% exactly.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Oh cool, there actually is a difference. It's a little bit inscrutable to me, and hard to determine what it should actually do, but at least it's something! |
mypy/test-data/unit/parse.test Line 115 in db67fac
|
|
Thanks for taking the initiative of looking into this! A few notes to hopefully clarify what's going on:
|
I believe this code is now useless: it doesn't seem to do anything as far as I can tell.
The real puzzler is that I can't figure out when \u would have triggered a DeprecationWarning at all. And I tried a couple of things, and checked a lot of versions of the documentation. I even downloaded a couple old python versions, including Python 2.7, to try to trigger one with their versions of parse, and got nothing. But perhaps there's some combination I didn't think of.
This is essentially a revert of #7635 aka bd00106, although not 100% exactly.
I do not believe this changes any behavior, and therefore did not write a test. I wish the original PRer had written a test so I knew what I was looking for!