Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

doc/python: use optional-dependencies instead of extras-require

This is the term that PEP 621 uses and it is less likely to be
misspelled.

https://peps.python.org/pep-0621/#dependencies-optional-dependencies

I was never sure if it was `extra` or `extras`, or `require` or
`requires` and finally committed a mistake in #167405.

Changed files
+4 -3
doc
languages-frameworks
+4 -3
doc/languages-frameworks/python.section.md
··· 982 982 #### Optional extra dependencies 983 983 984 984 Some packages define optional dependencies for additional features. With 985 - `setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A 985 + `setuptools` this is called `extras_require` and `flit` calls it 986 + `extras-require`, while PEP 621 calls these `optional-dependencies`. A 986 987 method for supporting this is by declaring the extras of a package in its 987 988 `passthru`, e.g. in case of the package `dask` 988 989 989 990 ```nix 990 - passthru.extras-require = { 991 + passthru.optional-dependencies = { 991 992 complete = [ distributed ]; 992 993 }; 993 994 ``` ··· 997 998 ```nix 998 999 propagatedBuildInputs = [ 999 1000 ... 1000 - ] ++ dask.extras-require.complete; 1001 + ] ++ dask.optional-dependencies.complete; 1001 1002 ``` 1002 1003 1003 1004 Note this method is preferred over adding parameters to builders, as that can