Skip to content

Conversation

@Lillecarl
Copy link
Contributor

asyncache is only used for one function, maintaining the library to decorate one function is not worth it (I believe, I don't know the roadmap 😄)

I didn't set up the pytest infrastructure yet (but I did half-ass try), Nix is inherently incompatible with it since it's running kind which you can't do within the Nix build container. (Not "easily" at least) so this is untested too, but I think the change is worth consideration. It's a bit less fluffy magic but easier to comprehend and you don't have to maintain asyncache anymore 😄

Fixes these warnings from latest CI run:

  /home/runner/work/kr8s/kr8s/kr8s/_vendored/asyncache/__init__.py:145: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
    if asyncio.iscoroutinefunction(method):

If there are plans to expand asyncache usage feel free to discard this 😄

asyncache is only used for one function, maintaining the library to
decorate one function is not worth it.
@Lillecarl Lillecarl changed the title Remove asyncache dependency WIP: Remove asyncache dependency Oct 28, 2025
@Lillecarl
Copy link
Contributor Author

Eh, I don't understand how this could behave any differently from the decorator 🤔 I'll be back!

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Oct 28, 2025

I'm supportive of this change. I don't think maintaining the dependency is causing us any problems, but I always like a shift towards simplicity.

I don't have any experience with nix, but the pytest-kind plugin only creates a kind cluster if one doesn't exist already. You could create one manually yourself, just ensure that the kubeconfig file ends up in the right place.

kind create cluster -n pytest-kind --image kindest/node:v1.34.0 --kubeconfig .pytest-kind/pytest-kind/kubeconfig

@Lillecarl
Copy link
Contributor Author

I'm closing this for now, I'll get back at it once I have a non-nixxed Python setup so I can run the tests locally first 😄 Half-dead PR's don't make anyone happier

@Lillecarl Lillecarl closed this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants