[Patches] [ python-Patches-957240 ] Patch for feature request 491033

SourceForge.net noreply at sourceforge.net
Mon Jun 14 11:16:51 EDT 2004


Patches item #957240, was opened at 2004-05-19 23:23
Message generated for change (Comment added) made by josiahcarlson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=957240&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Josiah Carlson (josiahcarlson)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for feature request 491033

Initial Comment:
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.



----------------------------------------------------------------------

>Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-06-14 08:16

Message:
Logged In: YES 
user_id=341410

Y

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-06-13 21:59

Message:
Logged In: YES 
user_id=21627

I have backed out the patch in

libasyncore.tex 1.16
asyncore.py 1.52
NEWS 1.1001


----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2004-06-12 01:53

Message:
Logged In: YES 
user_id=6656

um, "yes".  what's in CVS currently is not going to be there for 
very long.

----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-06-11 14:54

Message:
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.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2004-06-11 09:31

Message:
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.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-06-03 02:19

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Applied as

libasyncore.tex 1.15
asyncore.py 1.51
NEWS 1.986


----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-05-31 13:36

Message:
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.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-05-31 11:32

Message:
Logged In: YES 
user_id=21627

This patch lacks changes to the documentation and the test
suite.

----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-05-19 23:26

Message:
Logged In: YES 
user_id=341410

Sorry about that, I generated the patch by hand and got the
ordering messed up.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=957240&group_id=5470



More information about the Patches mailing list