https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272418

            Bug ID: 272418
           Summary: devel/mercurial does not support OpenSSL 3.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: c...@freebsd.org
             Flags: maintainer-feedback?(python@FreeBSD.org)
          Assignee: python@FreeBSD.org

I don't have a solution for this except to bring this to the attention of our
upstream at mercurial-scm.org. hg fails with the following error on 14-CURRENT.

cwsys$ hg pull
pulling from https://anonhg.NetBSD.org/pkgsrc
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 3.9.17 (main, Jun 13 2023, 13:43:30) [Clang 15.0.7
(https://github.com/llvm/llvm-project.git llvmorg-15.0.7-0-g8dfdc
** Mercurial Distributed SCM (version 6.5)
** Extensions loaded: 
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 59, in <module>
    dispatch.run()
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
143, in run
    status = dispatch(req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
232, in dispatch
    status = _rundispatch(req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
276, in _rundispatch
    ret = _runcatch(req) or 0
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
457, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
467, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/local/lib/python3.9/site-packages/mercurial/scmutil.py", line 153,
in callcatch
    return func()
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
447, in _runcatchfunc
    return _dispatch(req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
1272, in _dispatch
    return runcommand(
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
905, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
1284, in _runcommand
    return cmdfunc()
  File "/usr/local/lib/python3.9/site-packages/mercurial/dispatch.py", line
1270, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/local/lib/python3.9/site-packages/mercurial/util.py", line 1881,
in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/mercurial/commands.py", line
5471, in pull
    other = hg.peer(repo, opts, path, remotehidden=opts[b'remote_hidden'])
  File "/usr/local/lib/python3.9/site-packages/mercurial/hg.py", line 265, in
peer
    peer = cls.make_peer(
  File "/usr/local/lib/python3.9/site-packages/mercurial/httppeer.py", line
661, in make_peer
    inst = _make_peer(ui, path, remotehidden=remotehidden)
  File "/usr/local/lib/python3.9/site-packages/mercurial/httppeer.py", line
637, in _make_peer
    respurl, info = performhandshake(ui, url, opener, requestbuilder)
  File "/usr/local/lib/python3.9/site-packages/mercurial/httppeer.py", line
575, in performhandshake
    resp = sendrequest(ui, opener, req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/httppeer.py", line
288, in sendrequest
    res = opener.open(req)
  File "/usr/local/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.9/site-packages/mercurial/url.py", line 371, in
https_open
    return self.do_open(self._makeconnection, req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/keepalive.py", line
244, in do_open
    self._start_transaction(h, req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/url.py", line 357, in
_start_transaction
    return keepalive.KeepAliveHandler._start_transaction(self, h, req)
  File "/usr/local/lib/python3.9/site-packages/mercurial/keepalive.py", line
361, in _start_transaction
    h.endheaders()
  File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.9/site-packages/mercurial/url.py", line 188, in
_sendfile
    orgsend(self, data)
  File "/usr/local/lib/python3.9/site-packages/mercurial/keepalive.py", line
636, in safesend
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/mercurial/url.py", line 339, in
connect
    self.sock = sslutil.wrapsocket(
  File "/usr/local/lib/python3.9/site-packages/mercurial/sslutil.py", line 305,
in wrapsocket
    settings = _hostsettings(ui, serverhostname)
  File "/usr/local/lib/python3.9/site-packages/mercurial/sslutil.py", line 105,
in _hostsettings
    assert supportedprotocols - {b'tls1.0'}
AssertionError
cwsys$ 

tls 1.0 is not supported by OpenSSL 3.0. Don't waste your time fiddling with
this line, the next line or anything else in sslutil.py. It will lead you down
a rabbit hole. It's best to bring this to the attention of our upstream.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to