#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)
Change History (5)
Changed 16 years ago by
Attachment: | fix_test_banana.diff added |
---|
comment:1 Changed 16 years ago by
Component: | unknown → banana |
---|
comment:2 Changed 16 years ago by
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
Resolution: | → fixed |
---|---|
Status: | new → closed |
applied, in [028005770443de50a73dd01ecfdf8abf1dace0d3]. Thanks!
comment:4 Changed 16 years ago by
Milestone: | 0.3.3 → 0.4.0 |
---|
Note: See
TracTickets for help on using
tickets.
call Decimal to create NaN and Inf instead of importing them