Package: python-pgsql Version: 2.4.0-5 Severity: important Tags: patch Hi!
The parsing of floats in python-pgsql is not locale agnostic since it uses strtod(). E. g. if you parse the value "1.5" in a locale that uses a comma as a decimal separator (like de_DE), you wrongly get "1". Please see https://bugzilla.ubuntu.com/show_bug.cgi?id=10191 for details. I prepared a patch for this which you can get at http://patches.ubuntu.com/patches/python-pgsql.floatparsing.diff According to PEP 331, the python 2.4 version now uses PyOS_ascii_strtod() to parse the floats; I also added an #if-wrapped verbatim copy of this function to pgresult.c to be able to compile the code with python versions earlier than 2.4 (which introduced PyOS_ascii_strtod()). Since this is highly important and can lead to grossly wrong results in e. g. financial applications, can you please try to push this change into Sarge and also pass this to upstream? -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.11.9 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) -- Martin Pitt http://www.piware.de Ubuntu Developer http://www.ubuntulinux.org Debian Developer http://www.debian.org
signature.asc
Description: Digital signature

