Bug 2328005 - python-pyftpdlib fails to build with Python 3.14: TypeError: cannot pickle 'select.epoll' object
Summary: python-pyftpdlib fails to build with Python 3.14: TypeError: cannot pickle 's...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyftpdlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-22 10:58 UTC by Karolina Surma
Modified: 2024-11-25 16:26 UTC (History)
4 users (show)

Fixed In Version: python-pyftpdlib-2.0.0-3.fc42
Clone Of:
Environment:
Last Closed: 2024-11-25 16:26:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-pyftpdlib pull-request 3 0 None None None 2024-11-25 10:04:28 UTC
Github giampaolo pyftpdlib pull 656 0 None open Avoid the multiprocessing forkserver method 2024-11-22 15:56:41 UTC

Description Karolina Surma 2024-11-22 10:58:58 UTC
python-pyftpdlib fails to build with Python 3.14.0a2.

_________________ TestCornerCasesMProcMixin.test_quick_connect _________________
[gw0] linux -- Python 3.14.0 /usr/bin/python3

self = <pyftpdlib.test.test_servers.TestCornerCasesMProcMixin testMethod=test_quick_connect>

    def setUp(self):
        super().setUp()
        self.server = self.server_class()
        self.server.start()
        self.client = self.client_class(timeout=GLOBAL_TIMEOUT)
        self.client.connect(self.server.host, self.server.port)
>       self.client.login(USER, PASSWD)

pyftpdlib/test/test_functional.py:2400: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.14/ftplib.py:412: in login
    resp = self.sendcmd('USER ' + user)
/usr/lib64/python3.14/ftplib.py:281: in sendcmd
    return self.getresp()
/usr/lib64/python3.14/ftplib.py:244: in getresp
    resp = self.getmultiline()
/usr/lib64/python3.14/ftplib.py:230: in getmultiline
    line = self.getline()
/usr/lib64/python3.14/ftplib.py:212: in getline
    line = self.file.readline(self.maxline + 1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <socket.SocketIO object at 0x7f928276ca60>
b = <memory at 0x7f92809d1780>

    def readinto(self, b):
        """Read up to len(b) bytes into the writable buffer *b* and return
        the number of bytes read.  If the socket is non-blocking and no bytes
        are available, None is returned.
    
        If *b* is non-empty, a 0 return value indicates that the connection
        was shutdown at the other end.
        """
        self._checkClosed()
        self._checkReadable()
        if self._timeout_occurred:
            raise OSError("cannot read from timed out object")
        try:
>           return self._sock.recv_into(b)
E           TimeoutError: timed out

/usr/lib64/python3.14/socket.py:725: TimeoutError
------------------------------ Captured log call -------------------------------
ERROR    pyftpdlib:servers.py:319 Traceback (most recent call last):
  File "/usr/lib/python3.14/site-packages/asyncore/asyncore.py", line 83, in read
    obj.handle_read_event()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/asyncore/asyncore.py", line 414, in handle_read_event
    self.handle_accept()
    ~~~~~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-pyftpdlib-2.0.0-build/pyftpdlib-release-2.0.0/pyftpdlib/ioloop.py", line 1106, in handle_accept
    self.handle_accepted(sock, addr)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-pyftpdlib-2.0.0-build/pyftpdlib-release-2.0.0/pyftpdlib/servers.py", line 478, in handle_accepted
    t.start()
    ~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
                  ~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/context.py", line 300, in _Popen
    return Popen(process_obj)
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
    super().__init__(process_obj)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
    self._launch(process_obj)
    ~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 47, in _launch
    reduction.dump(process_obj, buf)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: cannot pickle 'select.epoll' object
when serializing dict item '_poller'
when serializing pyftpdlib.ioloop.Epoll state
when serializing pyftpdlib.ioloop.Epoll object
when serializing dict item 'ioloop'
when serializing pyftpdlib.servers.MultiprocessFTPServer state
when serializing pyftpdlib.servers.MultiprocessFTPServer object
when serializing tuple item 0
when serializing method reconstructor arguments
when serializing method object
when serializing dict item '_target'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08300798-python-pyftpdlib/

For all our attempts to build python-pyftpdlib with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-pyftpdlib/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2024-11-22 15:56:41 UTC
Upstream PR: https://github.com/giampaolo/pyftpdlib/pull/656

I've built this in the Python 3.14 Copr. Will await some feedback and propose a downstream backport later.

Comment 2 Miro Hrončok 2024-11-25 10:04:28 UTC
Fedora PR: https://src.fedoraproject.org/rpms/python-pyftpdlib/pull-request/3

Comment 3 Fedora Update System 2024-11-25 16:21:32 UTC
FEDORA-2024-6b5842dd50 (python-pyftpdlib-2.0.0-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6b5842dd50

Comment 4 Fedora Update System 2024-11-25 16:26:31 UTC
FEDORA-2024-6b5842dd50 (python-pyftpdlib-2.0.0-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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