aioimaplib icon indicating copy to clipboard operation
aioimaplib copied to clipboard

implement await/async, search, sort, thread, list-status, esearch, esort

Open filiphanes opened this issue 4 years ago • 13 comments

  • fix FetchCommand.wait_data()
  • don't request capability when server sends it
  • support multiple untagged response types for LIST-STATUS and FETCH VANISHED
  • add response parsers
  • update README.rst

I have tested it only against Dovecot 2.4.devel

Fixes #47 Fixes #51 Fixes #45 Fixes #6

filiphanes avatar Jul 24 '20 17:07 filiphanes

Is there any update on this? I'm getting

    with (yield from self.state_condition):
TypeError: 'Condition' object is not iterable

unless I change all references to self.state_condition to use the async/await keywords.

I didn't try too hard to debug, since this PR should fix it.

hudcap avatar Nov 10 '20 18:11 hudcap

Is there any plan on implementing this ?

TheBlusky avatar Mar 31 '21 19:03 TheBlusky

Thank you for your feedbacks, addings and thoughts.

But I'm sorry, I cannot merge this PR :

  • tests are broken (and not one but a lot I'm not even sure that the library is still working properly)
  • there are duplicated code (like quoted/unquoted)
  • commented code
  • constants removed
  • and untested code

bamthomas avatar Apr 09 '21 16:04 bamthomas

Just letting people know that I'm also getting a similar error which I believe to be related:

File ".../env/lib/python3.9/site-packages/aioimaplib/aioimaplib.py", line 618, in wait
    with (yield from self.state_condition):
TypeError: 'Condition' object is not iterable

Lithimlin avatar Apr 09 '21 18:04 Lithimlin

But I'm sorry, I cannot merge this PR : [...] * there are duplicated code (like quoted/unquoted) * commented code * constants removed

Not sure what you mean by this. When I'm looking through the diff of the PR, I see no such things and while one constant's name has been removed, it was the CR constant which was only used once in the code.

Otherwise, this PR look pretty solid

Lithimlin avatar Apr 09 '21 19:04 Lithimlin

@bamthomas is right,

  • tests are broken, because I have tested it only against Dovecot server from my other project https://github.com/filiphanes/jmap-proxy-python/ which is using all of new code
  • where do you see duplicated code in quoted/unquoted?
  • I will remove commented code
  • constant CRLF replaced in 2 places to avoid resolving global variable and IMHO b'\r\n' is better readable and obvious
  • IMAP4_PORT and IMAP4_SSL_PORT were used only for default argument values, which again is more obvious to put plain values there, but I can revert it, if @bamthomas want
  • yes, tests should be fixed

filiphanes avatar Apr 09 '21 20:04 filiphanes

what I mean @Lithimlin is pretty clear, there is no opinion or whatever here, only facts :

  • tests are broken : look above : do you see one commit with a valid green tick ? no
  • quoted/unquoted methods are duplicated functions with only a small diff before it wasn't the case
  • there is commented code because it was annoying
  • even if there was only one instance of CRLR it was more clear than \r\n and showed intention why remove this ?
  • and all the bunch of utility functions (that are I am sure are useful) but code without tests are debt (Michael Feathers)

so when all of this will be fixed then I could eventually merge.

bamthomas avatar Apr 09 '21 21:04 bamthomas

Sorry if there was a misunderstanding. I never questioned the tests failing, only the points I quoted. The tests are obviously failing.

I still don't see any duplicated or commented-out code. Or do you mean documentation comments in the code?It seems @filiphanes is also confused about this part, and I also agree with them regarding the CRLF constant.

Lithimlin avatar Apr 09 '21 21:04 Lithimlin

I pulled the branch and yes the tests are green. But I can't merge this. I'm sorry, even if I think that there may be value in it. there are too much mixed things and added functionalities without any tests.

So for now I'm blocked with this PR. I can propose you to have a jitsi meeting to talk about this if you want. You can come with @Lithimlin if you want, and I can also join @pblayo that is the second committer on the lib. What do you think ?

bamthomas avatar Apr 10 '21 12:04 bamthomas

Since I have no real connection to either of you and am just eagerly waiting for an update on this not functional library I'd rather stay out of the discussion, though I appreciatethe invitation. I only looked over the PR since I wanted to see what was changed. I find the changes personally to look very good and be codedina good way,however, I have not yet had the opportunity to test any of the changes.

Lithimlin avatar Apr 10 '21 13:04 Lithimlin

@bamthomas ok, I understand, I am willing to work on it, and would appreciate some help with tests

Meeting would be great, I would like to discuss these updates, you can send me email.

filiphanes avatar Apr 10 '21 13:04 filiphanes

see the #59 is what we would expect.

bamthomas avatar Apr 10 '21 13:04 bamthomas

@filiphanes I tried the form on your website but it says that the mail server is unreachable. You can send me an email to bruno on the domain barreverte.fr

bamthomas avatar Apr 15 '21 08:04 bamthomas