Change by David Szotten :
--
pull_requests: +7121
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue28557>
___
___
Python-bugs-list mai
New submission from David Szotten:
Was just tracking down a bug in eventlet, which manifested as "OSError: raw
readinto() returned invalid length -1 (should have been between 0 and 8192)"
I was misled for a while by the fact that readinto was in fact returning b'',
not -1. Thi
David Szotten added the comment:
thanks, and apologies for the noise
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26232>
___
__
New submission from David Szotten:
Unless i misunderstand the docs, i would expect `Mock(foo)` to have the same
effect as `create_autospec(foo)`, but that doesn't appear to be the case:
>>> m1 = mock.Mock(spec=lambda: None)
>>> m2 = mock.create_autospec(spec=lambda: None)
&
David Szotten added the comment:
not sure i follow. we need a different message if e.g. an integer is passed in
updated the patch to only run the unicode check for non-strings
or do you have a suggestion for an error message that works nicely in both
cases?
--
Added file: http
David Szotten added the comment:
after some trial and error it only appears to break for 3rd party packages (all
20 or so i happened to have installed), whereas everything i tried importing
from the standard library worked fine
```
__import__('requests.', fromlist=[u'get'])
Traceback (most
David Szotten added the comment:
first ever patch to python, so advice on the patch would be appreciated
found an example in the stdlib that triggers bug (used in test):
`__import__('encodings', fromlist=[u'aliases'])`
--
keywords: +patch
Added file: http://bugs.python.org/file36500
New submission from David Szotten:
```
__import__('fabric.', fromlist=[u'api'])
Traceback (most recent call last):
File stdin, line 1, in module
```
accidentally ended up with something like this via some module that was using
`unicode_literals`. stumped me for a second until i realised