Opened 4 years ago

Closed 4 years ago

#23540 closed defect (duplicate)

twisted warnings when pyopenssl installed

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by vdelecroix)

pyopenssl introduced a deprecation in their latest release 17.2.0 (released on 25th of July), see #658. As a consequence, when this version is installed is Sagemath, Twisted produces warnings. These warnings appear in various places, in particular when we quit the console

sage: quit
Exiting Sage (...)
/opt/sage/local/lib/python2.7/site-packages/twisted/protocols/tls.py:41: DeprecationWarning: OpenSSL.rand is deprecated - you should use os.urandom instead
  from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named service_identity'.  Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied.  Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification.  Many valid certificate/hostname mappings may be rejected.

After installing service_identity as adviced it gets a little bit better

]$ sage -q
sage: quit
Exiting Sage (...)
/opt/sage/local/lib/python2.7/site-packages/twisted/protocols/tls.py:41: DeprecationWarning: OpenSSL.rand is deprecated - you should use os.urandom instead
  from OpenSSL.SSL import Error, ZeroReturnError, WantReadError

Change History (6)

comment:1 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:2 Changed 4 years ago by dimpase

the latest release of twisted still has this from OpenSSL.SSL ..., so I don't know what to do here, except suppressing the warning somehow.

comment:3 Changed 4 years ago by vdelecroix

Note that the deprecation on pyopenssl side is recent #658. And their release from 5 days ago!

Last edited 4 years ago by vdelecroix (previous) (diff)

comment:4 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:5 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:6 Changed 4 years ago by jdemeyer

  • Milestone changed from sage-8.1 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #22581.

Note: See TracTickets for help on using tickets.