Hi all, We have been using a Python monorepo setup...
# general
a
Hi all, We have been using a Python monorepo setup with pants for a while and recently started using the pants lockfile. I wanted to share an issue I ran into, how I worked around it, and if there are better ways to resolve. I had to upgrade a 3rd party dependency -lets call it "library A", I updated its version in requirements.txt, the pants generate-lockfile command not only upgrades A but also few other packages (say B and C) as per the version ranges listed in requirements.txt - this started breaking code and caused run time issues because the code wasn't compatible for the newer versions of libraries B and C (I wanted to upgrade just A). In order to resolve this, I had to pin B and C to versions that work with the current code, but we can't keep doing this for all package upgrades. Is there a better way in pants to resolve/prevent this? How do I tell pants to just upgrade A but not B and C- basically to use the current versions in the lockfile for B and C but upgrade only A because it's version in requirements.txt has changed from the previous? Happy to hear anyone's thoughts, Thanks ! cc @faint-businessperson-86903
👋 1
c
Does https://github.com/pantsbuild/pants/issues/15704 sound like what you are looking for?
a
Yes, it does. Thank you ! It seems the anticipated feature is still in development, as seen in https://github.com/pantsbuild/pants/pull/20364. Do we have any estimated completion time for this, so we know when we can start using it?
c
I'm still poking at it, but I'm afraid I can't offer a timeline. There is a least one foundational change I need to get in first and then there is some Pex side work in flight that will make this easier/better/more-general.
a
sounds good . We are really looking forward to this feature. Would be very helpful if you can reply to this thread once you have an update. Thank you for all the work!
Meanwhile, let us know if there is any workaround to prevent pants from bumping up the versions of other packages than the intended one.