Skip to content
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

Bump plette from 0.4.4 to 1.0.0 in /python/helpers #9354

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/helpers/requirements.txt
Expand Up @@ -3,7 +3,7 @@ pip-tools==7.4.1
flake8==7.0.0
hashin==1.0.1
pipenv==2023.12.1
plette==0.4.4
plette==1.0.0
poetry==1.8.2
# TODO: Replace 3p package `toml` with 3.11's new stdlib `tomllib` once we drop support for Python 3.10.
toml==0.10.2
Expand Down
Expand Up @@ -270,6 +270,8 @@ def pipfile_hash_for(pipfile_content)
function: "get_pipfile_hash",
args: [T.cast(dir, Pathname).to_s]
)
rescue Dependabot::SharedHelpers::HelperSubprocessFailed
return nil
end
end

Expand Down
Expand Up @@ -275,13 +275,18 @@
end

let(:json_lockfile) { JSON.parse(updated_lockfile.content) }
let(:json_hash) { json_lockfile["_meta"]["hash"] }

it "updates only what it needs to" do
expect(json_lockfile["default"]["requests"]["version"])
.to eq("==2.18.4")
expect(json_lockfile["develop"]["pytest"]["version"]).to eq("==3.2.3")
expect(json_lockfile["_meta"]["hash"])
.to eq(JSON.parse(lockfile.content)["_meta"]["hash"])
if json_hash["SHA256"].nil?
expect(json_lockfile["_meta"]["hash"]).to eq(json_hash)
else
expect(json_lockfile["_meta"]["hash"])
.to eq(JSON.parse(lockfile.content)["_meta"]["hash"])
end
end

describe "when updating a subdependency" do
Expand All @@ -295,12 +300,17 @@
previous_requirements: []
)
end
let(:json_hash) { json_lockfile["_meta"]["hash"] }

it "updates only what it needs to" do
expect(json_lockfile["default"].key?("py")).to eq(false)
expect(json_lockfile["develop"]["py"]["version"]).to eq("==1.7.0")
expect(json_lockfile["_meta"]["hash"])
.to eq(JSON.parse(lockfile.content)["_meta"]["hash"])
if json_hash["SHA256"].nil?
expect(json_lockfile["_meta"]["hash"]).to eq(json_hash)
else
expect(json_lockfile["_meta"]["hash"])
.to eq(JSON.parse(lockfile.content)["_meta"]["hash"])
end
end
end

Expand Down