Skip to content

asyncio-throttle version update breaks ScoutSuite for Python 3.5 #695

Closed
@FnTm

Description

@FnTm

Describe the bug

A dependency called asyncio-throttle released a new version yesterday, which forces a requirement for Python 3.6. This in turn essentially forces ScoutSuite to require Python 3.6+. I think we should either pin the dependencies to older, known versions, or list explicit required Python version for ScoutSuite.

Our build started failing due to this, since we're on using Debian Stretch, for which the newest available Python version is 3.5.8

07:55:59 Collecting asyncio-throttle>=0.1.1 (from scoutsuite==5.7.0->-r /scout_report/requirements.txt (line 6))
07:55:59   Downloading https://files.pythonhosted.org/packages/00/a2/87e28afc7ff726dfcf1615357d8a261a37dae48888479c093fa4b856085d/asyncio_throttle-1.0.0-py3-none-any.whl
08:05:46 + scout --provider aws --no-browser --regions us-east-1 --exceptions /scout_report/exceptions-aws-default.json
08:05:47 Traceback (most recent call last):
08:05:47   File "/scout-report/venv/bin/scout", line 11, in <module>
08:05:47     load_entry_point('ScoutSuite==5.7.0', 'console_scripts', 'scout')()
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 484, in load_entry_point
08:05:47     return get_distribution(dist).load_entry_point(group, name)
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2714, in load_entry_point
08:05:47     return ep.load()
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2332, in load
08:05:47     return self.resolve()
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2338, in resolve
08:05:47     module = __import__(self.module_name, fromlist=['__name__'], level=0)
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/ScoutSuite/__main__.py", line 6, in <module>
08:05:47     from asyncio_throttle import Throttler
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/asyncio_throttle/__init__.py", line 1, in <module>
08:05:47     from .throttler import Throttler
08:05:47   File "/scout-report/venv/lib/python3.5/site-packages/asyncio_throttle/throttler.py", line 13
08:05:47     self._task_logs: Deque[float] = deque()
08:05:47                    ^
08:05:47 SyntaxError: invalid syntax

This seems to be related to them using a 3.6+ feature of type-hinting.

To Reproduce

  • Use a recent version of ScoutSuite on system with Python 3.5
  • Observe the same error as above.

Additional context

This can probably be fixed by pinning to the earlier asyncio-throttle version, but that seems like dealing with symptoms rather than addressing it directly

Metadata

Metadata

Assignees

No one assigned

    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