test: Verify Poetry v2 lock file groups/markers handling#14724
Merged
markhallen merged 3 commits intomainfrom Apr 15, 2026
Merged
test: Verify Poetry v2 lock file groups/markers handling#14724markhallen merged 3 commits intomainfrom
markhallen merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit spec coverage to confirm Poetry v2 poetry.lock files containing per-package groups (array) and markers (string) fields continue to parse cleanly and produce expected dependencies, helping formalize behavior as part of ongoing Poetry v2 support work.
Changes:
- Add parser specs asserting dependencies are still included when
groupsand/ormarkersfields are present in Poetry v2 lockfiles. - Add a spec asserting
TomlRB.parsepreservesgroups/markerskeys in the parsed TOML structure for the existing v2poetry.lockfixture.
Show a summary per file
| File | Description |
|---|---|
| python/spec/dependabot/python/file_parser/pyproject_files_parser_spec.rb | Adds new RSpec examples covering Poetry v2 lockfile groups/markers handling and TOML parsing preservation. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Verify that Poetry v2 lock file fields (groups, markers) are correctly handled during dependency parsing: - Packages with groups field are parsed and included - Packages belonging to multiple groups are handled - Packages with markers field are parsed correctly - TomlRB preserves groups and markers in parsed TOML output
5d9680e to
c7abc67
Compare
robaiken
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Verify that Poetry v2 lock file
groupsandmarkersfields are correctly handled during dependency parsing, as part of Poetry v2 support work.Poetry v2 lock files include new metadata per package:
groups(array, e.g.["main", "dev"]) — replaces the deprecated v1categoryfieldmarkers(string, e.g.sys_platform == "win32") — environment markersInvestigation confirmed no production code changes are needed — the existing architecture already handles these fields correctly:
TomlRB.parse()is a generic TOML parser that passes through arbitrary keyspoetry update --lock, so Poetry CLI regenerates the lock nativelypoetry show --only main, not lock file fieldsThis PR adds explicit test coverage to formalize and document that verification.
Anything you want to highlight for special attention from reviewers?
The existing
poetry.locktest fixture (python/spec/fixtures/poetry_locks/poetry.lock) was already in Poetry v2 format (generated by Poetry 2.1.1) withgroupsandmarkersfields present. The new tests make the implicit coverage explicit by asserting:groupsfield are parsed and included as dependencies["main", "dev"]) are handled correctlymarkersfield are parsed without errorsTomlRB.parse()preservesgroupsandmarkersin the parsed output hashNo production code touches lock file fields beyond
name,version,source.*, anddependencies— so new fields are harmlessly ignored.How will you know you've accomplished your goal?
All 48 tests pass (44 existing + 4 new):
Checklist