Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenScanner is not working on Python 3.11 #7

Closed
yurabysaha opened this issue Nov 6, 2022 · 1 comment
Closed

TokenScanner is not working on Python 3.11 #7

yurabysaha opened this issue Nov 6, 2022 · 1 comment

Comments

@yurabysaha
Copy link

👓 What did you see?

feature_file = parser.parse(TokenScanner(feature_path))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/gherkin/token_scanner.py", line 22, in __init__
  self.io = io.open(path_or_str, 'rU', encoding='utf8')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'

✅ What did you expect to see?

📦 Which tool/library version are you using?

Python 3.11.0
gherkin-official==24.1.0

🔬 How could we reproduce it?

Steps to reproduce the behavior:

  1. Install Python 3.11.0 and gherkin-official==24.1.0
  2. Pass any feature file into TokenScanner
  3. Run
  4. See error ValueError: invalid mode: 'rU'

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@mpkorstanje mpkorstanje transferred this issue from cucumber/common Nov 8, 2022
@mpkorstanje
Copy link
Contributor

Fixed in 1cc2ef0. Hopefully released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants