Slide 1

Slide 1 text

Let’s fix extras in Core Metadata 3.0 1

Slide 2

Slide 2 text

Extras Name normalisation and comparison PEP 685 Make sense of extra comparison in markers == “works” but is wrong Default extras 2

Slide 3

Slide 3 text

Name normalisation Covered by Brett’s PEP 685 but has consequences Extra name must be normalised in markers Incompatibility Easy for tools to get wrong 3

Slide 4

Slide 4 text

Extra in marker is a mess extra == "foo" is wrong pip install package[docs,tests] any(marker.evaluate({"extra": x}) for x in extras) No other operators make sense “Negative extra” is impossible Exclude a dependency when an extra is specified 4

Slide 5

Slide 5 text

extras instead of extra pytest>=6.0; 'tests' in extras Use not in for negation Special semantics for operators Normalise operands on comparison Should drop extra to avoid confusion Incompatibility 5

Slide 6

Slide 6 text

Default extra group I think Pradyun showed interests Probably can use help from interested folks A “default extra” specification in metadata Requires-Dist: package asks for that extra group Semantic incompatibility What happens when pip install package[another] ? package[] requests to not install the defaul group? 6

Slide 7

Slide 7 text

Proposals (1/2) Metadata 3.0 or not? PEP 685 already (slightly) broke compatibility Or we keep extra and stay on 2.x But if we bump to 3.0… Default extra group I should get in touch with Pradyun 7

Slide 8

Slide 8 text

Proposal (2/2) Drop old fields made problematic by PEP 621 Home-page The Author and Maintainer divide I think there are more There must be more we can do 8