Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc12762

Browse files
miss-islingtonzooba
authored andcommitted
gh-98414: py.exe launcher does not use defaults for -V:company/ option (GH-98460)
(cherry picked from commit4bd63f6)Co-authored-by: Steve Dower <steve.dower@python.org>
1 parent585c95d commitfc12762

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

‎Lib/test/test_launcher.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ def test_filter_to_company(self):
370370
self.assertEqual(company,data["env.company"])
371371
self.assertEqual("3.100",data["env.tag"])
372372

373+
deftest_filter_to_company_with_default(self):
374+
company="PythonTestSuite"
375+
data=self.run_py([f"-V:{company}/"],env=dict(PY_PYTHON="3.0"))
376+
self.assertEqual("X.Y.exe",data["LaunchCommand"])
377+
self.assertEqual(company,data["env.company"])
378+
self.assertEqual("3.100",data["env.tag"])
379+
373380
deftest_filter_to_tag(self):
374381
company="PythonTestSuite"
375382
data=self.run_py([f"-V:3.100"])
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix:file:`py.exe` launcher handling of ``-V:<company>/`` option when
2+
default preferences have been set in environment variables or configuration
3+
files.

‎PC/launcher2.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ parseCommandLine(SearchInfo *search)
653653
search->tag=argStart;
654654
}
655655
search->tagLength= (int)(tail-search->tag);
656+
search->allowDefaults= false;
656657
search->restOfCmdLine=tail;
657658
}elseif (MATCHES(L"0")||MATCHES(L"-list")) {
658659
search->list= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp