]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32381: pymain_run_command() uses PyCF_IGNORE_COOKIE (GH-23724)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Dec 2020 18:16:56 +0000 (19:16 +0100)
committerGitHub <noreply@github.com>
Wed, 23 Dec 2020 18:16:56 +0000 (19:16 +0100)
commita12491681f08a33abcca843f5150330740c91111
tree0548d800982a420ed2804834b827c443cdcf5d05
parent41b223d29cdfeb1f222c12c3abaccc3bc128f5e7
bpo-32381: pymain_run_command() uses PyCF_IGNORE_COOKIE (GH-23724)

The coding cookie (ex: "# coding: latin1") is now ignored in the
command passed to the -c command line option.

Since pymain_run_command() uses UTF-8, pass PyCF_IGNORE_COOKIE
compiler flag to the parser.

pymain_run_python() no longer propages compiler flags between
function calls.
Lib/test/test_cmd_line.py
Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst [new file with mode: 0644]
Modules/main.c