Bug 2367992 - python-anyio fails to build with Python 3.14: test_copy and test_copy_into fail with pathlib's AttributeError: 'Path' object has no attribute '_copy_from'
Summary: python-anyio fails to build with Python 3.14: test_copy and test_copy_into fa...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-anyio
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-05-22 14:09 UTC by Karolina Surma
Modified: 2025-06-11 10:47 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-06-11 10:47:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-anyio pull-request 17 0 None None None 2025-05-22 14:26:15 UTC

Description Karolina Surma 2025-05-22 14:09:11 UTC
python-anyio fails to build with Python 3.14.0b1.

_________________________ TestPath.test_copy[asyncio] __________________________
tests/test_fileio.py:339: in test_copy
    result = await source_path.copy(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:428: in copy
    return Path(await to_thread.run_sync(func, target))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:2461: in run_sync_in_worker_thread
    return await future
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:962: in run
    result = context.run(func, *args)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'
______________________ TestPath.test_copy[asyncio+eager] _______________________
tests/test_fileio.py:339: in test_copy
    result = await source_path.copy(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:428: in copy
    return Path(await to_thread.run_sync(func, target))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:2461: in run_sync_in_worker_thread
    return await future
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:962: in run
    result = context.run(func, *args)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'
___________________________ TestPath.test_copy[trio] ___________________________
tests/test_fileio.py:339: in test_copy
    result = await source_path.copy(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:428: in copy
    return Path(await to_thread.run_sync(func, target))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_trio.py:1079: in run_sync_in_worker_thread
    return await run_sync(
/usr/lib/python3.14/site-packages/trio/_threads.py:447: in to_thread_run_sync
    return msg_from_thread.unwrap()
/usr/lib/python3.14/site-packages/outcome/_impl.py:213: in unwrap
    raise captured_error
/usr/lib/python3.14/site-packages/trio/_threads.py:373: in do_release_then_return_result
    return result.unwrap()
/usr/lib/python3.14/site-packages/outcome/_impl.py:213: in unwrap
    raise captured_error
/usr/lib/python3.14/site-packages/trio/_threads.py:392: in worker_fn
    ret = context.run(sync_fn, *args)
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_trio.py:1076: in wrapper
    return func(*args)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'
_______________________ TestPath.test_copy_into[asyncio] _______________________
tests/test_fileio.py:351: in test_copy_into
    result = await source_path.copy_into(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:442: in copy_into
    return Path(await to_thread.run_sync(func, target_dir))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:2461: in run_sync_in_worker_thread
    return await future
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:962: in run
    result = context.run(func, *args)
/usr/lib64/python3.14/pathlib/__init__.py:1122: in copy_into
    return self.copy(target, **kwargs)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'
____________________ TestPath.test_copy_into[asyncio+eager] ____________________
tests/test_fileio.py:351: in test_copy_into
    result = await source_path.copy_into(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:442: in copy_into
    return Path(await to_thread.run_sync(func, target_dir))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:2461: in run_sync_in_worker_thread
    return await future
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_asyncio.py:962: in run
    result = context.run(func, *args)
/usr/lib64/python3.14/pathlib/__init__.py:1122: in copy_into
    return self.copy(target, **kwargs)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'
________________________ TestPath.test_copy_into[trio] _________________________
tests/test_fileio.py:351: in test_copy_into
    result = await source_path.copy_into(destination_path)  # type: ignore[attr-defined]
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_core/_fileio.py:442: in copy_into
    return Path(await to_thread.run_sync(func, target_dir))
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/to_thread.py:56: in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_trio.py:1079: in run_sync_in_worker_thread
    return await run_sync(
/usr/lib/python3.14/site-packages/trio/_threads.py:447: in to_thread_run_sync
    return msg_from_thread.unwrap()
/usr/lib/python3.14/site-packages/outcome/_impl.py:213: in unwrap
    raise captured_error
/usr/lib/python3.14/site-packages/trio/_threads.py:373: in do_release_then_return_result
    return result.unwrap()
/usr/lib/python3.14/site-packages/outcome/_impl.py:213: in unwrap
    raise captured_error
/usr/lib/python3.14/site-packages/trio/_threads.py:392: in worker_fn
    ret = context.run(sync_fn, *args)
../BUILDROOT/usr/lib/python3.14/site-packages/anyio/_backends/_trio.py:1076: in wrapper
    return func(*args)
/usr/lib64/python3.14/pathlib/__init__.py:1122: in copy_into
    return self.copy(target, **kwargs)
/usr/lib64/python3.14/pathlib/__init__.py:1108: in copy
    target._copy_from(self, **kwargs)
E   AttributeError: 'Path' object has no attribute '_copy_from'

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-b1/fedora-rawhide-x86_64/09072947-python-anyio/

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

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-b1/

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.


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