fix: Update writePython3Bin docs

Was trying out the recommended example for `writePython3Bin` and it
failed with:
```
Traceback (most recent call last):
  File "/nix/store/gcmhfm7mslpndjasfhvs66f1ca24vxim-test_py3/bin/test_py3", line 4, in <module>
    y = yaml.load("""
TypeError: load() missing 1 required positional argument: 'Loader'
```

Looks like `yaml.load(input)` was deprecated in 5.1: https://msg.pyyaml.org/load

`nixos-24.05` uses `6.0.1` so we're in the clear.
This commit is contained in:
Aos Dabbagh 2024-08-15 00:57:39 -04:00
parent 0158c93ad0
commit 55e4114fb3

View File

@ -597,7 +597,7 @@ rec {
# writePython3 "test_python3" { libraries = [ pkgs.python3Packages.pyyaml ]; } ''
# import yaml
#
# y = yaml.load("""
# y = yaml.safe_load("""
# - test: success
# """)
# print(y[0]['test'])
@ -615,7 +615,7 @@ rec {
# writePyPy3 "test_pypy3" { libraries = [ pkgs.pypy3Packages.pyyaml ]; } ''
# import yaml
#
# y = yaml.load("""
# y = yaml.safe_load("""
# - test: success
# """)
# print(y[0]['test'])