You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Sorry about that, I generated the patch by hand and got the
ordering messed up.
loewis commented on May 31, 2004
loewismannequin
Mannequin
More actions
Logged In: YES
user_id=21627
This patch lacks changes to the documentation and the test
suite.
josiahcarlson commented on May 31, 2004
josiahcarlsonmannequin
MannequinAuthor
More actions
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.
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.
josiahcarlson commented on Jun 11, 2004
josiahcarlsonmannequin
MannequinAuthor
More actions
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.
Activity
josiahcarlson commentedon May 20, 2004
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.
josiahcarlson commentedon May 20, 2004
Logged In: YES
user_id=341410
Sorry about that, I generated the patch by hand and got the
ordering messed up.
loewis commentedon May 31, 2004
Logged In: YES
user_id=21627
This patch lacks changes to the documentation and the test
suite.
josiahcarlson commentedon May 31, 2004
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.
loewis commentedon Jun 3, 2004
Logged In: YES
user_id=21627
Thanks for the patch. Applied as
libasyncore.tex 1.15
asyncore.py 1.51
NEWS 1.986
mwhudson commentedon Jun 11, 2004
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.
josiahcarlson commentedon Jun 11, 2004
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.
mwhudson commentedon Jun 12, 2004
Logged In: YES
user_id=6656
um, "yes". what's in CVS currently is not going to be there for
very long.
loewis commentedon Jun 14, 2004
Logged In: YES
user_id=21627
I have backed out the patch in
libasyncore.tex 1.16
asyncore.py 1.52
NEWS 1.1001
josiahcarlson commentedon Jun 14, 2004
Logged In: YES
user_id=341410
Y
josiahcarlson commentedon Jun 14, 2004
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).
mwhudson commentedon Jun 15, 2004
Logged In: YES
user_id=6656
This is the patch I was trying to say was much better :-)
mwhudson commentedon Jun 30, 2004
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!