[issue20191] resource.prlimit(int, int, str) crashs

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +912 ___ Python tracker ___ ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Although maybe you don’t need the IndexError check in the test. Good point. Thank you for your review Martin! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset dac72bc14c00 by Serhiy Storchaka in branch '3.5': Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that https://hg.python.org/cpython/rev/dac72bc14c00 New changeset 7bc2923a41b6 by Serhiy Storchaka in branch '3.6': Issue

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-18 Thread Martin Panter
Martin Panter added the comment: Patch looks good to me. Although maybe you don’t need the IndexError check in the test. Won’t limit[key] already handle that for you (as long as key isn’t -1 etc). -- ___ Python tracker

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch applies to resource.prlimit() the same solution as to resource.setrlimit(). -- components: +Extension Modules keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45848/prlimit_refcount.patch

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: Sorry, Argument Clinic doesn't support automatic tuple unpacking for arguments. It was almost never used, I don't think it was ever a good idea, and it would have made an already-too-complicated program even more complicated-er. --

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker ___ ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Revision 4bac47eb444c fixed setrlimit(). Perhaps those changes can just be applied again to prlimit(). I’m not an Arg Clinic expert, but isn’t one of its purposes to imitate native Python function signatures? Since argument unpacking was dropped from Python 2

[issue20191] resource.prlimit(int, int, str) crashs

2014-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- priority: normal - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20191 ___ ___

[issue20191] resource.prlimit(int, int, str) crashs

2014-01-16 Thread STINNER Victor
STINNER Victor added the comment: There is another option: modify the function to use argument clinic and implement something in argument clinic to hold a reference on borrowed references O and hold a reference on (...) sequence. Holding a reference on borrowed references O would make Python

[issue20191] resource.prlimit(int, int, str) crashs

2014-01-08 Thread STINNER Victor
New submission from STINNER Victor: $ ./python -c 'import resource; resource.prlimit(-3, 11, \udbff\udfff)' Erreur de segmentation (core dumped) The problem is a generic problem with PyArg_Parse functions and (O) format. With this format, the caller does not hold a reference to the object nor

[issue20191] resource.prlimit(int, int, str) crashs

2014-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for good example, Victor. See issue6083 for early discussion. As for options: - I afraid we can't raise an error if the second parameter is not a tuple right now. Rather we should first emit deprecation warning, and raise an error only several