Ticket #4178 regression closed fixed

Opened 3 years ago

Last modified 3 years ago

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: exarkun Branch: branches/imap-search-fixes-4178
Author: exarkun, itamar Launchpad Bug:

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

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

Change History

Changed 3 years ago by natta

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

1

  Changed 3 years ago by natta

  • status changed from new to assigned
  • owner changed from exarkun to natta

2

  Changed 3 years ago by natta

  • owner changed from natta to exarkun
  • status changed from assigned to new

I can not commit changes, so i reassign it back

3

  Changed 3 years ago by exarkun

  • type changed from defect to regression

Regression introduced by #1977.

4

follow-up: ↓ 5   Changed 3 years ago by exarkun

  • cc exarkun added
  • owner changed from exarkun 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.

5

in reply to: ↑ 4   Changed 3 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.

6

  Changed 3 years ago by exarkun

  • milestone set to Twisted-10.0

7

  Changed 3 years ago by exarkun

  • branch set to branches/imap-search-fixes-4178
  • branch_author changed from natta to exarkun, natta

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

8

  Changed 3 years ago by exarkun

  • owner natta deleted
  • keywords do_SEARCH, review added; do_SEARCH removed
  • branch_author changed from exarkun, natta to exarkun, itamar

Fixed and tested, please review.

9

  Changed 3 years ago by therve

  • owner set to exarkun
  • keywords mail imap4 added; mail, imap4.py, do_SEARCH, review removed

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.

10

  Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(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.

11

  Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.