You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[easy] undefined name in Lib/test/mock_socket.py #84642
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-05-14.23:02:41.255>created_at=<Date2020-04-30.23:50:30.182>labels= ['easy', 'tests', '3.9']
title='[easy] undefined name in Lib/test/mock_socket.py'updated_at=<Date2020-05-14.23:29:08.116>user='https://github.com/vstinner'
attr is never equal to 'catch' and so it's just dead code which can be removed.
furkanonder commented on May 1, 2020
furkanondermannequin
Mannequin
More actions
Hello,
I sent a PR that corrects variable and function names.
I'm not sure how to fix it for Lib/test/test_json/test_recursion.py:55:24 so I didn't make any changes.
Activity
vstinner commentedon Apr 30, 2020
pyflakes found the following issues in sendall():
Lib/test/mock_socket.py:95:21 undefined name 'data'
Lib/test/mock_socket.py:96:28 undefined name 'data'
Lib/test/mock_socket.py:97:20 undefined name 'data'
Code:
I guess that sendall() buffer parameter should be renamed to data.
vstinner commentedon Apr 30, 2020
Another one:
Lib/test/test_frame.py:53:17 undefined name 'inner'
I guess that self.inner() should be used instead of inner(). In practice, it's dead code, but fixing it would make pyflakes happier :-)
vstinner commentedon Apr 30, 2020
Another one:
Lib/test/test_json/test_recursion.py:55:24 undefined name 'pyjson'
Code:
Here I'm not sure. *Maybe* pyjson.JSONEncoder should be replaced with self.json.JSONEncoder?
vstinner commentedon May 1, 2020
Another one:
Lib/unittest/test/test_program.py:191:40 undefined name 'hasInstallHandler'
Code:
attr is never equal to 'catch' and so it's just dead code which can be removed.
furkanonder commentedon May 1, 2020
Hello,
I sent a PR that corrects variable and function names.
I'm not sure how to fix it for Lib/test/test_json/test_recursion.py:55:24 so I didn't make any changes.
miss-islington commentedon May 1, 2020
New changeset 719e14d by Furkan Önder in branch 'master':
bpo-40462: fix variable and function names (GH-19832)
719e14d
corona10 commentedon May 1, 2020
@vstinner
IMHO we should create backport patch for 3.8 and 3.7
3.8 and 3.7 has same codes for this.
https://github.com/python/cpython/blob/3.8/Lib/test/mock_socket.py#L95
vstinner commentedon May 5, 2020
It's deadcode, I don't think that it's worth it. But it's up to you. If you consider that it's worth it, go ahead and backport the fix.
vstinner commentedon May 14, 2020
New changeset 4b972fa by Victor Stinner in branch 'master':
bpo-40462: Fix typo in test_json (GH-20094)
4b972fa
vstinner commentedon May 14, 2020
Thanks for the fix Furkan Önder!
furkanonder commentedon May 14, 2020
You are welcome :=)