Do python wheels depend on the python version that built them?

I don’t quite understand how conditional dependency wheels work, so I’m asking here.

Taking this as an example:

strenum = { version = "^0.4.15", python = "<3.11" }

If I build the wheel with 3.11 (where strenum isn’t pulled in), can someone install it with 3.10 (where strenum would need to be pulled in)?

I’m using poetry build if that makes any difference

You should find your built wheel works on any Python version you specified as supported in your project configuration. Dependencies are just metadata inside. Where wheels start getting less general is when they are not pure Python, e.g. you use cython to compile C code.

What constitutes as pure python? Is my project still pure python if I’m depending on something like pydantic which has a rust core?

Dependencies are fine. They aren’t added to your wheel. They are just listed by name in the metadata.

That makes things clear, thank you very much!