[Debian-med-packaging] Bug#1149346: pynwb: FTBFS against python 3.15rc2 ('__cached__' not found in expected module structure)
Margarita Manterola
marga at debian.org
Tue Sep 29 15:39:19 BST 2026
Package: src:pynwb
Version: 2.8.2-4
User: debian-python at lists.debian.org
Usertags: python3.15
Tags: ftbfs, forky, sid
Severity: important
Hi!
While rebuilding the python related packages against the Python 3.15rc2
version we found that pynwb fails to build from source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4856659/
From the log, the error seems to be:
=================================== FAILURES
===================================
_______________ TestImportStructure.test_outer_import_structure
________________
[…]
for member in expected_structure:
> self.assertIn(member=member, container=current_structure)
E AssertionError: '__cached__' not found in ['BuildManager',
'CORE_NAMESPACE', 'DataChunkIterator', 'H5DataIO', 'HDMFIO',
'NWBContainer', 'NWBData', 'NWBDatasetSpec', 'NWBFile', 'NWBGroupSpec',
'NWBHDF5IO', 'NWBNamespace', 'NamespaceCatalog', 'Path',
'ProcessingModule', 'TimeSeries', 'TypeMap', '_HDF5IO', '__NS_CATALOG',
'__TYPE_MAP', '__builtins__', '__doc__', '__file__', '__get_resources',
'__io', '__loader__', '__name__', '__package__', '__path__',
'__resources', '__spec__', '__version__', '_due', '_get_resources',
'_version', 'available_namespaces', 'base', 'behavior', 'core',
'deepcopy', 'device', 'docval', 'ecephys', 'epoch', 'file', 'get_class',
'get_docval', 'get_loaded_type_config', 'get_manager',
'get_nwbfile_version', 'get_type_map', 'getargs', 'h5py', 'hdmf',
'hdmf_get_loaded_type_config', 'hdmf_load_type_config', 'hdmf_typemap',
'hdmf_unload_type_config', 'icephys', 'image', 'io', 'legacy',
'load_namespaces', 'load_type_config', 'misc', 'ogen', 'ophys', 'os',
'popargs', 'register_class', 'register_map', 'resources', 'spec',
'testing', 'unload_type_config', 'validate', 'warn']
This is very likely due to an explicit 3.15 change. From
https://docs.python.org/3.15/whatsnew/3.15.html:
The __cached__ attribute on modules, which was deprecated since version
3.13, is no longer set or taken into consideration by the import system
or standard library. Use __spec__.cached instead. (Contributed by Brett
Cannon in gh-97879.)
Setting the severity to important for now. Once Python 3.15 is released
and later added to python3-defaults, this bug will become release
critical.
--
Regards,
Marga
More information about the Debian-med-packaging
mailing list