Skip to content

Conversation

@Eijebong
Copy link
Contributor

@Eijebong Eijebong commented Dec 8, 2025

I kept _fetch_github_branch_commits_data because the solution in #731 isn't working well with forks.

Supersedes #731
Fixes #729

I'm not too fond of reinventing the wheel but we only have one use of
this and I don't feel like adding yet another dependency for something
that's 20 lines of code...

This is necessary to get scriptworker to work with python3.14
This fixes python 3.14 compatibility. `get_event_loop` used to create
an event loop if there wasn't any but 3.14 changed that behavior so we
have to explicitely create one now
There's no `0.7.9-python3.14-bookworm-slim` image but there is a
`0.9.16-python3.14-bookworm-slim` one.
Copy link
Contributor

@ahal ahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

import logging
import re

from aiomemoizettl import memoize_ttl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

_BRANCH_COMMITS_CACHE_TTL_IN_SECONDS = 10 * 60 # 10 minutes
_fetch_github_branch_commits_data = memoize_ttl(_fetch_github_branch_commits_data_helper, get_ttl=lambda _: _BRANCH_COMMITS_CACHE_TTL_IN_SECONDS)
async def _fetch_github_branch_commits_data(context, repo_html_url, revision):
cache_key = (id(context), repo_html_url, revision)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the previous comment we don't actually want the context in here? Probably safer to keep it at least for this commit, but might still warrant a comment?

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.

verify_cot fails with python 3.14

3 participants