dependabot-python 0.401.0 → 0.402.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eae7152a290937aaf3118091bf2d2befbeaeb54cf625498312167ea0cc88d867
|
|
4
|
+
data.tar.gz: d612db59f7e6ac54053c7a1a2f27a2fd591312a5292bfabd088d05a402acb453
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52df615381fec79610648a6e131cbe10f25ecccacb23a0b1b4ae54e1557eda648ae784181b110e609f670762a536768110ca71ee7602c3889734b295bf560994
|
|
7
|
+
data.tar.gz: 73aad5f18f8cdf0293d65dd57a1f71aa5d6da1afab438258c091c25dd09d1f0949535b1da729643deebb80dcd89ea4bc0785a20344421d975d2b782c4085895d
|
|
@@ -85,8 +85,8 @@ module Dependabot
|
|
|
85
85
|
def unique_requirement_changes
|
|
86
86
|
previous_reqs = dependency.previous_requirements || []
|
|
87
87
|
|
|
88
|
-
changes = dependency.requirements.filter_map do |new_req|
|
|
89
|
-
old_req =
|
|
88
|
+
changes = dependency.requirements.each_with_index.filter_map do |new_req, index|
|
|
89
|
+
old_req = matching_previous_requirement(new_req, previous_reqs, index)
|
|
90
90
|
next if new_req == old_req
|
|
91
91
|
|
|
92
92
|
T.let([new_req, old_req], RequirementChange)
|
|
@@ -99,6 +99,27 @@ module Dependabot
|
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
+
# Requirements and previous requirements are built in the same order, so
|
|
103
|
+
# pair them by position. The same package can be declared more than once
|
|
104
|
+
# in one file and group (e.g. with different environment markers), so
|
|
105
|
+
# matching on file and groups alone can pick the wrong declaration.
|
|
106
|
+
sig do
|
|
107
|
+
params(
|
|
108
|
+
new_req: Dependabot::DependencyRequirement,
|
|
109
|
+
previous_reqs: T::Array[Dependabot::DependencyRequirement],
|
|
110
|
+
index: Integer
|
|
111
|
+
).returns(T.nilable(Dependabot::DependencyRequirement))
|
|
112
|
+
end
|
|
113
|
+
def matching_previous_requirement(new_req, previous_reqs, index)
|
|
114
|
+
positional = previous_reqs[index]
|
|
115
|
+
if previous_reqs.length == dependency.requirements.length &&
|
|
116
|
+
positional&.file == new_req.file && positional&.groups == new_req.groups
|
|
117
|
+
return positional
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
previous_reqs.find { |r| r.file == new_req.file && r.groups == new_req.groups }
|
|
121
|
+
end
|
|
122
|
+
|
|
102
123
|
sig do
|
|
103
124
|
params(
|
|
104
125
|
content: String,
|
|
@@ -420,6 +420,8 @@ module Dependabot
|
|
|
420
420
|
local_description = metadata.description
|
|
421
421
|
has_library_metadata = !local_description.nil?
|
|
422
422
|
|
|
423
|
+
return has_library_metadata if credentials.any? { |c| c["type"] == "python_index" && c.replaces_base? }
|
|
424
|
+
|
|
423
425
|
begin
|
|
424
426
|
response = Dependabot::RegistryClient.get(
|
|
425
427
|
url: "https://pypi.org/pypi/#{normalised_name(name)}/json/"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-python
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.402.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.402.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.402.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -331,7 +331,7 @@ licenses:
|
|
|
331
331
|
- MIT
|
|
332
332
|
metadata:
|
|
333
333
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
334
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
334
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.402.0
|
|
335
335
|
rdoc_options: []
|
|
336
336
|
require_paths:
|
|
337
337
|
- lib
|