New submission from Gereon Kremer <gereon.kre...@gmail.com>:

While the documentation always (as in: at least since 3.5) required to pass "a 
tuple (soft, hard) of two integers" to resource.setrlimit(), passing floats 
worked just fine until 3.9.
This behavior was deprecated in 3.8 and removed in 3.10.

I see that the implementation was merely fixed to do what the documentation 
says. Nevertheless, I think this change of behavior should be mentioned in the 
documentation.

In my use-case for resource (within preexec_fn of subprocess.Popen), this 
deprecation warning only showed up in 3.9 for some reason (as you can see here: 
https://github.com/nafur/python-playground/runs/1814573503) and is now hidden 
by a generic "subprocess.SubprocessError: Exception occurred in preexec_fn." 
message.
A hint in the documentation would have helped significantly...

----------
messages: 386139
nosy: nafur
priority: normal
severity: normal
status: open
title: Add deprecation of float limits for resource to documentation
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43101>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to