[issue43840] [easy] test_distutils logs 3 DeprecationWarning warnings

2021-04-14 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, let's reuse bpo-41282.

I created PR 25405 and PR 25406.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Deprecate and remove distutils

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43840] [easy] test_distutils logs 3 DeprecationWarning warnings

2021-04-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I have reported this in the original issue earlier 
https://bugs.python.org/issue41282#msg388224 . See also 
https://bugs.python.org/issue43425 for more discussion over handling this.

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43840] [easy] test_distutils logs 3 DeprecationWarning warnings

2021-04-14 Thread STINNER Victor


STINNER Victor  added the comment:

Another warning:

$ ./python -m test -v test_check_c_globals
(...)
DeprecationWarning: The distutils package is deprecated and slated for removal 
in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.ccompiler
(...)
Tests result: SUCCESS

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43840] [easy] test_distutils logs 3 DeprecationWarning warnings

2021-04-14 Thread STINNER Victor


New submission from STINNER Victor :

test_distutils logs 3 DeprecationWarning warnings. They are emitted on purpose 
and related to PEP 632.

Does someone want to propose a fix for that?

"with self.assertWarns(DeprecationWarning):" or 
warnings_helper.check_warnings() of test.support.warnings_helper can be used.


$ ./python -m test -v test_distutils 
(...)
0:00:00 load avg: 5.49 [1/1] test_distutils
/home/vstinner/python/master/Lib/test/test_distutils.py:8: DeprecationWarning: 
The distutils package is deprecated and slated for removal in Python 3.12. Use 
setuptools or check PEP 632 for potential alternatives
  import distutils.tests

(...)

test_byte_compile_optimized (distutils.tests.test_build_py.BuildPyTestCase) ... 
/tmp/tmpptdx9r50.py:1: DeprecationWarning: The distutils package is deprecated 
and slated for removal in Python 3.12. Use setuptools or check PEP 632 for 
potential alternatives
  from distutils.util import byte_compile
ok

(...)

test_byte_compile (distutils.tests.test_install_lib.InstallLibTestCase) ... 
/tmp/tmpk_cfc09q.py:1: DeprecationWarning: The distutils package is deprecated 
and slated for removal in Python 3.12. Use setuptools or check PEP 632 for 
potential alternatives
  from distutils.util import byte_compile
ok

(...)

Tests result: SUCCESS

--

By the way, it would be nice to ignore the DeprecationWarning in setup.py as 
well for now:

$ make
(...)
/home/vstinner/python/master/./setup.py:33: DeprecationWarning: The distutils 
package is deprecated and slated for removal in Python 3.12. Use setuptools or 
check PEP 632 for potential alternatives
  from distutils import log
(...)

This warning is annoying.

--
components: Tests
keywords: easy, newcomer friendly
messages: 391054
nosy: vstinner
priority: normal
severity: normal
status: open
title: [easy] test_distutils logs 3 DeprecationWarning warnings

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com