Commit 55e4114f authored by Aos Dabbagh's avatar Aos Dabbagh
Browse files

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.
parent 0158c93a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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'])