[New-bugs-announce] [issue46815] Extra `DeprecationWarning` when running `lib2to3` tests

Nikita Sobolev report at bugs.python.org
Mon Feb 21 05:22:11 EST 2022


New submission from Nikita Sobolev <mail at sobolevn.me>:

I first noticed it in the buildbot logs:

```
0:24:42 load avg: 3.87 [430/431/1] test_lib2to3 passed (1 min 38 sec)
<string>:2: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
```

But, it also happens locally:

```
» ./python.exe Lib/test/test_lib2to3.py
/Users/sobolev/Desktop/cpython/Lib/unittest/loader.py:350: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  __import__(name)
Refactor file: /Users/sobolev/Desktop/cpython/Lib/lib2to3/refactor.py
```

After my patch it is gone:

```
» ./python.exe Lib/test/test_lib2to3.py
Refactor file: /Users/sobolev/Desktop/cpython/Lib/lib2to3/refactor.py
```

----------
components: Tests
messages: 413643
nosy: Jelle Zijlstra, benjamin.peterson, lukasz.langa, sobolevn
priority: normal
severity: normal
status: open
title: Extra `DeprecationWarning` when running `lib2to3` tests
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46815>
_______________________________________


More information about the New-bugs-announce mailing list