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

terminal: _get_main_color: help pytest-parallel #6261

Merged
merged 1 commit into from
Nov 22, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Nov 22, 2019

Use dict.keys() to work around __iter__ not working with a
multiprocessing DictProxy.

Ref: python/cpython#17333
Fixes #6254.
Ref: kevlened/pytest-parallel#36

Use `dict.keys()` to work around `__iter__` not working with a
multiprocessing DictProxy.

Ref: python/cpython#17333
Fixes pytest-dev#6254.
Ref: kevlened/pytest-parallel#36
@nicoddemus
Copy link
Member

LGTM, but pytest-parallel should implement the full dict interface themselves I believe, because this is very brittle and might break again in the future.

@RonnyPfannschmidt
Copy link
Member

the location of this failure is also a indication about how "broken" pytest-parallel is

last i checked, its mechanisms for laying out ipc/test execution seemed rather problematic,
i dont think we should make pytest stranger to keep it working as is

@nicoddemus
Copy link
Member

last i checked, its mechanisms for laying out ipc/test execution seemed rather problematic,
i dont think we should make pytest stranger to keep it working as is

I understand and agree with the sentiment, but this is a 1-line change which doesn't really impact us, that's why I think it is harmless. But just to be clear, it is my understanding that there's absolutely no guarantee that we will maintain this compatibility, hence, this might break again in the future, so pytest-parallel should also fix this on their side.

@blueyed blueyed merged commit 0601f5c into pytest-dev:master Nov 22, 2019
@blueyed blueyed deleted the stats-keys branch November 22, 2019 16:12
@blueyed
Copy link
Contributor Author

blueyed commented Nov 22, 2019

They're using a DictProxy, not implementing the dict itself, and from what I can tell might be a bug in Python then (python/cpython#17333).

Anyway, I agree that pytest-parallel's monkeypatching of pytest internals is brittle in general, and hope that this can be improved in the long run.

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

Successfully merging this pull request may close these issues.

Issue when updating from pytest 5.2.4 to pytest 5.3.0
3 participants