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

Deprection Warnings python3.8 event loop #4477

Closed
L1ghtn1ng opened this issue Dec 31, 2019 · 20 comments
Closed

Deprection Warnings python3.8 event loop #4477

L1ghtn1ng opened this issue Dec 31, 2019 · 20 comments
Assignees
Labels
invalid This doesn't seem right pr-merged

Comments

@L1ghtn1ng
Copy link

L1ghtn1ng commented Dec 31, 2019

Hi in python3.8 these are the following warning that are generated when creating unit tests in pytest-asyncio

  /root/.local/share/virtualenvs/theHarvester-WYlMBOYj/lib/python3.8/site-packages/aiohttp/helpers.py:107: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    def noop(*args, **kwargs):  # type: ignore


  /root/.local/share/virtualenvs/theHarvester-WYlMBOYj/lib/python3.8/site-packages/aiohttp/connector.py:964: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
    hosts = await asyncio.shield(self._resolve_host(

  /root/.local/share/virtualenvs/theHarvester-WYlMBOYj/lib/python3.8/site-packages/aiohttp/locks.py:21: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
    self._event = asyncio.Event(loop=loop)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
@webknjaz webknjaz added the invalid This doesn't seem right label Dec 31, 2019
@webknjaz
Copy link
Member

Hello, it's been fixed in master a while back.

@L1ghtn1ng
Copy link
Author

L1ghtn1ng commented Dec 31, 2019 via email

@webknjaz
Copy link
Member

webknjaz commented Jan 1, 2020

Feel free to backport changes to 3.6 if they aren't there yet

@Jackenmen
Copy link
Contributor

@L1ghtn1ng are you working on this or can I try making a backport for this?

@L1ghtn1ng
Copy link
Author

You can make a back port for this

@Jackenmen
Copy link
Contributor

@webknjaz if I were to backport this, should I drop loop kwarg like in #3580 or rather send DeprecationWarning for code that passes it explicitly to aiohttp?
If the latter option is preferred, should I just ignore whatever was passed in the kwarg and call asyncio stuff without it or should I still call asyncio stuff with it so that the behaviour stays the same for people who use that kwarg for some reason?

@webknjaz
Copy link
Member

webknjaz commented Feb 9, 2020

I think just drop kwarg and ping @asvetlov for review.

@TBBle
Copy link

TBBle commented Feb 11, 2020

Can we re-open this ticket to track the backport status?

@webknjaz
Copy link
Member

That would be a separate issue or better a PR. I don't see any value in tracking the backport — if somebody is really interested: where's the PR? Besides, nothing in the title or the first post hints the version meaning that having this open would be misleading anyway.

@TBBle
Copy link

TBBle commented Feb 13, 2020

I assumed from the discussion earlier this week (the day before my previous comment) than a PR would be forthcoming soon. And this is the place that Google search has sent me when I hit exactly this issue, and the 'closed' status was initially surprising.

The first post hints that this is a problem with the stable release, because the problem didn't exist in master at the time of the bug report, and nothing in the first post suggested the user wasn't using the (most-obvious path) stable release from PyPI.

If one doesn't come up, perhaps I'll put up a PR, but I'm not committing to it at this point as I'll need to work through formal requirements on my end. I assume we're just talking about backporting #4264 though. That was already backported to 3.7 in #4265.

The @coroutine warning has already been fixed in 3.6, (see #4213), but that's more recent than the latest 3.6 release, currently 3.6.2.

@TBBle
Copy link

TBBle commented Feb 13, 2020

The cherry-pick was pretty simple, so the PR's up.

@delfick
Copy link

delfick commented Apr 23, 2020

Hello, it's been fixed in master a while back.

Is there a timeline for when this fix will be on pypi?

@TBBle
Copy link

TBBle commented Apr 23, 2020

My PRs (#4570 and #4576) have not had any response in two months. I assume at this point aiohttp 3.7 (or 4.0) will be released instead.

@helpr helpr bot added pr-merged and removed pr-available labels Apr 24, 2020
@TBBle
Copy link

TBBle commented Jul 1, 2020

My PRs have been merged, so this should be fixed in the next aiohttp 3.6 release, whenever that happens.

@peterdeme
Copy link

That's weird, that's still thrown for me in 3.6.2

@TBBle
Copy link

TBBle commented Aug 1, 2020

aiohttp 3.6.2 was released in October 2019. It'll be fixed in the next release.

@delfick
Copy link

delfick commented Oct 12, 2020

I saw this morning that aiophttp==3.6.3 was released this morning!

But unfortunately it does not contain a fix to this :(

I'm sure it'll happen eventually, I'll be super excited when it does!

@TBBle
Copy link

TBBle commented Oct 13, 2020

>_< The 3.6.3 release was a quick patch on top of the 3.6.2 release, it didn't include any of the bugfixes from the 3.6 branch since 3.6.2.

So hopefully the next 3.6 release.

@delfick
Copy link

delfick commented Oct 26, 2020

@asvetlov thanks for 3.7.1 !!! :)

@asvetlov
Copy link
Member

Welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right pr-merged
Projects
None yet
Development

No branches or pull requests

7 participants