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

Python 3.7 deprecation warning causes failure in test_run_auto_output_without_tty_output #165

Closed
jayvdb opened this issue Feb 13, 2019 · 5 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Feb 13, 2019

This is a flaky error, occurring occasionally when I do builds on openSUSE build service, Tumbleweed rolling release.

[  139s] ======================================================================
[  139s] FAIL: test_run_auto_output_without_tty_output (tests.test_cli.CommandLineTestCase)
[  139s] ----------------------------------------------------------------------
[  139s] Traceback (most recent call last):
[  139s]   File "/home/abuild/rpmbuild/BUILD/yamllint-1.14.0/tests/test_cli.py", line 416, in test_run_auto_output_without_tty_output
[  139s]     self.assertEqual(err, '')
[  139s] AssertionError: "/usr/lib64/python3.7/site-packages/yaml/[214 chars]):\n" != ''
[  139s] - /usr/lib64/python3.7/site-packages/yaml/constructor.py:126: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
[  139s] -   if not isinstance(key, collections.Hashable):
[  139s] 

It can be seen currently on https://build.opensuse.org/package/show/home:jayvdb:coala:python3-bears/python-yamllint , but OBS doesnt keep old logs so it may turn green on the next build.

@adrienverge
Copy link
Owner

Hey @jayvdb, thanks for the report. I experience the same, and hope PyYAML will fix it upstream!

@jayvdb
Copy link
Contributor Author

jayvdb commented Feb 13, 2019

If your use of pyyaml's code which triggers this is in one specific place, you could use warnings module to disable the deprecation warning occurring while invoking that bit of pyyaml.

Alternatively, maybe disable this test on py3.7 until pyyaml has done their thing?

@adrienverge
Copy link
Owner

Currently there are multiple tests that output warnings (including the one that you reported), but none prevent tests from passing on Travis, nor on my computer.

I'm not very familiar with openSUSE, but I suggest applying a patch (to delete the test) when building the package. Could that be an option? I often have to do it for RPM packaging.

By the way, good news: this comment from a PyYAML maintainer says it should be fixed and released in February 👍

@jayvdb
Copy link
Contributor Author

jayvdb commented Feb 14, 2019

I've already skipped this one test, and the update is pending at https://build.opensuse.org/request/show/674874

@jayvdb
Copy link
Contributor Author

jayvdb commented Jul 12, 2019

Fixed upstream

@jayvdb jayvdb closed this as completed Jul 12, 2019
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

No branches or pull requests

2 participants