python / python/cpython

IDLE: Run ... Customized strips backslashes from arguments

オープン
#93,016 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

topic-IDLE type-bug
主要言語
Python
スター
77.2k
フォーク
36k
PR マージ指標
PR 指標を取得中

説明

PART 1/2

Actions
In editor, do "Run... Customized"
In text box, Paste or type a valid Windows path (e.g.: c:\Users, \\server\share)
Select "OK"

Expected response:
script receives argument as entered without modification just as it does when run on the command line (e.g.: python prog.py c:\users)

Actual response:
script receives argument with backslashes treated as escape characters (e.g.: c:users, \servershare)

Workaround:
argument is not altered if entered in quotes. This is not the same behavior as the command line where quotes are accepted as part of the argument.

Part 2/2

Actions
In editor, do "Run... Customized"

Expected response:
text box is populated with previous entry, a legal windows path (e.g. `c:\Users)

Actual response:
text box is populated with previous entry mangled as above surrounded by curly braces (e.g.: {c:users}, {\serverpath}). If workaround above is used, then the string is correct, but quotes are gone and curly braces are present (e.g.: {c:\users}, {\\server\share}

System information

Windows 10 Home x86-64 (21H1 build 19043.1706)
Idle version 3.10.4

Linked PRs
  • gh-157635

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

IDLE の Run... Customized ワークフローから始め、issue に記載されている Windows パスのケースを、保存されたエントリの動作も含めて再現します。変更を加える前に、リンクされた PR gh-157635 を確認してください。完了条件は、引数がバックスラッシュを保持し、カスタマイズされたエントリのフィールドが入力されたパスを期待どおりに保持することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
desktop
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。