https://pantsbuild.org/ logo
#general
Title
# general
c

calm-artist-46894

01/10/2020, 5:18 AM
I have a python_library with
compatibility="CPython>=2.7,<3"
and it depends on python requirement
more-itertools
(no version provided). Pants will install the latest version of
more-itertools
despite it is not compatible with Python 2.7. This is expected behavior for version 1.12? (I know I can pin the version but would like to confirm my observation)
h

hundreds-father-404

01/10/2020, 5:33 AM
Hm, currently we pin to <6.0.0 when using Python 2. Which version is being resolved?
c

calm-artist-46894

01/10/2020, 5:34 AM
8.0.2, the latest
h

hundreds-father-404

01/10/2020, 5:36 AM
Ah, found it. You’ll want to update to at least 1.15.0.dev3 for the fix for this issue: https://www.pantsbuild.org/notes-1.15.x.html#heading_dev_121
👍 1
The fix is
Revert 7238 and add requirement for more-itertools that works on python 2 (#7296)
c

calm-artist-46894

01/10/2020, 5:38 AM
Thanks Eric. (Next time I will remember to search release note first, but sometimes it is so attempting to just ask on slack since it is so easy)
h

hundreds-father-404

01/10/2020, 5:41 AM
You’re welcome! When updating, we recommend going one major version at a time so that you can see all the deprecation warnings. E.g. go from 1.14.0 to 1.15.0 to 1.16.0. Simply running
./pants
will show any deprecated options, but certain deprecations unfortunately only happen at runtime, such as warning of upcoming changes to the default values for options
Also, if you upgrade to Pants 1.23, we added
--pytest-plugins
to allow you to specify any plugins you want to use when running Pytest 🙂
👍 1