nestorsalceda / mamba

The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).
http://nestorsalceda.github.io/mamba
MIT License
520 stars 64 forks source link

Incompatible with Python 3.8.4 #150

Closed Krasjet closed 4 years ago

Krasjet commented 4 years ago

Describe the bug

mamba is incompatible with Python 3.8.4

How to reproduce it

Run

$ mamba .

in any directories containing at least one valid test file. An exception would be raised,

Traceback (most recent call last):
  File "/home/kst/.local/bin/mamba", line 33, in <module>
    sys.exit(load_entry_point('mamba==0.11.0', 'console_scripts', 'mamba')())
  File "/home/kst/.local/lib/python3.8/site-packages/mamba/cli.py", line 18, in main
    runner.run()
  File "/home/kst/.local/lib/python3.8/site-packages/mamba/runners.py", line 29, in run
    modules = self.example_collector.modules()
  File "/home/kst/.local/lib/python3.8/site-packages/mamba/example_collector.py", line 20, in modules
    with self._load_module_from(path) as module:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/kst/.local/lib/python3.8/site-packages/mamba/example_collector.py", line 52, in _load_module_from
    yield self._module_from_ast(name, path)
  File "/home/kst/.local/lib/python3.8/site-packages/mamba/example_collector.py", line 69, in _module_from_ast
    code = compile(tree, path, 'exec')
ValueError: Name node can't be used with 'False' constant

and tests are also failing on the CI.

I suspect this issue is related to Issue40870.

Environment

Krasjet commented 4 years ago

A fix has been proposed (c.f. #151)