Skip to content

pyyaml PendingDeprecationWarning: you should no longer specify 'unsafe' -> test failure #2489

@sebix

Description

@sebix
  • python311
  • ruamel.yaml 0.18.6 (with C library)

intelmq.tests.bots.experts.modify.test_expert.TestModifyExpertBot.test_events

[ 19s] /home/abuild/rpmbuild/BUILD/intelmq/intelmq/lib/utils.py:222: PendingDeprecationWarning: [ 19s] you should no longer specify 'unsafe'. [ 19s] For **dumping only** use yaml=YAML(typ='full') [ 19s] [ 19s] config = YAML(typ="unsafe", pure=True).load(fpconfig) 

This leads to

[ 29s] ====================================================================== [ 29s] FAIL: test_events (intelmq.tests.bots.experts.modify.test_expert.TestModifyExpertBot.test_events) [ 29s] Test if correct Events have been produced. [ 29s] ---------------------------------------------------------------------- [ 29s] Traceback (most recent call last): [ 29s] File "/home/abuild/rpmbuild/BUILD/intelmq/intelmq/tests/bots/experts/modify/test_expert.py", line 90, in test_events [ 29s] self.run_bot(iterations=7) [ 29s] File "/home/abuild/rpmbuild/BUILD/intelmq/intelmq/lib/test.py", line 401, in run_bot [ 29s] self.assertTrue(fields['message'][-1] in '.:?!', [ 29s] AssertionError: False is not true : Logline '/home/abuild/rpmbuild/BUILD/intelmq/intelmq/lib/utils.py:222: PendingDeprecationWarning: ' does not end with .? or !. [ 29s] [ 29s] ---------------------------------------------------------------------- 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcomponent: corehelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions