Support for Poetry lock format 2.0#23
Conversation
|
Any chance we could get this merged? It's blocking adoption 🙂 |
|
@NathanHowell Can you please merge this PR - I also need it! |
|
I'd love to see this merged! |
|
I am not sure if the company Sonia still exists, and therefore we see no support here anymore. Should we clone the repo and move it to https://github.com/bazel-contrib and continue development there? |
|
@Vertexwahn Please, do. Our adoption of Bazel is blocked by this request as well |
| lockfile = json.decode(result.stdout) | ||
| metadata = lockfile["metadata"] | ||
| if "files" in metadata: # Poetry 1.x format | ||
| package_files = [{"name": package["name"], "files": package["files"]} for package in lockfile["package"] if package.get("files")] |
There was a problem hiding this comment.
I would go for explicit version checking:
if metadata["lock-version"] in ["2.0"]:
etc. as far back as they had the lock-version item in metadata
|
If anyone is interested, I dropped this package and made my own Bazel Poetry module which takes advantage of some of the more recent rules_python advancements to significantly simplify the implementation: |
This PR adds support for new lock format 2.0.
Fixes issue #22