[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2020-02-23 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 5.0 -> 6.0
pull_requests: +18006
pull_request: https://github.com/python/cpython/pull/18640

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2020-02-08 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

The patch for this issue had some outstanding questions/changes to be made 
before being merged, but now a new PR needs to be opened to replace the 
original one.  Anyone who is interested can pick this up, but please only open 
one PR for this and please also credit the original author as per the dev 
guide.  Thank you!

--
nosy: +cheryl.sabella
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +benjamin.peterson, stutzbach
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-07 Thread Oren Milman

Oren Milman  added the comment:

With regard to refleaks in __init__() methods, i started looking for similar 
refleaks
in the codebase, and hope to open an issue to fix them soon.

--

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-07 Thread Oren Milman

Change by Oren Milman :


--
keywords: +patch
pull_requests: +3886
stage:  -> patch review

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There is other issues with IncrementalNewlineDecoder.__init__ -- it leaks 
references when called repeatedly.

The simplest solution of both issues will be moving the initialization to the 
new method. But this class looks designed for subclassing, and this can break 
subclasses that change arguments before passing them to the superclass' 
constructor.

--

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Oren Milman

Oren Milman  added the comment:

Yes, although i don't know if there are usecases for that.

--

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Is IncrementalNewlineDecoder subclassable?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Oren Milman

New submission from Oren Milman :

Given an uninitialized IncrementalNewlineDecoder:
uninitialized = 
io.IncrementalNewlineDecoder.__new__(io.IncrementalNewlineDecoder)

each of the following calls would raise a SystemError ('null argument to
internal routine'):
uninitialized.getstate()
uninitialized.setstate((b'foo', 0))
uninitialized.reset()

In contrast, the following call would raise a ValueError
('IncrementalNewlineDecoder.__init__ not called'):
uninitialized.decode(b'bar')

ISTM that getstate(), setstate(), and reset() should have the same behavior as
decode(). (Though i think that including the actual type name in the error
message would be better, as it could be a subclass of 
IncrementalNewlineDecoder).

--
components: IO
messages: 303842
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: some methods of uninitialized io.IncrementalNewlineDecoder objects raise 
SystemError
type: behavior
versions: Python 3.7

___
Python tracker 

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