-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Refactor export #5156
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
Refactor export #5156
Conversation
5860a63 to
e7d38ee
Compare
12c5a61 to
f7af03a
Compare
|
Ooh, poetry already has a root package (just not derived from the lock file). I should be able to undo most of the changes here, just keeping the core algorithm improvements. |
|
Hey @dimbleby, please note that the export command will be replaced by the export-plugin. See #4824. The export-plugin is located at https://github.com/python-poetry/poetry-export-plugin. fin swimmer |
f7af03a to
1ffdcda
Compare
|
I've pushed a version that uses the existing root package, which removes large amounts of uninteresting changes in the unit tests. The remaining impact on existing unit tests is that Am not overly concerned about the plugin, most of the changes here are in the locker anyway. Still seems to need recent poetry-core, would it be good to tag and release a new version of that project soon? |
0a4da5a to
d76d1ce
Compare
275decb to
a618b45
Compare
d176709 to
e5eb514
Compare
|
rebased for:
|
3d718f8 to
2d61c34
Compare
2d61c34 to
f0a7665
Compare
f0a7665 to
e57176e
Compare
e57176e to
10e2800
Compare
|
I added another testcase showcasing a fix made in this MR relating to extras. On master, but |
|
I've been hitting an annoying bug that is fixed by this, thanks for the fix @dimbleby :) |
49e46ec to
37f362d
Compare
|
ugh, merge conflicts. @abn I don't think this is waiting on anything, can we merge it? |
|
Ugh. My bad. I needed to do a once over and we would be good. I'll get to it today. |
abn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this for now. The logic is improved, current behaviour is largely maintained outside of project level python version marker propagation. This drops unused features but they can be reintroduced later as required.
|
Any chance for another beta release? It seems to finally fix our dependency issues mentioned in #3511 while beta1 is not compatible with the export plugin. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Refactoring
poetry exportto deal with bugs encountered in the testcase written for #5141, in particular "bug 1" of #5154.This has turned out to be a rather larger set of changes than I had intended or than I am completely happy about submitting in a single MR. But the fact is that I kept encountering bugs, and there is no real improvement until they all are fixed.
Outline of the changes made:
__walk_dependency_level()pinned_versionsandwith_nestedWe also need a fix in poetry-core to include markers in the hash of a
Dependency, I'll do that separately. I expect that'll prevent the pipeline from passing on this MR. Edit: I rearranged this MR so that it doesn't rely on further poetry-core changes, but it seems that the tests do still require a recent version of that project.The proof of all this pudding is in the testcase at the end of it all
test_exporter_doesnt_confuse_repeated_packages, where we finally manage to export a set of requirements that is not impossible, doesn't have overlaps, and generally looks good.Again, apologies for the size of the MR. I actually think that overall this is a simplification, but there was rather a lot of code to simplify. Do ask if you have any questions.