Support later python features such as Python 3.10 feature "Structural Pattern Matching"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Python
- Stelle
- 96
- Fork
- 38
- Merge medio
- 1h 18m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getgauge/gauge-python
-
GAUGE_PYTHON_COMMAND does not support relative paths (e.g. .venv/bin/python)Forse già presa @JakubStyczen l’ha presa 40 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
getgauge/gauge-python#485 ·
-
bug help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
getgauge/gauge-python#460 · 1 commento ·
-
help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
getgauge/gauge-python#265 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
getgauge/gauge-python#245 ·
-
help wanted triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
getgauge/gauge-python#123 · 1 commento ·
Tutte le issue di getgauge/gauge-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
NVIDIA/flare-local-inference#90 ·
I maintainer di solito rispondono entro 1 giorno
-
area/streaming comp/gateway P2 platform/telegram type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#144897 ·
I maintainer di solito rispondono entro 1 giorno
-
request-theme
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
LizardByte/ThemerrDB#9575 ·
I maintainer di solito rispondono entro 1 giorno
-
Author Page: noshin-nawalApertaauthor-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
acl-org/acl-anthology#10599 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zilliztech/memsearch#818 ·
I maintainer di solito rispondono entro 1 giorno