Bug 2414808 - import aexpect crashes with: No module named 'pipes' (pipes removed from python3.13+)
Summary: import aexpect crashes with: No module named 'pipes' (pipes removed from pyth...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-aexpect
Version: 43
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Cleber Rosa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-13 11:56 UTC by Henryk Paluch (Work)
Modified: 2025-11-13 13:24 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Henryk Paluch (Work) 2025-11-13 11:56:38 UTC
python3-aexpect package is unusable, because it depends on 'pipes' python module that was removed from python 3.13+ (Fedora 43 uses python 3.14).


Detailed versions:

$ cat /etc/fedora-release 

Fedora release 43 (Forty Three)

$ rpm -q python3 python3-aexpect

python3-3.14.0-2.fc43.x86_64
python3-aexpect-1.6.2-18.fc43.noarch

This breaks dependent packages (any command from python3-avocado-plugins-vt)



Reproducible: Always

Steps to Reproduce:
1. sudo dnf install python3-aexpect
2. python -c 'import aexpect'

Actual Results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import aexpect
  File "/usr/lib/python3.14/site-packages/aexpect/__init__.py", line 35, in <module>
    from . import remote
  File "/usr/lib/python3.14/site-packages/aexpect/remote.py", line 50, in <module>
    import pipes
ModuleNotFoundError: No module named 'pipes'



Expected Results:
No error on output

Additional Information:
There are similar projects hit by same issue, for example: https://github.com/jupyter/nbclassic/pull/286/files or official https://peps.python.org/pep-0594/#pipes

Possible resolution is to replace "pipes" with "shlex" as shown on https://github.com/jupyter/nbclassic/pull/286/files

Comment 1 Henryk Paluch (Work) 2025-11-13 12:16:16 UTC
Crude workaround:

$ sudo sed -i.bak -e 's/pipes/shlex/' /usr/lib/python3.14/site-packages/aexpect/remote.py

With that command:

$ python -c 'import aexpect'

finishes properly (no error, no output).

Comment 2 Henryk Paluch (Work) 2025-11-13 12:58:09 UTC
There is even PR https://github.com/avocado-framework/aexpect/pull/128 but for some unknown reason it is not in Fedora package (yes, aexpect belongs to Avocado VT, but is provided by base "fedora" repository - so bugzilla is right place for report):

Detailed broken package info:

$ dnf info python3-aexpect
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : python3-aexpect
Epoch           : 0
Version         : 1.6.2
Release         : 18.fc43
Architecture    : noarch
Installed size  : 510.9 KiB
Source          : python-aexpect-1.6.2-18.fc43.src.rpm
From repository : fedora
Summary         : A python library to control interactive applications
URL             : https://github.com/avocado-framework/aexpect
License         : GPL-2.0-or-later
Description     : Aexpect is a python library used to control interactive applications, very
                : similar to pexpect. You can use it to control applications such as ssh, scp
                : sftp, telnet, among others.
Vendor          : Fedora Project

Comment 3 Henryk Paluch (Work) 2025-11-13 13:24:35 UTC
Upstream fixed it in Version 1.8.0 as published on: https://github.com/avocado-framework/aexpect/releases/tag/1.8.0

What's Changed

...
    Drop the use of pipes by @luckyh in #128
...

Rebuilding package for 1.8.0 (tagged on Jul 30, 2025) instead of existing 1.6.2 (tagged on Jun 2, 2021) should fix this bug.


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