Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
069dcc63
Commit
069dcc63
authored
Aug 01, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate mixed dict/keyword argument searchResults calls and using a request object.
parent
fee8d6ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/Products/ZCatalog/Catalog.py
src/Products/ZCatalog/Catalog.py
+8
-2
src/Products/ZCatalog/tests/test_catalog.py
src/Products/ZCatalog/tests/test_catalog.py
+2
-3
No files found.
src/Products/ZCatalog/Catalog.py
View file @
069dcc63
...
...
@@ -452,8 +452,14 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
else
:
real_req
=
request
if
real_req
is
not
None
:
# TODO: This deserves depreaction
if
real_req
:
warnings
.
warn
(
'You have specified a query using either a request '
'object or a mixture of a query dict and keyword '
'arguments. Please use only a simple query dict. '
'Your query contained "%s". This support is '
'deprecated and will be removed in Zope 2.14.'
%
repr
(
real_req
),
DeprecationWarning
,
stacklevel
=
4
)
known_keys
=
query
.
keys
()
# The request has too many places where an index restriction
# might be specified. Putting all of request.form,
...
...
src/Products/ZCatalog/tests/test_catalog.py
View file @
069dcc63
...
...
@@ -283,7 +283,6 @@ class TestCatalog(CatalogBase, unittest.TestCase):
# getMetadataForRID
# getIndexDataForRID
# make_query
# _sorted_search_indexes
def
test_sorted_search_indexes_empty
(
self
):
result
=
self
.
_catalog
.
_sorted_search_indexes
({})
...
...
@@ -586,8 +585,8 @@ class TestMergeResults(CatalogBase, unittest.TestCase):
def
testLimitSort
(
self
):
from
Products.ZCatalog.Catalog
import
mergeResults
results
=
[
cat
.
searchResults
(
dict
(
att1
=
'att1'
,
number
=
True
,
sort_on
=
'num'
)
,
sort_limit
=
2
,
_merge
=
0
)
dict
(
att1
=
'att1'
,
number
=
True
,
sort_on
=
'num'
,
sort_limit
=
2
)
,
_merge
=
0
)
for
cat
in
self
.
catalogs
]
merged_rids
=
[
r
.
getRID
()
for
r
in
mergeResults
(
results
,
has_sort_keys
=
True
,
reverse
=
False
)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment