Bug 2215554 - ImportError: cannot import name 'match_hostname' from 'ssl' (/usr/lib64/python3.12/ssl.py)
Summary: ImportError: cannot import name 'match_hostname' from 'ssl' (/usr/lib64/pytho...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-gevent
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-16 13:57 UTC by Orion Poplawski
Modified: 2023-08-16 08:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2023-06-16 13:57:19 UTC
While building python-x2go with Python 3.12:

+ make -C docs SPHINXBUILD=/usr/bin/sphinx-build-3 html
make: Entering directory '/builddir/build/BUILD/python-x2go-0.6.1.3/docs'
/usr/bin/sphinx-build-3 -b html -d build/doctrees   source build/html
Running Sphinx v6.1.3
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/sphinx/config.py", line 351, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-x2go-0.6.1.3/docs/source/conf.py", line 22, in <module>
    import x2go
  File "/builddir/build/BUILD/python-x2go-0.6.1.3/x2go/__init__.py", line 42, in <module>
    monkey.patch_all()
  File "/usr/lib64/python3.12/site-packages/gevent/monkey.py", line 1279, in patch_all
    patch_ssl(_warnings=_warnings, _first_time=first_time)
  File "/usr/lib64/python3.12/site-packages/gevent/monkey.py", line 200, in ignores
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gevent/monkey.py", line 1044, in patch_ssl
    gevent_mod, _ = _patch_module('ssl', _warnings=_warnings)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gevent/monkey.py", line 462, in _patch_module
    gevent_module, target_module, target_module_name = _check_availability(name)
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gevent/monkey.py", line 448, in _check_availability
    gevent_module = getattr(__import__('gevent.' + name), name)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gevent/ssl.py", line 32, in <module>
    from gevent import _ssl3 as _source # pragma: no cover
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gevent/_ssl3.py", line 53, in <module>
    from ssl import match_hostname
ImportError: cannot import name 'match_hostname' from 'ssl' (/usr/lib64/python3.12/ssl.py)
make: Leaving directory '/builddir/build/BUILD/python-x2go-0.6.1.3/docs'
make: *** [Makefile:53: html] Error 2

match_hostname was deprecated in 3.7 and looks like it was finally removed.

Reproducible: Always

Comment 1 Fedora Release Engineering 2023-08-16 08:11:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.