Merge branch 'master' of https://github.com/notanumber/xapian-haystack
This commit is contained in:
commit
0be3ed9f72
|
@ -10,8 +10,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.9]
|
||||
xapian-version: [1.4.18]
|
||||
python-version: ['3.6', '3.9', '3.10']
|
||||
xapian-version: ['1.4.18']
|
||||
|
||||
steps:
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
@ -41,9 +41,14 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.9]
|
||||
django-version: [2.2, 3.1, 3.2]
|
||||
xapian-version: [1.4.18]
|
||||
python-version: ['3.6', '3.9']
|
||||
django-version: ['2.2', '3.1', '3.2']
|
||||
xapian-version: ['1.4.18']
|
||||
include:
|
||||
# Django added python 3.10 support in 3.2.9
|
||||
- python-version: '3.10'
|
||||
django-version: '3.2'
|
||||
xapian-version: '1.4.18'
|
||||
|
||||
steps:
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
xapian-haystack Changelog
|
||||
=========================
|
||||
|
||||
v3.0.1 (2021-11-12)
|
||||
-------------------
|
||||
|
||||
- Removed deprecated ``force_text`` usage, which will stop emitting
|
||||
RemovedInDjango40Warning's.
|
||||
- Test files are now included in release tarball.
|
||||
|
||||
v3.0.0 (2021-10-26)
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -2,3 +2,4 @@ include AUTHORS
|
|||
include CHANGELOG.rst
|
||||
include LICENSE
|
||||
include README.rst
|
||||
recursive-include tests *.py
|
||||
|
|
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ def read(fname):
|
|||
|
||||
setup(
|
||||
name='xapian-haystack',
|
||||
version='3.0.0',
|
||||
version='3.0.1',
|
||||
description='A Xapian backend for Haystack',
|
||||
long_description=read('README.rst'),
|
||||
long_description_content_type='text/x-rst',
|
||||
|
|
|
@ -9,7 +9,6 @@ import os
|
|||
from django.apps import apps
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.test import TestCase
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from haystack import connections
|
||||
from haystack.backends.xapian_backend import InvalidIndexError, _term_to_xapian_value
|
||||
|
@ -566,7 +565,7 @@ class BackendFeaturesTestCase(HaystackBackendTestCase, TestCase):
|
|||
self.assertEqual(_term_to_xapian_value([1, 2, 3], 'text'), '[1, 2, 3]')
|
||||
self.assertEqual(_term_to_xapian_value((1, 2, 3), 'text'), '(1, 2, 3)')
|
||||
self.assertEqual(_term_to_xapian_value({'a': 1, 'c': 3, 'b': 2}, 'text'),
|
||||
force_text({'a': 1, 'c': 3, 'b': 2}))
|
||||
str({'a': 1, 'c': 3, 'b': 2}))
|
||||
self.assertEqual(_term_to_xapian_value(datetime.datetime(2009, 5, 9, 16, 14), 'datetime'),
|
||||
'20090509161400')
|
||||
self.assertEqual(_term_to_xapian_value(datetime.datetime(2009, 5, 9, 0, 0), 'date'),
|
||||
|
|
|
@ -7,7 +7,6 @@ import sys
|
|||
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from haystack import connections
|
||||
from haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, SearchNode, log_query
|
||||
|
@ -1609,7 +1608,7 @@ def _to_xapian_term(term):
|
|||
Converts a Python type to a
|
||||
Xapian term that can be indexed.
|
||||
"""
|
||||
value = force_text(term).lower()
|
||||
value = str(term).lower()
|
||||
if LONG_TERM_METHOD:
|
||||
value = _ensure_term_length(value)
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue