[issue8087] Unupdated source file in traceback

2011-11-05 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I just want to note that the code might be edited not only while it is running it in the interactive interpreter but also while it is running as a standalone script. In this case the script naturally would not know to reload its own code nor allow the user to

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: > We can use a class attribute to set the attribute before calling __init__ Ah, yes, I thought about adding a class attribute as well, but the class currently does not have any and initializes instance attributes to default values in __init__, so I ch

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: Here is a new patch; please take a look. Do I understand correctly that I should now remove the old one? -- Added file: http://bugs.python.org/file22123/_child_created_2.diff ___ Python tracker <h

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: Looking at my own patch, I've noticed that the comment I added to Popen.__del__ doesn't sound quite right to me in terms of language and doesn't end in a full stop while all other comments in the same method do. Am I being too picky? I can'

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-27 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I've added passing __init__ an undeclared keyword argument as an example to the comment following your suggestion. I've also reworded the comment to make it sound better to me and added a full stop. :-) -- Added file: http://bugs.python.org

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2011-06-07 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: Unfortunately it was not. >>> Extension('myext', define_macros=[]) Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes from 3 to 17 positional arguments but 3 were given The issue is that the m

[issue12265] revamp argument errors

2011-06-07 Thread Oleg Oshmyan
Changes by Oleg Oshmyan : -- nosy: +chortos ___ Python tracker <http://bugs.python.org/issue12265> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2011-06-25 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: Yes, thank you. I am (yet) unable to create a misleading error message now. :-) -- ___ Python tracker <http://bugs.python.org/issue6

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-07-27 Thread Oleg Oshmyan
New submission from Oleg Oshmyan : If a truncated input stream is given to the zlib.decompress function, it raises a zlib.error. However, if the same stream is fed to a zlib.Decompress object, no exception is raised during the entire lifetime of the object. Attached is an example

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-07-27 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I believe the attached patch fixes this problem, making zlib.Decompress.flush() raise the exception raised by zlib.decompress(). In the same patch, I also took the opportunity to correct a wrong comment in the implementation of flush() and change the error

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-07-27 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: > faking another error code Actually, I think another call to inflate(), which would be valid at that point, would just return the other error code, so it can as well be faked. -- ___ Python tracker &l

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-02 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I like the new patch, but shouldn’t the default be to behave the same way zlib.decompress() behaves, i. e. raise? (Or perhaps zlib.decompress() should be modified not to raise instead. I’m just aiming at consistency.) Of course this will break code that relies

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-05 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I have another proposition (as an alternative). The new _bz2.BZ2Decompressor objects have an attribute called eof which is False until the end of the stream is read. The same attribute could be added to zlib.Decompress objects

[issue9850] obsolete macpath module dangerously broken and should be removed

2011-08-18 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I fully agree with Ronald’s proposal. And for a start, here is a trivial patch that fixes macpath.join('', ...) [at the moment it just returns its last argument]. By the way, this fix is probably eligible for inclusion in Python 2.7 too. I

[issue9850] obsolete macpath module dangerously broken and should be removed

2011-08-18 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: It is already tested but here is a new version of the patch that expands the existing test to cover the situation that was broken (plus another one). -- Added file: http://bugs.python.org/file22943/macpath_join_fix_with_test.patch

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-15 Thread Oleg Oshmyan
New submission from Oleg Oshmyan : If subprocess.Popen is called with a keyword argument whose name is undefined or simply too many arguments, an instance of the Popen class is created but its __init__ method call fails due to the invalid argument list. (Immediately) afterwards, the new

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2011-05-18 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: $ python3.2 Python 3.2 (r32:88445, Mar 28 2011, 16:46:36) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from distutils.core impo

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2013-09-21 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: > But what about the self.returncode data attribute? Should we also add a > class 'returncode' attribute? If so, what should be its value? None? or > object()? Or is it guaranteed that when _child_created is set true, > returncode will be de

[issue19021] AttributeError in Popen.__del__

2013-09-21 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: > Anothe possible solution is get rid from getattr and catch > AttributeError instead. Surely this would suffer from the same issue? Why are the builtins getting deleted anyway? In fact, why is getattr getting deleted from the builtins module? The __buil

[issue19021] AttributeError in Popen.__del__

2013-09-22 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: But the thing is, builtins are already supposed to be the very last thing destroyed at shutdown. -- ___ Python tracker <http://bugs.python.org/issue19