talkpython / async-techniques-python-course

Async Techniques and Examples in Python Course
https://training.talkpython.fm/courses/explore_async_python/async-in-python-with-threading-and-multiprocessing
MIT License
455 stars 250 forks source link

Fix "deprecated `trio.Queue`" warning #9

Closed vindard closed 4 years ago

vindard commented 4 years ago

Overview

It looks like trio.Queue was deprecated as of trio 0.9.0 (see here).

This PR pins trio to the version just before this deprecation and then pins trio_async to its latest version that was compatible with trio 0.8.0.


Error message being addressed

This was the error being thrown when using the latest version of trio & trio_async:

Traceback (most recent call last):
  File "prod_trio.py", line 30, in <module>
    async def generate_data(num: int, data: trio.Queue):
  File ".../site-packages/trio/_deprecate.py", line 125, in __getattr__
    raise AttributeError(name)
AttributeError: Queue
mikeckennedy commented 4 years ago

Super, thanks for that @vindard