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

Deprecation warnings in asyncio with Python 3.8 #622

Closed
dmajda opened this issue Nov 13, 2019 · 5 comments
Closed

Deprecation warnings in asyncio with Python 3.8 #622

dmajda opened this issue Nov 13, 2019 · 5 comments

Comments

@dmajda
Copy link

dmajda commented Nov 13, 2019

When using aiopg with Python 3.8 with warnings enabled, deprecation warnings are emitted at various places where a loop argument is passed to asyncio APIs. To quote from What’s New In Python 3.8:

In asyncio, the explicit passing of a loop argument has been deprecated and will be removed in version 3.10 for the following: asyncio.sleep(), asyncio.gather(), asyncio.shield(), asyncio.wait_for(), asyncio.wait(), asyncio.as_completed(), asyncio.Task, asyncio.Lock, asyncio.Event, asyncio.Condition, asyncio.Semaphore, asyncio.BoundedSemaphore, asyncio.Queue, asyncio.create_subprocess_exec(), and asyncio.create_subprocess_shell().

It would be good to fix these warnings. I’m not sure whether it would involve just refactoring few asyncio API calls, or whether it would require deeper changes in loop handling inside the library.

@vir-mir
Copy link
Member

vir-mir commented Nov 14, 2019

@dmajda hi! what version of aiopg are you using? in version 1.0.0explicit transfer has been replaced with get_running_loop

@dmajda
Copy link
Author

dmajda commented Nov 14, 2019

We use 1.0.0. Here are some specific places where the warnings pop up:

These were caught by a test suite of one of @energomonitor’s internal projects that uses aiopg (we have warnings enabled when running tests). There may be some more places which our test suite didn’t catch.

@vir-mir
Copy link
Member

vir-mir commented Nov 14, 2019

Thank. Yes. I think it will be necessary to do this.

seedofjoy added a commit to seedofjoy/aiopg that referenced this issue Jan 9, 2020
@seedofjoy
Copy link
Contributor

Done. Review, please

Pliner pushed a commit that referenced this issue Dec 3, 2020
@Pliner
Copy link
Member

Pliner commented Dec 3, 2020

Resolved by #642

@Pliner Pliner closed this as completed Dec 3, 2020
@Pliner Pliner mentioned this issue Dec 5, 2020
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

4 participants