-
Notifications
You must be signed in to change notification settings - Fork 251
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
Make core aware of poetry lock files #83
base: main
Are you sure you want to change the base?
Conversation
The build failures are because of the last poetry prerelease not working on windows/2.7. |
Thank you for working on this. The missing lock file support is currently a blocker to better |
Appreciate the input. I would really appreciate wider testing of this to ensure it covers required scenarios. So, if anyone want to define various complex scenarios to test even just manually, that would help the confidence in the implementation. Note that the lock parsing logic has undergone significant bug fixes in I am also considering a re-write of how lock data is loaded, so it's more a graph in memory. Additionally working on the bug fixes, I realised that in order for the lock file to be truly independent the 508 information from pyproject for top level dependencies will also need to be preserved in the lock file. |
@abn A couple of edge cases I hit when trying some of the Markers in sub-dependencies (one current plugin has issues dealing with this, so we need them parsed out properly in [[package]]
name = "ipython"
version = "7.18.1"
description = "IPython: Productive Interactive Computing"
category = "main"
optional = false
python-versions = ">=3.7"
[package.dependencies]
appnope = {version = "*", markers = "sys_platform == \"darwin\""}
backcall = "*"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
decorator = "*"
jedi = ">=0.10"
pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""}
pickleshare = "*"
prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0"
pygments = "*"
traitlets = ">=4.2" URL dependencies: [tool.poetry.dependencies]
en-core-web-sm = {url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.0/en_core_web_sm-2.3.0.tar.gz"} And Git dependencies, for example: $ poetry add git+https://github.com/sdispater/pendulum.git#develop |
Pants (pantsbuild/pants#10655 (comment)) recently merged a custom way to read poetry's metadata. The lack of lock file support in poetry-core was cited as a reason to not reuse poetry-core. I would have preferred they reuse poetry-core, but oh well. What's the next step to get this merged? |
Sorry for letting this become stale, next step is for me to get this rebased and reworked with the recent changes. Additionally, once it is ready, I would definitely appreciate some addtional eyes on this. |
48ea8ac
to
95da74c
Compare
Rebased this. While the code works, and is an exact port of current poetry@master, the functionality introduced via groups is a bit ambiguous at present. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@abn this currently represents the primary reason I'm stuck installing |
In case it's beneficial, I have rebased this PR on my branch here: https://github.com/riconnon/poetry-core/tree/add-locker |
Thanks @riconnon I will see what the other's on the core team think about this in general. |
@abn did you get a chance to talk to the rest of the core team? This remains my biggest poetry bugbear so I'm keen to work to a solution if possible. |
@abn - do you have an update for this ticket ? |
@abn @sdispater can you say what's missing here, if anything? I just heard of Thanks! |
Lock file parsing logic and should be implemented by poetry-core. In many cases downstream consumers need to depend on poetry in order parse information, get packages etc from the lock file. This change proposes to move basic implementation to core such that poetry only needs to implements specifics such as
Locker.locked_packages()
which now will becomereturn Repository(packages=self.get_packages(categories=["main"])
.This change also now ensures
poetry.lock
is included the package sdist.