linuxlewis / djorm-ext-pgfulltext

PostgreSQL full-text search integration with django orm.
Other
250 stars 84 forks source link

Fix Python3 Support #40

Closed linuxlewis closed 9 years ago

linuxlewis commented 10 years ago

This PR fixes 2 errors on python 3.4.1

    def as_sql(self, qn, connection):
        lhs, lhs_params = qn.compile(self.lhs)
        rhs, rhs_params = self.process_rhs(qn, connection)

>       if type(rhs_params) in [str, unicode]:
E       NameError: name 'unicode' is not defined

../../../.virtualenvs/lovely-django/lib/python3.4/site-packages/djorm_pgfulltext/fields.py:64: NameError

    def execute(self, sql, params=None):
        self.db.validate_no_broken_transaction()
        self.db.set_dirty()
        with self.db.wrap_database_errors:
            if params is None:
                return self.cursor.execute(sql)
            else:
>               return self.cursor.execute(sql, params)
E               django.db.utils.ProgrammingError: syntax error in tsquery: "'programmer'::bytea"

../../../.virtualenvs/lovely-django/lib/python3.4/site-packages/django/db/backends/utils.py:65: ProgrammingError
zain commented 9 years ago

would love to see this get merged, +1

niwinz commented 9 years ago

Thank you very much for this work.

But I don't have much time and interest in maintaining this package. I have added a note in the readme about searching new maintainers.