Support later python features such as Python 3.10 feature "Structural Pattern Matching"
まだ誰も着手していません。
評価
調査の方向性
Start by reading the Python runner's parsing entry point and checking which parser version it uses; the issue does not name a file or test. Reproduce with the supplied match/case example under Python 3.10, then check whether parsing succeeds. Done means Gauge accepts the example without the reported parse error.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
If I want to use the match-case pattern, I can see parse error in the output. I could not find any information which Python versions are officially supported by this plugin. The only information I could find is the file "setup.tmpl" with the newest Python version 3.7.
Please use the following screenshot as the easiest way to reproduce it. This is not how I want to use the match-case in production.
To Reproduce
Steps (or project) to reproduce the behavior:
- Initialise a gauge project:
gauge init python - Use the following piece of code:
@step("Almost all words have vowels <table>")
def assert_words_vowel_count(table: Table):
for row in table:
word = str(row[0])
match word:
case "Gauge":
assert number_of_vowels(word) == 3
case "Mingle":
assert number_of_vowels(word) == 2
case "Snap" | "GoCD":
assert number_of_vowels(word) == 1
case "Rhythm":
assert number_of_vowels(word) == 0
case _:
assert False
- Run the gauge command
- See error
Logs
Failed to parse c:\xxx\gauge_match_case_example\step_impl\step_impl.py: The only possible keyword before an atomtrailers is 'await', not 'match'
Expected behavior
I can use Python 3.10 features like the Structural Pattern Matching.
Versions:
- Windows 10 Enterprise 21H2
- Python version 3.10.9
Gauge version: 1.5.4
Commit Hash: 30a0c23
Plugins
-------
html-report (4.2.0)
json-report (0.3.7)
python (0.4.1)
screenshot (0.1.0)
- 主要言語
- Python
- スター
- 96
- フォーク
- 38
- 平均マージ
- 1時間 9分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getgauge/gauge-python のほかの issue
-
GAUGE_PYTHON_COMMAND does not support relative paths (e.g. .venv/bin/python)対応中かも @JakubStyczen が 42 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
getgauge/gauge-python#485 ·
-
bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
getgauge/gauge-python#460 · コメント 1 件 ·
-
help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
getgauge/gauge-python#265 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
getgauge/gauge-python#245 ·
-
help wanted triage
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
getgauge/gauge-python#123 · コメント 1 件 ·
getgauge/gauge-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
btclib-org/btclib-wallet#587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Judgment-Pack/judgment-pack-spec#275 ·
メンテナーはふだん 1 日以内に返信
-
ai-generated
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue priority: low size: XS
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
yeongseon/azure-functions-doctor-python#651 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Changaco/python-libarchive-c#146 ·