[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-09-15 Thread STINNER Victor

STINNER Victor  added the comment:

test_peg_generator still emits DeprecationWarning warnings. Example:

vstinner@apu$ ./python -m test test_peg_generator -v
== CPython 3.11.0a0 (heads/main:b49263b698, Sep 15 2021, 14:44:10) [GCC 11.2.1 
20210728 (Red Hat 11.2.1-1)]
== Linux-5.13.14-200.fc34.x86_64-x86_64-with-glibc2.33 little-endian
== cwd: /home/vstinner/python/main/build/test_python_193641æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 15.94 Run tests sequentially
0:00:00 load avg: 15.94 [1/1] test_peg_generator
test_advanced_left_recursive 
(test.test_peg_generator.test_c_parser.TestCParser) ...

/home/vstinner/python/main/Lib/test/support/__init__.py:1713: 
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 ccompiler, sysconfig, spawn, errors

/home/vstinner/python/main/Lib/test/support/__init__.py:1713: 
DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig 
instead
  from distutils import ccompiler, sysconfig, spawn, errors
(...)

--
nosy: +vstinner

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-07-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650 by Dong-hee Na in branch 
'main':
bpo-43425: Remove test2to3 from Tools (#26981)
https://github.com/python/cpython/commit/d0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-07-01 Thread miss-islington


miss-islington  added the comment:


New changeset 956f1fc89475f6c8252a9eb0689bcf0eb69c15ea by Miss Islington (bot) 
in branch '3.10':
bpo-43425: Update setup.py not to use distutils.log (GH-26969)
https://github.com/python/cpython/commit/956f1fc89475f6c8252a9eb0689bcf0eb69c15ea


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-07-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25548
pull_request: https://github.com/python/cpython/pull/26986

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-07-01 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset a7e251b07aa5f1a858a3e791a30dea78e93ab728 by Dong-hee Na in branch 
'main':
bpo-43425: Update setup.py not to use distutils.log (GH-26969)
https://github.com/python/cpython/commit/a7e251b07aa5f1a858a3e791a30dea78e93ab728


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-07-01 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25543
pull_request: https://github.com/python/cpython/pull/26981

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset 94a4136c8eba349dc7eebe561ddaedbd0a89eb91 by Miss Islington (bot) 
in branch '3.10':
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
https://github.com/python/cpython/commit/94a4136c8eba349dc7eebe561ddaedbd0a89eb91


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25541
pull_request: https://github.com/python/cpython/pull/26978

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c8979f780e4b7d6db5693cb26a2956cc785abb48 by Dong-hee Na in branch 
'main':
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
https://github.com/python/cpython/commit/c8979f780e4b7d6db5693cb26a2956cc785abb48


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25533
pull_request: https://github.com/python/cpython/pull/26969

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25532
pull_request: https://github.com/python/cpython/pull/26968

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset 2b57ad3f5382edb6fe2dfe3c721573fbf25a826f by Miss Islington (bot) 
in branch '3.10':
bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)
https://github.com/python/cpython/commit/2b57ad3f5382edb6fe2dfe3c721573fbf25a826f


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +25301
pull_request: https://github.com/python/cpython/pull/26713

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-12 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 736ed6f7a9f465ba728198e8bca81e5fbe71bc37 by Dong-hee Na in branch 
'main':
bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)
https://github.com/python/cpython/commit/736ed6f7a9f465ba728198e8bca81e5fbe71bc37


--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-12 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
nosy: +corona10
nosy_count: 4.0 -> 5.0
pull_requests: +25278
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26693

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-03-15 Thread Steve Dower


Steve Dower  added the comment:

The link appears to be in the Resolution header of PEP 632?

But yes, your analysis is correct. If/when we move distutils elsewhere, we'll 
probably have to update all of these sections.

Ideally we'd have a helper function to do the initial "import distutils",  
handle failure (because it's not in Tools), and suppress the warning. But I 
don't know that there's anywhere we could put it reliably anyway, so probably 
just need to suppress the warnings directly and we'll handle failures if/when 
we move it into Tools.

--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-03-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Steve, PEP 632 lacks a reference to the SC acceptance thereof.  Could you add 
one?
https://mail.python.org/archives/list/python-...@python.org/thread/TXU6TVOMBLQU3SV57DMMOA5Y2E67AW7P/
And can you verify my interpretation below?

The warning is correct as to removal.  PEP 632 says, perhaps a bit tersely, 
that when the 3.11 branch is established for 3.11.0b1 and master/main becomes 
the 3.12.0a development branch, disutils/* be no longer be installed as part of 
the stdlib (ie, in /Lib).  At that point, 'import disutils' will cease working 
in installed CPython, outside of a cpython repository.  Although this could be 
worked around by catching the import error and skipping disutils-dependent 
tests, the dependency should better be removed, if possible, before 3.12.0a.

The PEP gives no timetable for doing so, and anticipates separate PRs like this.

It further says that when "the CPython build process no longer depends on 
distutils being in the standard library, the entire Lib/distutils directory and 
Lib/test/test_distutils.py file will be removed from the repository."  Leaving 
it deprecated but present was rejected.

Part of the extensive discussion at 
https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134/128 was 
about possibly putting parts of disutiles under /Tools and replacing 'import 
disutils' with a reference to /Tools/distutiles/whatever.  If this 
is done for tests, the access and use has to be conditional.  Our Windows 
installer only installs 4 or 21 Tools subdirectories thought appropriate for 
uses and others may include less, and maybe omit Tools altogether.

Karthikeyan posted the opening of this and another issue 5 days ago on #41281, 
with no comment so far.

--
nosy: +steve.dower, terry.reedy

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-03-07 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the clarification. As per issue41282 I thought disutils will be 
removed. The accepted PEP 632 states this scenario so I guess silencing the 
warning is good enough.

> The final dependency on distutils is CPython itself, which uses it to build 
> native extension modules in the standard library (except on Windows). Because 
> this is a CPython build-time dependency, it is possible to continue to use 
> distutils for this specific case without it being part of the standard 
> library.

--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-03-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We just need to suppress the warning unless I am missing somey. Distutils will 
still be used internally by CPython.

--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-03-06 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

distutils was deprecated for removal in Python 3.10. It is used in 
test_peg_generator.test_c_parser which emits a deprecation warning. It also 
seems to be used in test_support for missing_compiler_executable that will emit 
a deprecation warning.

./python -Wall -m test test_peg_generator test_c_parser
0:00:00 load avg: 0.02 Run tests sequentially
0:00:00 load avg: 0.02 [1/2] test_peg_generator
/root/cpython/Lib/test/test_peg_generator/test_c_parser.py:4: 
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.tests.support import TempdirManager


Other places on grep : 

rg 'from distutils' | rg -v 'Lib/distutils|rst'   
Modules/_decimal/tests/formathelper.py:from distutils.spawn import 
find_executable
Doc/includes/setup.py:from distutils.core import setup, Extension
Doc/includes/test.py:from distutils.util import get_platform
setup.py:from distutils import log
setup.py:from distutils.command.build_ext import build_ext
setup.py:from distutils.command.build_scripts import build_scripts
setup.py:from distutils.command.install import install
setup.py:from distutils.command.install_lib import install_lib
setup.py:from distutils.core import Extension, setup
setup.py:from distutils.errors import CCompilerError, DistutilsError
setup.py:from distutils.spawn import find_executable
Lib/_osx_support.py:from distutils import log
Lib/_osx_support.py:Currently called from distutils.sysconfig
Lib/test/support/__init__.py:from distutils import ccompiler, sysconfig, 
spawn, errors
Lib/test/test_importlib/test_windows.py:from distutils.util import get_platform
Lib/test/test_peg_generator/test_c_parser.py:from distutils.tests.support 
import TempdirManager
Tools/peg_generator/pegen/build.py:from distutils.core import Distribution, 
Extension
Tools/peg_generator/pegen/build.py:from distutils.command.clean import 
clean  # type: ignore
Tools/peg_generator/pegen/build.py:from distutils.command.build_ext import 
build_ext  # type: ignore
Tools/peg_generator/pegen/build.py:from distutils.tests.support import 
fixup_build_ext  # type: ignore
Tools/test2to3/setup.py:from distutils.core import setup
Tools/test2to3/setup.py:from distutils.command.build_py import 
build_py_2to3 as build_py
Tools/test2to3/setup.py:from distutils.command.build_py import build_py
Tools/test2to3/setup.py:from distutils.command.build_scripts import 
build_scripts_2to3 as build_scripts
Tools/test2to3/setup.py:from distutils.command.build_scripts import 
build_scripts
Tools/test2to3/test/runtests.py:from distutils.util import copydir_run_2to3
Misc/HISTORY:- Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler.

--
components: Tests
messages: 388222
nosy: pablogsal, xtreak
priority: normal
severity: normal
status: open
title: test_peg_generator.test_c_parser emits DeprecationWarning due to 
distutils
type: behavior
versions: Python 3.10

___
Python tracker 

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