Join GitHub today
Add requirement for more-itertools that works on python 2 #7296
The latest release of more-itertools (6.0.0) only works on Python 3. https://github.com/erikrose/more-itertools/releases. more-itertools is a requirement of pytest.
When running with python2 I get
This has been fixed on the latest version of pytest but I'm not sure if we can update to that version or not? pytest-dev/pytest#4774
Add requirements where we use pytest so we don't get incompatible versions of more-itertools
pytest invocations continue to work on Python 2
See d0432df and #7238 -- we are currently unable to bump the pytest version beyond
We probably don't want to land this change as is, for the reasons described in pytest-dev/pytest#4770 (comment) (linked in #7238 -- we don't want to impose requirement constraints on pants users running pytest). It seems like this error would arise if you have overridden the pytest requirement in another repo's
However, I might be mistaken -- are you seeing the error described when developing in the pants repo, or is overriding the
I hadn't seen #7238. I was getting the error on pants 1.13.0.
The comment you linked (pytest-dev/pytest#4770) is referring to pinning specific versions of more_itertools in pytest. This change doesn't pin a specific version, it merely limits the version of more_itertools to something that works with whatever version of python you're running. Basically the same thing pytest itself is doing with pytest-dev/pytest#4774.
That seems more flexible than pinning pytest to 3.0.7 specifically.
Ah, I misunderstood! Thank you for describing the difference -- this change sounds right enough to me then, although the specific implementation might be edited. @jsirois might the above^ be a reason to allow
Eric-Arellano left a comment
This looks right to me.
The key detail is
Thank you for the patch!
Is this something we need to cherry-pick? cc @stuhood