Opened 8 years ago

Closed 8 years ago

#4178 release blocker: regression closed fixed (fixed)

Function singleSearchStep was renamed to _singleSearchStep not everywhere

Reported by: natta Owned by:
Priority: high Milestone: Twisted-10.0
Component: mail Keywords: mail imap4
Cc: Jean-Paul Calderone Branch: branches/imap-search-fixes-4178
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun, itamar

Description

Function singleSearchStep was renamed to _singleSearchStep and one parameter added, but in search_OR and search_NOT fucntions there is still old version function invocation (i.e. without "_") So every search query that contains OR or NOT keywords raises errors.

Attachments (1)

imap4.patch (454 bytes) - added by natta 8 years ago.
Patch that replaces singleSearchStep with _singleSearchStep in search_(NOT|OR)

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by natta

Attachment: imap4.patch added

Patch that replaces singleSearchStep with _singleSearchStep in search_(NOT|OR)

comment:1 Changed 8 years ago by natta

Owner: changed from Jean-Paul Calderone to natta
Status: newassigned

comment:2 Changed 8 years ago by natta

Owner: changed from natta to Jean-Paul Calderone
Status: assignednew

I can not commit changes, so i reassign it back

comment:3 Changed 8 years ago by Jean-Paul Calderone

Type: defectregression

Regression introduced by #1977.

comment:4 Changed 8 years ago by Jean-Paul Calderone

Cc: Jean-Paul Calderone added
Owner: changed from Jean-Paul Calderone to natta

Thanks for the patch, natta. Can you supply one which also includes unit tests for this fix? twisted.mail.test.test_imap.DefaultSearchTestCase may be a good case to extend.

comment:5 in reply to:  4 Changed 8 years ago by natta

Replying to exarkun:

Thanks for the patch, natta. Can you supply one which also includes unit tests for this fix? twisted.mail.test.test_imap.DefaultSearchTestCase may be a good case to extend.

OK. As so I am not a very experienced developer, but I'll try.

comment:6 Changed 8 years ago by Jean-Paul Calderone

Milestone: Twisted-10.0

comment:7 Changed 8 years ago by Jean-Paul Calderone

Author: nattaexarkun, natta
Branch: branches/imap-search-fixes-4178

(In [28242]) Branching to 'imap-search-fixes-4178'

comment:8 Changed 8 years ago by Jean-Paul Calderone

Author: exarkun, nattaexarkun, itamar
Keywords: review added
Owner: natta deleted

Fixed and tested, please review.

comment:9 Changed 8 years ago by therve

Keywords: imap4 added; imap4.py do_SEARCH review removed
Owner: set to Jean-Paul Calderone

So I would prefer another way to check if the lastSequenceId parameter is required. Something like that:

_requiresLastSequenceId = set(["NOT", "OR"])

if c in self._requiresLastSequenceId:
     result = f(query, id, msg, lastSequenceId)
else:
     result = f(query, id, msg)

The tests need to fit in 80 colums, too.

Please merge after that.

comment:10 Changed 8 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [28281]) Merge imap-search-fixes-4178

Author: exarkun, itamar Reviewer: therve Fixes: #4178

Fix the regression in search OR and NOT support in the IMAP4 server's fallback search support.

comment:11 Changed 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.