Skip to content

bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase#30198

Merged
asvetlov merged 11 commits into
python:mainfrom
asvetlov:rewrite-aasync-lock-tests
Dec 19, 2021
Merged

bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase#30198
asvetlov merged 11 commits into
python:mainfrom
asvetlov:rewrite-aasync-lock-tests

Conversation

@asvetlov

@asvetlov asvetlov commented Dec 19, 2021

Copy link
Copy Markdown
Contributor

@asvetlov

Copy link
Copy Markdown
Contributor Author

The issue can be backported to 3.9-3.10, it doesn't add backward compatibility issues

Comment thread Misc/NEWS.d/next/Library/2021-12-19-10-47-24.bpo-46128.Qv3EK1.rst Outdated
Comment thread Misc/NEWS.d/next/Tests/2021-12-19-12-20-57.bpo-46129.I3MunH.rst
Comment thread Misc/NEWS.d/next/Tests/2021-12-19-12-20-57.bpo-46129.I3MunH.rst Outdated
asvetlov and others added 2 commits December 19, 2021 13:24

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM in general, but I have some questions.

Comment thread Lib/test/test_asyncio/test_locks.py Outdated
self.assertTrue(ta.done())
self.assertTrue(tb.cancelled())
self.assertTrue(tc.done())
await tc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It differs from the former code. Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technically the same, but the new version also checks that tc task was not cancelled.

I can revert if you insist.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it is the same it LGTM.

Comment thread Lib/test/test_asyncio/test_locks.py Outdated
Comment thread Lib/test/test_asyncio/test_locks.py
Comment thread Lib/test/test_asyncio/test_locks.py Outdated

@asvetlov asvetlov left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@serhiy-storchaka thanks for the review.
Comments are addressed.

Comment thread Lib/test/test_asyncio/test_locks.py Outdated
self.assertTrue(ta.done())
self.assertTrue(tb.cancelled())
self.assertTrue(tc.done())
await tc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technically the same, but the new version also checks that tc task was not cancelled.

I can revert if you insist.

Comment thread Lib/test/test_asyncio/test_locks.py Outdated
Comment thread Lib/test/test_asyncio/test_locks.py
Comment thread Lib/test/test_asyncio/test_locks.py Outdated
self.assertTrue(ta.done())
self.assertTrue(tb.cancelled())
self.assertTrue(tc.done())
await tc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it is the same it LGTM.

@asvetlov
asvetlov merged commit 9c06fd8 into python:main Dec 19, 2021
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @asvetlov for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@asvetlov
asvetlov deleted the rewrite-aasync-lock-tests branch December 19, 2021 14:36
@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @asvetlov, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9c06fd89514a9a2865e2adcc472095f6949cecb2 3.10

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry @asvetlov, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 9c06fd89514a9a2865e2adcc472095f6949cecb2 3.9

asvetlov added a commit to asvetlov/cpython that referenced this pull request Dec 19, 2021
…tCase (pythonGH-30198)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-30202 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Dec 19, 2021
asvetlov added a commit that referenced this pull request Dec 19, 2021
…tCase (GH-30198) (GH-30202)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-30204 is a backport of this pull request to the 3.9 branch.

asvetlov added a commit to asvetlov/cpython that referenced this pull request Dec 19, 2021
…Case (pythonGH-30198)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
asvetlov added a commit that referenced this pull request Dec 19, 2021
…Case (GH-30198) (GH-30204)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
brandtbucher pushed a commit to brandtbucher/cpython that referenced this pull request Dec 27, 2021
…ythonGH-30198)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

6 participants