D3955: mail: modernize check for Python-with-TLS

2018-08-09 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG569d662816de: mail: modernize check for Python-with-TLS (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3955?vs=10195=10247

D3955: mail: modernize check for Python-with-TLS

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I think this utility function should live in `sslutil.py`. INLINE COMMENTS > mail.py:85-92 > +def _pyhastls(): > +"""Returns true iff Python has TLS support, false otherwise.""" >

D3955: mail: modernize check for Python-with-TLS

2018-08-09 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 10195. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3955?vs=10191=10195 REVISION DETAIL https://phab.mercurial-scm.org/D3955 AFFECTED FILES mercurial/mail.py CHANGE DETAILS diff --git a/mercurial/mail.py

D3955: mail: modernize check for Python-with-TLS

2018-08-09 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 10191. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3955?vs=9611=10191 REVISION DETAIL https://phab.mercurial-scm.org/D3955 AFFECTED FILES mercurial/mail.py CHANGE DETAILS diff --git a/mercurial/mail.py

D3955: mail: modernize check for Python-with-TLS

2018-07-18 Thread yuja (Yuya Nishihara)
yuja added a comment. > > Maybe we can simply remove the check since we've dropped support for > > Python 2.5. > > No, we're looking to see if the ssl module is importable - if it's not, that means Python was compiled without TLS support (which is an option, even on 3.x

Re: D3955: mail: modernize check for Python-with-TLS

2018-07-18 Thread Yuya Nishihara
> > Maybe we can simply remove the check since we've dropped support for > > Python 2.5. > > No, we're looking to see if the ssl module is importable - if it's not, > that means Python was compiled without TLS support (which is an option, even > on 3.x and 2.7). I'm just sniffing

D3955: mail: modernize check for Python-with-TLS

2018-07-17 Thread durin42 (Augie Fackler)
durin42 added a comment. > Maybe we can simply remove the check since we've dropped support for > Python 2.5. No, we're looking to see if the ssl module is importable - if it's not, that means Python was compiled without TLS support (which is an option, even on 3.x and 2.7). I'm

Re: D3955: mail: modernize check for Python-with-TLS

2018-07-17 Thread Yuya Nishihara
> +def _pyhastls(): > +"""Returns true iff Python has TLS support, false otherwise.""" > +try: > +import ssl > +getattr(ssl, 'HAS_TLS', False) > +return True > +except ImportError: > +return False Maybe we can simply remove the check since we've dropped

D3955: mail: modernize check for Python-with-TLS

2018-07-17 Thread yuja (Yuya Nishihara)
yuja added a comment. > +def _pyhastls(): > +"""Returns true iff Python has TLS support, false otherwise.""" > +try: > +import ssl > +getattr(ssl, 'HAS_TLS', False) > +return True > +except ImportError: > +return False Maybe

D3955: mail: modernize check for Python-with-TLS

2018-07-16 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We used to be going indirectly through the socket module, but now we just check for the ssl module. REPOSITORY rHG Mercurial REVISION DETAIL