certbot fails after python update to python311

Hi,
certbot fails since yesterdays update to python311:
Code:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 5, in <module>
    from certbot.main import main
  File "/usr/local/lib/python3.11/site-packages/certbot/main.py", line 6, in <module>
    from certbot._internal import main as internal_main
  File "/usr/local/lib/python3.11/site-packages/certbot/_internal/main.py", line 20, in <module>
    import josepy as jose
  File "/usr/local/lib/python3.11/site-packages/josepy/__init__.py", line 41, in <module>
    from josepy.json_util import (
  File "/usr/local/lib/python3.11/site-packages/josepy/json_util.py", line 25, in <module>
    from OpenSSL import crypto
  File "/usr/local/lib/python3.11/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import SSL, crypto
  File "/usr/local/lib/python3.11/site-packages/OpenSSL/SSL.py", line 42, in <module>
    from OpenSSL.crypto import (
  File "/usr/local/lib/python3.11/site-packages/OpenSSL/crypto.py", line 26, in <module>
    from typing_extensions import deprecated
ModuleNotFoundError: No module named 'typing_extensions'
Why that?
What does fix this?
 
Last edited by a moderator:
Did you do "pkg update/upgrade" to make sure all python-related packages have been brought up to the current 3.11 level? Could it be that you installed some packages using pip instead of pkg, and those haven't been updated?

I've been running 3.11 for a while now (many months, it seems to have showed up 20240715 for me), and certbot worked just fine for me two weeks ago. I'm on 13.4-RELEASE-p3 with Python 3.11.11, certbot 3.0.1, and py311-openssl-24.1.0,1 (which owns the offending file crypto.py in the last line of your traceback).
 
Yes, I did pkg upgrade. Everything is current.
I did not do any pips.
I'm on FreeBSD 13.5-RELEASE-p1 with Python 3.11.12, certbot 3.2.0,1 and py311-openssl-25.0.0,1
 
Just ran pkg upgrade a moment ago; I'm still on 13.4-RELEASE-p3 (kernel) and -p5 (userland), but that doesn't matter for packages. Strangely, I get different versions:
python 3.11.11
certbot 3.1.0,1 (identifies itself as 3.1.0 when called with --version)
py311-openssl-24.1.0_1,1

And certbot works fine for me. Perhaps because I use different options? I do DNS server validation.
 
Back
Top