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

deprecate loop parameter #19927

Merged
merged 2 commits into from
Jul 23, 2021
Merged

deprecate loop parameter #19927

merged 2 commits into from
Jul 23, 2021

Conversation

xiangyan99
Copy link
Member

No description provided.

@xiangyan99 xiangyan99 requested a review from annatisch July 23, 2021 15:38
@xiangyan99 xiangyan99 requested a review from lmazuel as a code owner July 23, 2021 15:38
@ghost ghost added the Azure.Core label Jul 23, 2021
@xiangyan99
Copy link
Member Author

#19834

@@ -73,6 +73,8 @@ class AioHttpTransport(AsyncHttpTransport):
:caption: Asynchronous transport with aiohttp.
"""
def __init__(self, *, session: Optional[aiohttp.ClientSession] = None, loop=None, session_owner=True, **kwargs):
if loop and sys.version_info >= (3, 10):
raise ValueError("Starting Python 3.10, asyncio doesn’t support loop as a parameter anymore")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add a deprecation warning if loop and sys.version_info < (3, 10)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar nitpick: Starting with Python 3.10, asyncio no longer supports the loop parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. If user does not use Python >= 3.10, we want to behave exactly same. There should be no impact at all. (new warnings are still side effects.)

@xiangyan99 xiangyan99 merged commit 77918e8 into main Jul 23, 2021
@xiangyan99 xiangyan99 deleted the core_deprecate_loop branch July 23, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants