Kludex / python-multipart

A streaming multipart parser for Python.

Home Page:https://kludex.github.io/python-multipart/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with PyYAML 6

dotlambda opened this issue · comments

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 ==========================

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