[issue43101] Add deprecation of float limits for resource to documentation
New submission from Gereon Kremer : 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 <https://bugs.python.org/issue43101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43101] Add deprecation of float limits for resource to documentation
Gereon Kremer added the comment: Hm, I see. For methods that do not intercept exceptions or run code in a different process or alike, the deprecation warning and the TypeError should be sufficient. Given that identifying this issue can be particularly nasty for setrlimit (if used within preexec_fn), could we document this particular affected function anyway? -- ___ Python tracker <https://bugs.python.org/issue43101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11245] Implementation of IMAP IDLE in imaplib?
Gereon Kremer added the comment: We have implemented this functionality according to RFC 2177. We actually implemented a synchronous idle function that blocks until a timeout occurs or the server sent some event. This is not the most flexible way, however it will provide a basic functionality that enables user to use imap idle based notifications. Besides, every other solution would require threads or regular polling. See attached patch file. -- keywords: +patch nosy: +nafur Added file: http://bugs.python.org/file27400/imapidle.patch ___ Python tracker <http://bugs.python.org/issue11245> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11245] Implementation of IMAP IDLE in imaplib?
Gereon Kremer added the comment: I got the confirmation for my agreement. I'm not quite sure about the tests, as I'm not really familiar with the way this is done in cpython. The test_imaplib.py seems to cover all ways to connect to some server, but none of the actual imap commands. The patch only implements another commands (whose behaviour is highly/only dependent of other events on the server). Hence, I don't see a way to create a meaningfull test case other than just calling the command... -- ___ Python tracker <http://bugs.python.org/issue11245> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11245] Implementation of IMAP IDLE in imaplib?
Gereon Kremer added the comment: I stumbled about this issue again and would really like to see it fixed. I see the possibility to create a test case in combination with the first test sequence which creates a temporary mail. Would it be enough, that we just call IDLE in some folder, create a temporary mail in this folder and check if it returns? Unfortuantely, I have not been able to write code for such a test case yet, as the whole test routine fails with "[PRIVACYREQUIRED] Plaintext authentication disallowed on non-secure (SSL/TLS) connections". This is using 3.2.3, but I guess it will not be any different with the current release... (as it is the same with 2.7.3) -- ___ Python tracker <http://bugs.python.org/issue11245> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11245] Implementation of IMAP IDLE in imaplib?
Gereon Kremer added the comment: So, let's resurrect this one. For the project that lead to the old patch, we did not need this feature. However, we now needed are more complete implementation of IDLE. Hence, we extended this to return after sending idle() and support polling, leaving idle mode or wait until something happens (like before). -- Added file: http://bugs.python.org/file37555/imapidle.patch ___ Python tracker <http://bugs.python.org/issue11245> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com