Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sorting in _sort_iterate_resultset in py3 #42

Merged
merged 3 commits into from Sep 24, 2018

Conversation

pbauer
Copy link
Member

@pbauer pbauer commented Sep 19, 2018

No description provided.

@tseaver
Copy link
Member

tseaver commented Sep 19, 2018

@pbauer Is there an issue number we should be closing with this PR? Or linking from another repo?

@icemac icemac added the bug label Sep 20, 2018
@icemac icemac added this to In progress in Zope 4 final release via automation Sep 20, 2018
@icemac
Copy link
Member

icemac commented Sep 20, 2018

At least an change log entry would be nice.

@pbauer
Copy link
Member Author

pbauer commented Sep 23, 2018

I added a changenote. Sorry, there is no issue to reference. One of the many failing test is testAllObjectsHaveOrder in CMFPlone:

Traceback (most recent call last):
  File "/srv/python3.6/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/srv/python3.6/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/jenkins/workspace/plip-py3/src/Products.CMFPlone/Products/CMFPlone/tests/testCatalogTool.py", line 854, in testAllObjectsHaveOrder
    sorted_objs = self.catalog(sort_on='getObjPositionInParent')
  File "/home/jenkins/workspace/plip-py3/src/Products.CMFPlone/Products/CMFPlone/CatalogTool.py", line 469, in searchResults
    return ZCatalog.searchResults(self, query, **kw)
  File "/home/jenkins/workspace/plip-py3/src/Products.ZCatalog/src/Products/ZCatalog/ZCatalog.py", line 612, in searchResults
    return self._catalog.searchResults(query, **kw)
  File "/home/jenkins/workspace/plip-py3/src/Products.ZCatalog/src/Products/ZCatalog/Catalog.py", line 1088, in searchResults
    return self.search(query, sort_indexes, reverse, sort_limit, _merge)
  File "/home/jenkins/workspace/plip-py3/src/Products.ZCatalog/src/Products/ZCatalog/Catalog.py", line 704, in search
    actual_result_count=rlen, b_start=b_start, b_size=b_size)
  File "/home/jenkins/workspace/plip-py3/src/Products.ZCatalog/src/Products/ZCatalog/Catalog.py", line 1008, in sortResults
    second_indexes_key_map)
  File "/home/jenkins/workspace/plip-py3/src/Products.ZCatalog/src/Products/ZCatalog/Catalog.py", line 794, in _sort_iterate_resultset
    result.sort(reverse=reverse)
TypeError: '<' not supported between instances of 'NoneType' and 'int'

See https://jenkins.plone.org/view/PLIPs/job/plip-py3/766/consoleText for more failing tests.

Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Zope 4 final release automation moved this from In progress to Reviewer approved Sep 24, 2018
@pbauer pbauer merged commit ec78801 into master Sep 24, 2018
Zope 4 final release automation moved this from Reviewer approved to Done Sep 24, 2018
@icemac icemac deleted the fix_sort_iterate_resultset branch September 25, 2018 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants