[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread Furkan Onder


Furkan Onder  added the comment:

You are welcome :=)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks for the fix Furkan Önder!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4b972faf605912092013a1fdbf486c498d002926 by Victor Stinner in 
branch 'master':
bpo-40462: Fix typo in test_json (GH-20094)
https://github.com/python/cpython/commit/4b972faf605912092013a1fdbf486c498d002926


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19400
pull_request: https://github.com/python/cpython/pull/20094

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests:  -19288

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-06 Thread Furkan Onder


Change by Furkan Onder :


--
pull_requests: +19288
pull_request: https://github.com/python/cpython/pull/19972

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-05 Thread STINNER Victor


STINNER Victor  added the comment:

> IMHO we should create backport patch for 3.8 and 3.7

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-01 Thread Dong-hee Na


Dong-hee Na  added the comment:

@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

--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-01 Thread miss-islington

miss-islington  added the comment:


New changeset 719e14d2837520c18398a3e22a36f20c1fe76edf by Furkan Önder in 
branch 'master':
bpo-40462: fix variable and function names (GH-19832)
https://github.com/python/cpython/commit/719e14d2837520c18398a3e22a36f20c1fe76edf


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-01 Thread Furkan Onder


Furkan Onder  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-01 Thread Furkan Onder


Change by Furkan Onder :


--
keywords: +patch
nosy: +furkanonder
nosy_count: 1.0 -> 2.0
pull_requests: +19151
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19832

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-04-30 Thread STINNER Victor


STINNER Victor  added the comment:

Another one:

Lib/unittest/test/test_program.py:191:40 undefined name 'hasInstallHandler'

Code:

def testBufferCatchFailfast(self):
program = self.program
for arg, attr in (('buffer', 'buffer'), ('failfast', 'failfast'),
  ('catch', 'catchbreak')):
if attr == 'catch' and not hasInstallHandler:
continue
...

attr is never equal to 'catch' and so it's just dead code which can be removed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-04-30 Thread STINNER Victor


STINNER Victor  added the comment:

Another one:

Lib/test/test_json/test_recursion.py:55:24 undefined name 'pyjson'

Code:

def test_defaultrecursion(self):
class RecursiveJSONEncoder(self.json.JSONEncoder):
recurse = False
def default(self, o):
if o is JSONTestObject:
if self.recurse:
return [JSONTestObject]
else:
return 'JSONTestObject'
return pyjson.JSONEncoder.default(o)

Here I'm not sure. *Maybe* pyjson.JSONEncoder should be replaced with 
self.json.JSONEncoder?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-04-30 Thread STINNER Victor


STINNER Victor  added the comment:

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 :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-04-30 Thread STINNER Victor


New submission from STINNER Victor :

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:

def sendall(self, buffer, flags=None):
self.last = data
self.output.append(data)
return len(data)

def send(self, data, flags=None):
self.last = data
self.output.append(data)
return len(data)

I guess that sendall() buffer parameter should be renamed to data.

--
components: Tests
keywords: newcomer friendly
messages: 367812
nosy: vstinner
priority: normal
severity: normal
status: open
title: [easy] undefined name in Lib/test/mock_socket.py
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com