[Sqlalchemy-tickets] [sqlalchemy] #2916: possible numeric regression on 0.9.1
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2014-01-21 14:57:55
|
#2916: possible numeric regression on 0.9.1
---------------------+------------------------------------
Reporter: zzzeek | Owner:
Type: defect | Status: new
Priority: highest | Milestone: 0.9.xx
Component: mssql | Severity: major - 1-3 hours
Keywords: | Progress State: in queue
---------------------+------------------------------------
{{{
test env: sql server 2005 and pyodbc 3.0.7 and freetds 0.91, on debian 8.0
product env: sql server 2005 and pyodbc 3.0.7 and native client 10.0, on
windows 2003
above two env is the same behavior with 0.9.1, always return decimal
object for float type
follow is part data model:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.schema import Column,
from sqlalchemy.types import SmallInteger, Integer, Float
from sqlalchemy.types import String
Base = declarative_base()
class Unit(Base):
__tablename__ = 't_MeasureUnit'
id = Column('FMeasureUnitID', Integer, autoincrement=False,
primary_key=True)
name = Column('FName', String(80), nullable=False)
number = Column('FNumber', String(30), nullable=False)
short_number = Column('FShortNumber', String(30))
conversation = Column('FConversation', Integer, server_default='(1)')
coefficient = Column('FCoefficient', Float, nullable=False,
server_default='(1)')
deleted = Column('FDeleted', SmallInteger, nullable=False,
server_default='(0)')
with 0.8.4, conversation column return python float object, upgrade to 0.9
or 0.9.1 all Float column always return decimal object.
my project and the data model has been running for over two years, pass
two year with 0.7 and 0.8 no problem. my project not need to use decimal,
float precision is sufficient.
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2916>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|