core icon indicating copy to clipboard operation
core copied to clipboard

Add AEAP to python bindings

Open missytake opened this issue 3 years ago • 3 comments

  • Operating System (Linux/Mac/Windows/iOS/Android): xubuntu 20.04
  • Delta Chat Version: python bindings 1.92.0 (from pypi.org)
  • Expected behavior: when I run account.set_config("addr", new_address), it's supposed to reconfigure the account with the new address according to https://github.com/deltachat/deltachat-core-rust/blob/master/draft/aeap-mvp.md?plain=1#L16.
  • Actual behavior: it raises a ValueError: "can not change 'addr' after account is configured."
  • Steps to reproduce the problem:
    • create an account object
    • configure it successfully with test account no. 1
    • try to configure it with test account no. 2
  • Logs:
Traceback (most recent call last):
  File "/usr/bin/mailadm", line 8, in <module>
    sys.exit(mailadm_main())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/mailadm/cmdline.py", line 87, in setup_bot
    ac.set_config("addr", email)
  File "/usr/lib/python3.9/site-packages/deltachat/account.py", line 173, in set_config
    raise ValueError("can not change 'addr' after account is configured.")
ValueError: can not change 'addr' after account is configured.

missytake avatar Jul 30 '22 17:07 missytake

What is this check for actually? Maybe we can take it out now? https://github.com/deltachat/deltachat-core-rust/blob/master/python/src/deltachat/account.py#L714

missytake avatar Jul 30 '22 17:07 missytake

yes, we can probably take it out.

On Sat, Jul 30, 2022 at 10:59 -0700, missytake wrote:

What is this check for actually? Maybe we can take it out now? https://github.com/deltachat/deltachat-core-rust/blob/master/python/src/deltachat/account.py#L714

-- Reply to this email directly or view it on GitHub: https://github.com/deltachat/deltachat-core-rust/issues/3529#issuecomment-1200266394 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

hpk42 avatar Aug 01 '22 16:08 hpk42

yes, we can probably take it out.

great, I replaced it with a deprecation warning for now. If we just remove the parameter, too many implementations would break I guess <.<

missytake avatar Aug 03 '22 07:08 missytake