Skip to content

[Bug]: numerous cases of deprecated Python syntax #219

Open
@tomviolin

Description

Contact Details

[email protected]

What happened?

When I install lettuce, either from source using git clone from the github repository, or from PyPi using pip install lettuce, I get the following error upon running the lettuce command from the shell:

  File "/home/tomh/lettuce/venv/lib/python3.10/site-packages/lettuce/__init__.py", line 61
    except Exception, e:
           ^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

This appears to be an old deprecated except syntax from Python 2.x. When I go in and fix that one on my copy, it reveals a large number of similar errors that follow, along with several instances of the old Python 2.x print syntax.

How can this be, with a package that appears to have been completely authored after Python 2.x was EOLed?

Version

0.2.1, 0.2.3

What operating system are you seeing the problem on?

Linux

Relevant log output

$ lettuce
Traceback (most recent call last):
  File "/home/tomh/lettuce/venv/bin/lettuce", line 33, in <module>
    sys.exit(load_entry_point('lettuce==0.2.1', 'console_scripts', 'lettuce')())
  File "/home/tomh/lettuce/venv/bin/lettuce", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/tomh/lettuce/venv/lib/python3.10/site-packages/lettuce/__init__.py", line 61
    except Exception, e:
           ^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

Note that I see the same error whether I install lettuce 0.2.1 or 0.2.3. I haven't tried 0.2.2 because it seems the relevant code didn't change from 0.2.1 to 0.2.3.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions