pytest-codspeed icon indicating copy to clipboard operation
pytest-codspeed copied to clipboard

Stop pulling unused cffi as a direct dependency in core packaging metadata

Open webknjaz opened this issue 2 months ago • 12 comments

Fixes #86

webknjaz avatar Oct 26 '25 21:10 webknjaz

@art049 the CI needs approval plz

webknjaz avatar Oct 26 '25 21:10 webknjaz

  • I didn't clone the repo locally so no uv lock updated. If somebody gets to it before I do — feel free to push a commit into this branch.

webknjaz avatar Oct 26 '25 21:10 webknjaz

Seems there's a bit of the problem in the uv setup.

error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.

Perhaps cffi needs to be removed from the uv.lock file?

Vizonex avatar Oct 27 '25 00:10 Vizonex

Yes

webknjaz avatar Oct 27 '25 07:10 webknjaz

@webknjaz if you don't have the time currently I would be willing to fork your patch-1 and then commit it. I can't seem to create a reviewer's suggestion. But I could quickly fork and pull request to your branch.

Vizonex avatar Oct 27 '25 15:10 Vizonex

Sounds good, thanks!

webknjaz avatar Oct 27 '25 16:10 webknjaz

@art049 could you run the CI again?

webknjaz avatar Oct 27 '25 19:10 webknjaz

@art049 do you happen to know how to remove the cffi dependency by any chance?

 Caused by: Dependency `cffi` has missing `version` field but has more than one matching package

even I'm having trouble making edits and I use uv a lot for many of my numerous libraries.

Vizonex avatar Oct 28 '25 02:10 Vizonex

@art049 do you happen to know how to remove the cffi dependency by any chance?

 Caused by: Dependency `cffi` has missing `version` field but has more than one matching package

even I'm having trouble making edits and I use uv a lot for many of my numerous libraries.

I think it's caused by an old version of uv:

Successfully installed uv version 0.5.20

I opened https://github.com/CodSpeedHQ/pytest-codspeed/pull/95.

edgarrmondragon avatar Oct 28 '25 02:10 edgarrmondragon

INTERNALERROR> RuntimeError: Failed to load instrument hooks library: No module named '_cffi_backend'

@Vizonex looks like the dep should be added to the test deps. Would you like to give it a try?

webknjaz avatar Oct 28 '25 12:10 webknjaz

Hey @webknjaz, @Vizonex, @edgarrmondragon. After taking a closer look it was not that easy to remove cffi and keep the library working. I opened #96 with a WIP for switching to a native extension. It still needs some thorough testing, but otherwise it should be good.

adriencaccia avatar Oct 28 '25 15:10 adriencaccia

@adriencaccia Thanks. This will definitely save both me and webknjaz a headache.

Vizonex avatar Oct 28 '25 15:10 Vizonex