Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#121 closed defect (fixed)

Python 2.6.2 decimal breaks foolscap/test/test_banana.py

Reported by: ivank Owned by:
Priority: major Milestone: 0.4.0
Component: banana Version: 0.3.0
Keywords: Cc:

Description

Python 2.6.2 decimal renames and makes _private many constants, including Inf and NaN.

Patch is attached.

Attachments (1)

fix_test_banana.diff (1.4 KB) - added by ivank 16 years ago.
call Decimal to create NaN and Inf instead of importing them

Download all attachments as: .zip

Change History (5)

Changed 16 years ago by ivank

Attachment: fix_test_banana.diff added

call Decimal to create NaN and Inf instead of importing them

comment:1 Changed 16 years ago by ivank

Component: unknownbanana

comment:2 Changed 16 years ago by ivank

Just for reference, this is what happened to the constants in Lib/decimal.py from CPython 2.6.1 -> 2.6.2:

@@ -5490,15 +5509,15 @@
 ##### Useful Constants (internal use only) ################################
 
 # Reusable defaults
-Inf = Decimal('Inf')
-negInf = Decimal('-Inf')
-NaN = Decimal('NaN')
-Dec_0 = Decimal(0)
-Dec_p1 = Decimal(1)
-Dec_n1 = Decimal(-1)
+_Infinity = Decimal('Inf')
+_NegativeInfinity = Decimal('-Inf')
+_NaN = Decimal('NaN')
+_Zero = Decimal(0)
+_One = Decimal(1)
+_NegativeOne = Decimal(-1)
 
-# Infsign[sign] is infinity w/ that sign
-Infsign = (Inf, negInf)
+# _SignedInfinity[sign] is infinity w/ that sign
+_SignedInfinity = (_Infinity, _NegativeInfinity)

comment:3 Changed 16 years ago by Brian Warner

Resolution: fixed
Status: newclosed

comment:4 Changed 15 years ago by Brian Warner

Milestone: 0.3.30.4.0
Note: See TracTickets for help on using tickets.