Skip to content

[17.0][FIX] auto_backup: pin paramiko for compatibility with pysftp - #3345

Merged
OCA-git-bot merged 2 commits into
OCA:17.0from
StefanRijnhart:17.0-auto_backup-pin_paramiko
Aug 19, 2025
Merged

OCA-git-bot merged 2 commits into
OCA:17.0from
StefanRijnhart:17.0-auto_backup-pin_paramiko

Conversation

@StefanRijnhart

@StefanRijnhart StefanRijnhart commented Aug 12, 2025

Copy link
Copy Markdown
Member

Port of #3343

paramiko 4.0.0 dropped support for DSSKey imported by pysftp. See paramiko/paramiko#2537

File "/home/odoo/odoo/18.0/server-tools/auto_backup/tests/test_db_backup.py", line 9, in <module>
    import pysftp
  File "/home/odoo/.cache/pypoetry/virtualenvs/18-0-liVCuCj7-py3.12/lib/python3.12/site-packages/pysftp/__init__.py", line 14, in <module>
    from paramiko import AgentKey, RSAKey, DSSKey
ImportError: cannot import name 'DSSKey' from 'paramiko'

The import error was dropped silently, making the error show up as

File "/home/odoo/odoo/18.0/server-tools/auto_backup/tests/test_db_backup.py", line 28, in <module>
    class TestConnectionException(pysftp.ConnectionException):
                                  ^^^^^^
NameError: name 'pysftp' is not defined

Also: prevent infinite loop of makepot commits

Don't run makepot using both Odoo and OCB. This is redundant, but also, because
of changes between both versions, the POTs may have trivial differences. The
commit of a makepot run will again trigger CI to run makepot with both versions,
leading to an infinite loop of competing commits trying to revert each other's
trivial differences.

In the current case, the sms module is set to auto_install in Odoo but not in
OCB. This causes the field message_has_sms_error from sms' mail.thread override
to show up in the Odoo generated POT files, but not in the OCB ones.

@StefanRijnhart StefanRijnhart added this to the 17.0 milestone Aug 12, 2025
@StefanRijnhart
StefanRijnhart force-pushed the 17.0-auto_backup-pin_paramiko branch from 100ee68 to 8451bb7 Compare August 12, 2025 09:02
paramiko 4.0.0 dropped support for DSSKey imported by pysftp. See paramiko/paramiko#2537

```
File "/home/odoo/odoo/18.0/server-tools/auto_backup/tests/test_db_backup.py", line 9, in <module>
    import pysftp
  File "/home/odoo/.cache/pypoetry/virtualenvs/18-0-liVCuCj7-py3.12/lib/python3.12/site-packages/pysftp/__init__.py", line 14, in <module>
    from paramiko import AgentKey, RSAKey, DSSKey
ImportError: cannot import name 'DSSKey' from 'paramiko'
```

The import error was dropped silently, making the error show up as

```
File "/home/odoo/odoo/18.0/server-tools/auto_backup/tests/test_db_backup.py", line 28, in <module>
    class TestConnectionException(pysftp.ConnectionException):
                                  ^^^^^^
NameError: name 'pysftp' is not defined
```
@StefanRijnhart
StefanRijnhart force-pushed the 17.0-auto_backup-pin_paramiko branch from 8451bb7 to 549db84 Compare August 12, 2025 09:31

@ByteMeAsap ByteMeAsap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-3345-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Aug 18, 2025
Signed-off-by pedrobaeza
@OCA-git-bot

Copy link
Copy Markdown
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-3345-by-pedrobaeza-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@pedrobaeza Now, that issue was fixed by me in #3254

Don't run makepot using both Odoo and OCB. This is redundant, but also, because
of changes between both versions, the POTs may have trivial differences. The
commit of a makepot run will again trigger CI to run makepot with both versions,
leading to an infinite loop of competing commits trying to revert each other's
trivial differences.

In the current case, the sms module is set to auto_install in Odoo but not in
OCB. This causes the field `message_has_sms_error` from sms' mail.thread override
to show up in the Odoo generated POT files, but not in the OCB ones.
@dreispt

dreispt commented Aug 19, 2025

Copy link
Copy Markdown
Member

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-3345-by-dreispt-bump-minor, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 4fec7f6 into OCA:17.0 Aug 19, 2025
9 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 60ede15. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants