9

CryptographyDeprecationWarning:

encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Rajesh s
  • 175
  • 1
  • 8

2 Answers2

17

This has been fixed in Paramiko 2.5.0 already:
https://www.paramiko.org/changelog.html#2.5.0
https://github.com/paramiko/paramiko/pull/1379
https://github.com/paramiko/paramiko/issues/1369

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • 1
    So ```pip3 install --upgrade paramiko``` [is the actionable fix path](https://stackoverflow.com/a/58347960/605356), right? – Johnny Utahh Oct 11 '19 at 20:21
  • For Debian Buster, there is an updated package in backports: https://packages.debian.org/buster-backports/python-paramiko – Andy Beverley Mar 23 '20 at 09:57
8

I've had better success with:

import warnings
warnings.simplefilter("ignore", cryptography.utils.CryptographyDeprecationWarning)
ypnos
  • 50,202
  • 14
  • 95
  • 141
user9499243
  • 111
  • 3
  • 1
    If you have `DeprecatedIn23` then you must have `cryptography<=2.4.2`, because the symbol is renamed to `DeprecatedIn25` since version 2.5. But if you have version 2.4.2, you shouldn't have the problem anyway, according ot @Martin Prikryl. I would suggest saying `cryptography.utils.CryptographyDeprecationWarning`. That works in all versions. Thanks for the hint anyway. – Adrian W Mar 08 '19 at 21:33
  • 1
    Using cryptography.utils.CryptographyDeprecationWarning us certainly better. Thank you, Adrian. – user9499243 Mar 10 '19 at 02:26