Skip to content

[v9r0] fix: support cachetools 8 - #8901

Merged
aldbr merged 2 commits into
DIRACGrid:rel-v9r0from
chrisburr:fix/cachetools-8-v9r0
Nov 16, 2026
Merged

aldbr merged 2 commits into
DIRACGrid:rel-v9r0from
chrisburr:fix/cachetools-8-v9r0

Conversation

@chrisburr

Copy link
Copy Markdown
Member

cachetools 8.0.0 (released 2026-11-06) breaks two things in DIRAC:

  • @cached now returns a callable object instead of a function, so Registry.reset_all_caches(), which selected caches with inspect.isfunction, no longer clears any of them. Values cached before the central CS is loaded stay in place, e.g. an empty VO in the JobWrapper, so jobs with input or output data are rescheduled in a loop ([Bug]: Registry.reset_all_caches() no longer clears caches with cachetools >= 8.0.0 #8884). The caches are now found by their cache_clear.
  • @cachedmethod on class methods is no longer supported: FTS3Job._getIdpClient raises TypeError: Decorating class methods is not supported, so token-based FTS3 transfers fail. It never used cls, so it is now a static method cached with @cached in the same cache.

Both changes work with cachetools 7 as well. rel-v8r0 has neither reset_all_caches nor @cachedmethod, so it is not affected.

Closes #8884

BEGINRELEASENOTES
*Configuration
FIX: clear the Registry caches when the central CS is loaded with cachetools 8

*DataManagement
FIX: support cachetools 8 when caching the IdP clients of FTS3 jobs
ENDRELEASENOTES

@chrisburr
chrisburr force-pushed the fix/cachetools-8-v9r0 branch from f568b9c to 3c2955b Compare November 16, 2026 14:40
Since cachetools 8, a function decorated with cached is a wrapper object,
not a function, so reset_all_caches no longer found any of the Registry
caches and loading the central CS left them in place, e.g. an empty VO
resolved before the CS was loaded. Find them by their cache_clear instead.

Closes DIRACGrid#8884
cachetools 8 no longer supports @cachedmethod on class methods: calling
FTS3Job._getIdpClient raises TypeError, so token-based FTS3 transfers
fail. It never used the class, so make it a static method cached with
@cached in the same cache.
@chrisburr
chrisburr force-pushed the fix/cachetools-8-v9r0 branch from 3c2955b to 2051d15 Compare November 16, 2026 14:41
@chrisburr
chrisburr marked this pull request as ready for review November 16, 2026 14:42
@aldbr
aldbr merged commit 593a51e into DIRACGrid:rel-v9r0 Nov 16, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants