Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with PyYAML 6 #41

Closed
dotlambda opened this issue Nov 19, 2021 · 1 comment · Fixed by #46
Closed

Incompatible with PyYAML 6 #41

dotlambda opened this issue Nov 19, 2021 · 1 comment · Fixed by #46

Comments

@dotlambda
Copy link

Due to yaml/pyyaml#561, the tests fail with

============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /build/python-multipart-0.0.5
plugins: cov-2.12.1
collected 0 items / 1 error

==================================== ERRORS ====================================
______________ ERROR collecting multipart/tests/test_multipart.py ______________
multipart/tests/test_multipart.py:712: in <module>
    yaml_data = yaml.load(f)
E   TypeError: load() missing 1 required positional argument: 'Loader'
=============================== warnings summary ===============================
multipart/tests/compat.py:48
  /build/python-multipart-0.0.5/multipart/tests/compat.py:48: PytestUnknownMarkWarning: Unknown pytest.mark.slow_test - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    slow_test = pytest.mark.slow_test

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR multipart/tests/test_multipart.py - TypeError: load() missing 1 require...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 0.93s ==========================
@mweinelt
Copy link

mweinelt commented Jan 3, 2022

Replacing yaml.load with yaml.safe_load resolves this problem.

carlwgeorge added a commit to carlwgeorge/python-multipart that referenced this issue Apr 20, 2022
yaml.load in PyYAML 6 requires a Loader argument.  PyYAML recommends
using SafeLoader, which is implied if you call yaml.safe_load instead.

yaml/pyyaml#561
https://msg.pyyaml.org/load

Fixes Kludex#41
andrew-d pushed a commit that referenced this issue Apr 20, 2022
yaml.load in PyYAML 6 requires a Loader argument.  PyYAML recommends
using SafeLoader, which is implied if you call yaml.safe_load instead.

yaml/pyyaml#561
https://msg.pyyaml.org/load

Fixes #41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants