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

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

Open
sebix opened this issue Apr 4, 2024 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: core
Milestone

Comments

@sebix
Copy link
Member

sebix commented Apr 4, 2024

  • 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] ----------------------------------------------------------------------
@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: core labels Apr 4, 2024
@sebix sebix added this to the 3.3.1 milestone Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: core
Projects
None yet
Development

No branches or pull requests

1 participant