Skip to content

Conversation

akulakov
Copy link
Contributor

@akulakov akulakov commented Aug 3, 2021

Fixes unsafe test that was added in #27171

https://bugs.python.org/issue44808

@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Aug 3, 2021
@akulakov akulakov changed the title bpo-44808: fix test for interactive inspect getsource of a class bpo-44808: fixes test for interactive inspect getsource of a class Aug 3, 2021
Copy link
Contributor

@ambv ambv left a comment

Choose a reason for hiding this comment

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

This is a very elegant improvement. Consider making it more like the REPL by not having a __file__ attribute at all.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
@akulakov
Copy link
Contributor Author

akulakov commented Aug 3, 2021

The test failure seems to be unrelated asyncio test:

FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-08-03T11:55:01.0792071Z ----------------------------------------------------------------------
2021-08-03T11:55:01.0792702Z Traceback (most recent call last):
2021-08-03T11:55:01.0793490Z File "D:\a\1\s\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
2021-08-03T11:55:01.0794230Z with self.assertRaises(ConnectionError):
2021-08-03T11:55:01.0794943Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-08-03T11:55:01.0795542Z AssertionError: ConnectionError not raised

@ambv ambv added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Aug 3, 2021
@ambv ambv merged commit 5832597 into python:main Aug 3, 2021
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry, @akulakov and @ambv, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 58325971de0faf330c9c38269dae8315a0746e59 3.9

@bedevere-bot
Copy link

GH-27578 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 Aug 3, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 3, 2021
…ythonGH-27571)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 5832597)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
@ambv ambv removed the needs backport to 3.9 only security fixes label Aug 3, 2021
@ambv
Copy link
Contributor

ambv commented Aug 3, 2021

Oops, we don't want a 3.9 backport actually.

miss-islington added a commit that referenced this pull request Aug 3, 2021
…H-27571)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 5832597)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants