Using makepkg:
fun = 'safe_dump', method = 'dump', arg = "typ='safe', pure=True", comment = 'instead of'
def error_deprecation(fun: Any, method: Any, arg: str = '', comment: str = 'instead of') -> None: # NOQA
import inspect
s = f'\n"{fun}()" has been removed, use\n\n yaml = YAML({arg})\n yaml.{method}(...)\n\n{comment}' # NOQA
try:
info = inspect.getframeinfo(inspect.stack()[2][0])
context = '' if info.code_context is None else "".join(info.code_context)
s += f' file "{info.filename}", line {info.lineno}\n\n{context}'
except Exception as e:
_ = e
s += '\n'
if sys.version_info < (3, 10):
raise AttributeError(s)
else:
> raise AttributeError(s, name=None)
E AttributeError:
E "safe_dump()" has been removed, use
E
E yaml = YAML(typ='safe', pure=True)
E yaml.dump(...)
E
E instead of file "/media/linux/Downloads/Temp/python-eyed3/src/eyeD3-0.9.7/eyed3/plugins/yamltag.py", line 29
E
E print(yaml.safe_dump(audioFileToJson(self.audio_file),
/usr/lib/python3.12/site-packages/ruamel/yaml/main.py:1039: AttributeError
============================================================ warnings summary ============================================================
tests/test_classic_plugin.py:879
/media/linux/Downloads/Temp/python-eyed3/src/eyeD3-0.9.7/tests/test_classic_plugin.py:879: PytestUnknownMarkWarning: Unknown pytest.mark.audiofile_name - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.audiofile_name("unknown-frame-ASDF.mp3")
tests/test_jsonyaml_plugin.py::testJsonPlugin
tests/test_jsonyaml_plugin.py::testYamlPlugin
/media/linux/Downloads/Temp/python-eyed3/src/eyeD3-0.9.7/eyed3/plugins/jsontag.py:42: DeprecationWarning: Use Tag.getBestDate() instead
member = getattr(tag, name)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================== short test summary info =========================================================
FAILED tests/test_jsonyaml_plugin.py::testYamlPlugin - AttributeError:
=============================================== 1 failed, 183 passed, 3 warnings in 0.99s ================================================
==> ERROR: A failure occurred in check().
Aborting...
Pinned Comments