New GitHub issue #107914 from furkanonder:<br>
<hr>
<pre>
# Bug report
## Checklist
<!-- Bugs in third-party projects (e.g. `requests`) do not belong in the CPython issue tracker -->
- [X] I am confident this is a bug in CPython, not a bug in a third-party project
- [X] I have searched the CPython issue tracker, and am confident this bug has not been reported before
## A clear and concise description of the bug
```bash
╰─$ ./python -m test test_zipfile
0:00:00 load avg: 5.78 Run tests sequentially
0:00:00 load avg: 5.78 [1/1] test_zipfile
test test_zipfile failed -- Traceback (most recent call last):
File "/home/arf/cpython/Lib/test/test_zipfile/test_core.py", line 1375, in test_write_filtered_python_package
zipfp.writepy(packagedir)
File "/home/arf/cpython/Lib/zipfile/__init__.py", line 2101, in writepy
fname, arcname = self._get_codename(path[0:-3],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arf/cpython/Lib/zipfile/__init__.py", line 2181, in _get_codename
if _compile(file_py):
^^^^^^^^^^^^^^^^^
File "/home/arf/cpython/Lib/zipfile/__init__.py", line 2144, in _compile
py_compile.compile(file, doraise=True, optimize=optimize)
File "/home/arf/cpython/Lib/py_compile.py", line 172, in compile
importlib._bootstrap_external._write_atomic(cfile, bytecode, mode)
File "<frozen importlib._bootstrap_external>", line 201, in _write_atomic
PermissionError: [Errno 13] Permission denied: '/home/arf/cpython/Lib/test/__pycache__/_test_atexit.cpython-313.pyc.140634519451056'
test_zipfile failed (1 error)
== Tests result: FAILURE ==
1 test failed:
test_zipfile
```
# Your environment
<!-- Include all relevant details about the environment you experienced the bug in -->
- CPython versions tested on: 3.13.0a0
- Operating system and architecture: Arch Linux x86_64
<!--
You can freely edit this form. Remove any lines you believe are unnecessary.
-->
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/107914">View on GitHub</a>
<p>Labels: type-bug, tests</p>
<p>Assignee: </p>