Issue957240
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2004-05-20 06:23 by josiahcarlson, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
asyncore_loop_with_doc_no_infinity.patch | josiahcarlson, 2004-06-12 16:56 | Patch that doesn't use infinity |
Messages (13) | |||
---|---|---|---|
msg46013 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-05-20 06:23 | |
The attached patch is to offer the functionality desired by feature request: python.org/sf/491033 On machines that use standard IEEE floating point doubles, the 'infinity' needs only to be 1e16 due to the limited precision of floating point. 1e309 is used for convenience sake, and will continue to be a precision infinity until 1024 bits of precision in floating point values is available. At such point in time where 1e309 is available in hardware, it will still sufficient due to the practical limitations of counting. |
|||
msg46014 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-05-20 06:26 | |
Logged In: YES user_id=341410 Sorry about that, I generated the patch by hand and got the ordering messed up. |
|||
msg46015 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2004-05-31 18:32 | |
Logged In: YES user_id=21627 This patch lacks changes to the documentation and the test suite. |
|||
msg46016 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-05-31 20:36 | |
Logged In: YES user_id=341410 The attached patch includes both a documentation patch, as well as a modified loop patch to explicitly match the documentation. The patches are concatenated and in standard context diff format (as per the Python patch submission guidelines, sorry about the previous unified diff). The test suite does not seem to contain tests for asyncore. It does contain a test for asynchat, which will be unaffected by this patch. One thing to note: the use of 'count = count - 1' rather than 'count -= 1' is to remove potential bugs in the case where a mutable number-like object with a modifying __isub__ method were to be passed by a user. |
|||
msg46017 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2004-06-03 09:19 | |
Logged In: YES user_id=21627 Thanks for the patch. Applied as libasyncore.tex 1.15 asyncore.py 1.51 NEWS 1.986 |
|||
msg46018 - (view) | Author: Michael Hudson (mwh) | Date: 2004-06-11 16:31 | |
Logged In: YES user_id=6656 This patch should not have been accepted. Relying on a floating point infinity to marhsal/unmarshal correctly is a bad idea. With the aid of the LC_NUMERIC agnostism patch, this patch breaks test_asynchat *when asyncore.pyc exists*. I don't have a windows machine with a CVS HEAD Python to check, but if 2.3 behaviour is retained, the upshot is that the count parameter will default to *1* if the code is loaded from a .pyc file. |
|||
msg46019 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-06-11 21:54 | |
Logged In: YES user_id=341410 If it would be preferred, I have an alternate patch against 1.50 from CVS that uses None instead of floating point infinity. |
|||
msg46020 - (view) | Author: Michael Hudson (mwh) | Date: 2004-06-12 08:53 | |
Logged In: YES user_id=6656 um, "yes". what's in CVS currently is not going to be there for very long. |
|||
msg46021 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2004-06-14 04:59 | |
Logged In: YES user_id=21627 I have backed out the patch in libasyncore.tex 1.16 asyncore.py 1.52 NEWS 1.1001 |
|||
msg46022 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-06-14 15:16 | |
Logged In: YES user_id=341410 Y |
|||
msg46023 - (view) | Author: Josiah Carlson (josiahcarlson) * | Date: 2004-06-14 15:37 | |
Logged In: YES user_id=341410 There is an attached patch that uses None. I ran the standard tests twice, and it does not fail when asyncore.pyc exists (5 tests should suffice). |
|||
msg46024 - (view) | Author: Michael Hudson (mwh) | Date: 2004-06-15 10:47 | |
Logged In: YES user_id=6656 This is the patch I was trying to say was much better :-) |
|||
msg46025 - (view) | Author: Michael Hudson (mwh) | Date: 2004-06-30 09:07 | |
Logged In: YES user_id=6656 Checked in the new version as Lib/asyncore.py revision 1.53 Doc/lib/libasyncore.tex revision 1.17 Misc/NEWS revision 1.1015 Thanks! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:04 | admin | set | github: 40274 |
2004-05-20 06:23:33 | josiahcarlson | create |