Support later python features such as Python 3.10 feature "Structural Pattern Matching"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 96
- Fork
- 38
- Merge trung bình
- 1 giờ 18 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getgauge/gauge-python
-
GAUGE_PYTHON_COMMAND does not support relative paths (e.g. .venv/bin/python)Có thể đã có người làm @JakubStyczen đã nhận 40 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
getgauge/gauge-python#485 ·
-
bug help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
getgauge/gauge-python#460 · 1 bình luận ·
-
help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
getgauge/gauge-python#265 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
getgauge/gauge-python#245 ·
-
help wanted triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
getgauge/gauge-python#123 · 1 bình luận ·
Tất cả issue của getgauge/gauge-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nansencenter/geodataset#39 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
awslabs/visual-asset-management-system#804 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[18.0] werkzeug: AttributeErrorĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
odoo/odoo#297927 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
link-rot
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100