gh-128201: Fix DeprecationWarning in Lib/test/test_pdb.py#128202
gh-128201: Fix DeprecationWarning in Lib/test/test_pdb.py#128202kumaraditya303 merged 2 commits intopython:mainfrom
DeprecationWarning in Lib/test/test_pdb.py#128202Conversation
DeprecationWarning in Lib/test/test_pdb.pyDeprecationWarning in Lib/test/test_pdb.py
|
Is this the correct way to fix it? I actually don't know what set policy does. Someone with asyncio expertise should check if this is needed or what's the modern way to write it. Replacing it with a "private" call might elimiate the warning but may not be the best way to fix this. |
|
If Can we also call the replacement? |
|
Initially I was thinking about a "default way" to fix that This one was accidentally omitted in #128024:
UPD: |
|
Okay I think the fix is okay at this point. However, is there an asyncio expert that can take a look at the testing code and see if this line is even needed? As there's no explicit code to change the policy. The testing code is pretty trivial, will a |
For pdb tests, |
|
This isn't correct, it should be also in this case the code only runs I can make a PR if that's desired |
This isn't so much about correctness, the point is that our test infra doesn't check for policy in pdb tests which are run separately so omitting loop_factory doesn't makes any difference. |
|
ah then pdb tests need an extra test isolation check, that checks that the policy has been restored to None |
test_pdbraises aDeprecationWarning#128201