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

Commitb4e3973

Browse files
bluetechpatchback[bot]
authored andcommitted
Merge pull request#13922 from bluetech/fix-argparse-userwarning
config: fix `UserWarning: Do not expect file_or_dir` on some Python 3.12 and 3.13 point versions(cherry picked from commit3d80757)
1 parentc4442c9 commitb4e3973

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎changelog/13910.bugfix.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed `UserWarning: Do not expect file_or_dir` on some earlier Python 3.12 and 3.13 point versions.

‎src/_pytest/config/argparsing.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def parse_known_and_unknown_args(
170170
arguments, and a list of unknown flag arguments.
171171
"""
172172
strargs= [os.fspath(x)forxinargs]
173-
ifsys.version_info< (3,12):
173+
ifsys.version_info< (3,12,8)or (3,13)<=sys.version_info< (3,13,1):
174174
# Older argparse have a bugged parse_known_intermixed_args.
175175
namespace,unknown=self.optparser.parse_known_args(strargs,namespace)
176176
assertnamespaceisnotNone

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp