tox-poetry-installer icon indicating copy to clipboard operation
tox-poetry-installer copied to clipboard

Support tox ^4.0

Open jerkern opened this issue 1 year ago • 13 comments

Depencies currently prevent from using with tox 4.0 and above

jerkern avatar Feb 10 '23 13:02 jerkern

Hmm my comment in https://github.com/enpaul/tox-poetry-installer/issues/78#issuecomment-1448155756 was incorrect, seems like poetry 1.4 is out with more reasonable constraints on importlib-metadata. Maybe this is unblocked now? /cc @oshmoun from the PR working on this as well.

nejch avatar Feb 28 '23 13:02 nejch

/cc @oshmoun from the PR working on this as well.

Thanks for the reminder I have just tested it and unfortunately there is still at least one more conflict, and that's virtualenv.

oshmoun avatar Feb 28 '23 20:02 oshmoun

Ahh wow I see @oshmoun. It looks like poetry won't be bumping virtualenv entirely any time soon, 20.16.5 might be the only compatible version if tox was ready to downgrade the minimum from a quick look :/

Not sure if really feasible, looks like they might be relying on features based on https://github.com/tox-dev/tox/blame/b7fec1e236eeddefec9023f5d6ced94c5c2871cf/pyproject.toml#L34.

nejch avatar Feb 28 '23 20:02 nejch

It looks like poetry won't be bumping virtualenv entirely any time soon

~I could not find much to explain why poetry depends on a specific version of virtualenv other than it using calver, and not semver~ According to this I'm inclined to think it's doable, but just hasn't been done yet Upon further checking, it seems poetry 1.5 should come with an upgraded virtualenv version, since 1.5 will remove the now deprecated old installer https://github.com/python-poetry/poetry/pull/7356

oshmoun avatar Feb 28 '23 20:02 oshmoun

Ah, right @oshmoun I didn't look into the PR history. I guess waiting for 1.5 is the easiest, although that will take a few months judging from the poetry release cadence in the past.

@enpaul in the meantime would you consider pushing a release from the current main branch, which should at least help get poetry 1.3 and tox 3.x get along? :bow:

nejch avatar Mar 01 '23 15:03 nejch

@nejch Absolutely, I've just opened #85 to fix an issue in the CI caused by an upstream library, but once that's merged I'll cut a 0.10.1 release to add support for Poetry 1.3, and then if @oshmoun can rebase #80 off of devel we can get started on a Poetry 1.4/Tox 4 release as well.

enpaul avatar Mar 01 '23 21:03 enpaul

Thanks a lot @enpaul! Works flawlessly for me even with the new poetry 1.4 + tox 3 just FYI ;) sorry for the pings here, appreciate the plugin.

nejch avatar Mar 02 '23 08:03 nejch

A small update on this issue. Just noticed that the old installer was finally removed in upstream poetry, but no release yet. That change resolved the virtualenv conflict as expected. However, that also means that a refactoring is in order to move away from the now removed PipInstaller. I have pushed a suggestion on how to do that to #80

oshmoun avatar May 04 '23 11:05 oshmoun

Do you have a sense for how hard it is to preserve tox 3 compatibility while also supporting tox 4? Is that something you'd be interested in doing (if we can contribute the patches, of course) in this project, or are you committed to dropping tox 3 support in the near future?

We're in a bit of a pickle where we have lots of projects using tox 3 and tox-poetry-installer which will take time to upgrade once tox 4 support is merged, and I'm trying to think through our options to not be stuck on an old Poetry version during that window.

chriskuehl avatar May 31 '23 17:05 chriskuehl

@nejch @jerkern the new beta release should offer compatibility with tox 4, could you try it out and report any bugs you encounter?

@chriskuehl I'd be very interested in keeping tox 3 compatibility in the next release, especially if you're able to make the patches. The current head of the devel branch includes @oshmoun 's changes for tox 4, but the latest stable release tag includes the original tox 3 functionality for reference. I'd happily take a PR that backports tox 3 support to the new structure

enpaul avatar Aug 02 '23 15:08 enpaul

@jerkern asked me test the beta release, it seems to work for our use-cases (with poetry 1.5.1, tox ^4.0). Thank you!

crevoisiersabine avatar Aug 14 '23 08:08 crevoisiersabine

My team and I have been using 1.0.0b1 for the last few weeks as well, and it's rock-solid for us. Thanks for adding tox 4 support!

janw avatar Oct 12 '23 07:10 janw

Have recently switched to using the pre-release alongside tox 4 and poetry 1.6. All looks good here, yet to observe any issue

oshmoun avatar Oct 24 '23 13:10 oshmoun