Package: python-pymongo Version: 2.2-4+deb7u1 Severity: normal Tags: upstream patch
Dear Maintainer, MongoDB 2.6 supports sort()ing on "textScore" http://docs.mongodb.org/manual/reference/operator/query/text/#text-operator-text-score Text Score values are floating point numbers, and unfortunately pymongo strictly enforces checking on sort values (pymongo.ASCENDING, pymongo.DESCENDING,etc). Please consider removing the value check and TypeError exception in pymongo/helpers.py:70. ~$ diff -r -u /usr/lib/python2.7/dist-packages/pymongo/helpers.py helpers.py --- /usr/lib/python2.7/dist-packages/pymongo/helpers.py 2014-05-17 02:07:12.402275999 +0000 +++ helpers.py 2014-05-17 02:08:11.426275998 +0000 @@ -67,9 +67,6 @@ for (key, value) in index_list: if not isinstance(key, basestring): raise TypeError("first item in each key pair must be a string") - if value not in [pymongo.ASCENDING, pymongo.DESCENDING, pymongo.GEO2D, pymongo.GEOHAYSTACK]: - raise TypeError("second item in each key pair must be ASCENDING, " - "DESCENDING, GEO2D, or GEOHAYSTACK") index[key] = value return index -- System Information: Debian Release: 7.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-pymongo depends on: ii python 2.7.3-4+deb7u1 ii python-bson 2.2-4+deb7u1 Versions of packages python-pymongo recommends: ii python-gridfs 2.2-4+deb7u1 pn python-pymongo-ext <none> python-pymongo suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org