This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients barneygale, escape0707, miss-islington, xtreak
Date 2021-05-03.08:12:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620029573.8.0.394278251168.issue39950@roundup.psfhosted.org>
In-reply-to
Content
The changes have introduced deprecation warnings in tests. It seems https://github.com/python/cpython/blob/ad106c68eb00f5e4af2f937107baff6141948cee/Lib/test/test_pathlib.py#L1937 is not covered.

./python -Wall -m test test_pathlib                      
0:00:00 load avg: 0.81 Run tests sequentially
0:00:00 load avg: 0.81 [1/1] test_pathlib
/root/cpython/Lib/pathlib.py:1265: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  warnings.warn("pathlib.Path.link_to() is deprecated and is scheduled "
/root/cpython/Lib/pathlib.py:1265: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  warnings.warn("pathlib.Path.link_to() is deprecated and is scheduled "

== Tests result: SUCCESS ==

1 test OK.

Total duration: 2.9 sec
Tests result: SUCCESS

Also it will be nice to point to the line causing deprecation instead of the library soruce code that will help users identify the deprecated usage. Using stacklevel=2 might help here https://docs.python.org/3/library/warnings.html#warnings.warn


./python -Wall -m test test_pathlib  
0:00:00 load avg: 1.82 Run tests sequentially
0:00:00 load avg: 1.82 [1/1] test_pathlib
/root/cpython/Lib/test/test_pathlib.py:1937: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  q.link_to(r)
/root/cpython/Lib/test/test_pathlib.py:1937: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  q.link_to(r)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 4.3 sec
Tests result: SUCCESS
History
Date User Action Args
2021-05-03 08:12:53xtreaksetrecipients: + xtreak, miss-islington, barneygale, escape0707
2021-05-03 08:12:53xtreaksetmessageid: <1620029573.8.0.394278251168.issue39950@roundup.psfhosted.org>
2021-05-03 08:12:53xtreaklinkissue39950 messages
2021-05-03 08:12:53xtreakcreate