distutils icon indicating copy to clipboard operation
distutils copied to clipboard

`spawn`: don't force param `cmd` to be mutable

Open Avasam opened this issue 4 weeks ago • 1 comments

This has 2 advantages:

  • cmd doesn't have to be mutable. So tuples are usable
  • It actually improves the generic type because MutableSequence is invariant. which can cause issues with union types since you need to match the exact full union type (some checkers do allow partial union match for inline/literal sequences)

I also improved the possible param types by using an overload on search_path (since search_path allows bytes | str | PathLike[str], but not PathLike[bytes])

Open question: Since verbose isn't used in spawn, maybe it's better to not even expose it as a possible kwargs in Compiler classes ? (no runtime change, just hiding it from the type annotation in wrapper methods)

Avasam avatar Dec 20 '25 05:12 Avasam