Bug 2328701 - python-pytest-localftpserver fails to build with Python 3.14: multiprocessing has changed the start method to 'forkserver'
Summary: python-pytest-localftpserver fails to build with Python 3.14: multiprocessing...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pytest-localftpserver
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-25 16:27 UTC by Karolina Surma
Modified: 2024-11-26 15:59 UTC (History)
5 users (show)

Fixed In Version: python-pytest-localftpserver-1.3.2-2.fc42
Clone Of:
Environment:
Last Closed: 2024-11-26 15:59:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oz123 pytest-localftpserver pull 351 0 None open Avoid the multiprocessing forkserver method 2024-11-25 17:25:34 UTC

Description Karolina Surma 2024-11-25 16:27:18 UTC
python-pytest-localftpserver fails to build with Python 3.14.0a2.

____________ ERROR at setup of test_fail_due_to_closed_module_scope ____________

request = <SubRequest 'ftpserver' for <Function test_ftpserver_class>>

    @pytest.fixture(scope=FIXTURE_SCOPE)
    def ftpserver(request):
        """The returned ``ftpsever`` provides a threaded instance of
        ``pyftpdlib.servers.FTPServer`` running on localhost.
    
        For details on the usage and configuration  check out the docs at:
        https://pytest-localftpserver.readthedocs.io/en/latest/usage.html
    
        Yields
        ------
        ftpserver: FunctionalityWrapper
            The type of `ftpserver` isn't actually `FunctionalityWrapper`,
            but a subclass with `threading.Thread` or `multiprocessing.Process`
            depending on the OS. But for autocomplete sake and since
            `FunctionalityWrapper` holds all functionality, let's pretend that it is
            `FunctionalityWrapper`.
        """
>       server = PytestLocalFTPServer()

../BUILDROOT/usr/lib/python3.14/site-packages/pytest_localftpserver/plugin.py:31: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.14/site-packages/pytest_localftpserver/servers.py:1170: in __init__
    self.process.start()
/usr/lib64/python3.14/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
/usr/lib64/python3.14/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
/usr/lib64/python3.14/multiprocessing/context.py:300: in _Popen
    return Popen(process_obj)
/usr/lib64/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
    super().__init__(process_obj)
/usr/lib64/python3.14/multiprocessing/popen_fork.py:20: in __init__
    self._launch(process_obj)
/usr/lib64/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
    reduction.dump(process_obj, buf)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

obj = <Process name='Process-1' parent=252 initial daemon>
file = <_io.BytesIO object at 0x7f3104641300>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       TypeError: cannot pickle 'select.epoll' object
E       when serializing dict item '_poller'
E       when serializing pyftpdlib.ioloop.Epoll state
E       when serializing pyftpdlib.ioloop.Epoll object
E       when serializing dict item 'ioloop'
E       when serializing pytest_localftpserver.servers.SimpleFTPServer state
E       when serializing pytest_localftpserver.servers.SimpleFTPServer object
E       when serializing tuple item 0
E       when serializing method reconstructor arguments
E       when serializing method object
E       when serializing dict item '_target'
E       when serializing multiprocessing.context.Process state
E       when serializing multiprocessing.context.Process object

Upstream PR: https://github.com/oz123/pytest-localftpserver/pull/351

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/08309950-python-pytest-localftpserver/

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

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-25 17:25:34 UTC
Upstream fix: https://github.com/oz123/pytest-localftpserver/pull/351

Comment 3 Fedora Update System 2024-11-26 15:56:37 UTC
FEDORA-2024-944c9b478b (python-pytest-localftpserver-1.3.2-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-944c9b478b

Comment 4 Fedora Update System 2024-11-26 15:59:35 UTC
FEDORA-2024-944c9b478b (python-pytest-localftpserver-1.3.2-2.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.