dependabot-python 0.199.0 → 0.201.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe06a7e603a96cbfa88516081259862bf8cd2eaf1d03e26b01bafe57094fe2a9
|
4
|
+
data.tar.gz: 7941b264c4d82aa6ba453992f0a59336b581bdd1075a59e38ed33e3c8ad88267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c2f3a131c9653faff986e6dfdffde317610e249b5f3e288ca78e17f7156bfca5c9a3ad446da50ad0905a4b81dc50820796bf06bee359754a2718d20a047d8a
|
7
|
+
data.tar.gz: ed834c6b86378ba62480d337b6de73f1a4bfce2b6eaab6b6923b524e9084ab5883b906e5257f939681bb1178dee54fd05611d218a2240037676cfb884df26d51
|
@@ -290,7 +290,10 @@ module Dependabot
|
|
290
290
|
fetch_submodules: true
|
291
291
|
).tap { |f| f.support_file = true }
|
292
292
|
rescue Dependabot::DependencyFileNotFound
|
293
|
-
|
293
|
+
# For Poetry projects attempt to fetch a pyproject.toml at the
|
294
|
+
# given path instead of a setup.py. We do not require a
|
295
|
+
# setup.py to be present, so if none can be found, simply return
|
296
|
+
return [] unless allow_pyproject
|
294
297
|
|
295
298
|
fetch_file_from_host(
|
296
299
|
path.gsub("setup.py", "pyproject.toml"),
|
@@ -5,7 +5,7 @@ require "uri"
|
|
5
5
|
|
6
6
|
require "dependabot/metadata_finders"
|
7
7
|
require "dependabot/metadata_finders/base"
|
8
|
-
require "dependabot/
|
8
|
+
require "dependabot/registry_client"
|
9
9
|
require "dependabot/python/authed_url_builder"
|
10
10
|
require "dependabot/python/name_normaliser"
|
11
11
|
|
@@ -65,11 +65,7 @@ module Dependabot
|
|
65
65
|
@source_from_description ||=
|
66
66
|
potential_source_urls.find do |url|
|
67
67
|
full_url = Source.from_url(url).url
|
68
|
-
response =
|
69
|
-
full_url,
|
70
|
-
idempotent: true,
|
71
|
-
**SharedHelpers.excon_defaults
|
72
|
-
)
|
68
|
+
response = Dependabot::RegistryClient.get(url: full_url)
|
73
69
|
next unless response.status == 200
|
74
70
|
|
75
71
|
response.body.include?(normalised_dependency_name)
|
@@ -94,11 +90,7 @@ module Dependabot
|
|
94
90
|
@source_from_homepage ||=
|
95
91
|
potential_source_urls.find do |url|
|
96
92
|
full_url = Source.from_url(url).url
|
97
|
-
response =
|
98
|
-
full_url,
|
99
|
-
idempotent: true,
|
100
|
-
**SharedHelpers.excon_defaults
|
101
|
-
)
|
93
|
+
response = Dependabot::RegistryClient.get(url: full_url)
|
102
94
|
next unless response.status == 200
|
103
95
|
|
104
96
|
response.body.include?(normalised_dependency_name)
|
@@ -116,11 +108,7 @@ module Dependabot
|
|
116
108
|
|
117
109
|
@homepage_response ||=
|
118
110
|
begin
|
119
|
-
|
120
|
-
homepage_url,
|
121
|
-
idempotent: true,
|
122
|
-
**SharedHelpers.excon_defaults
|
123
|
-
)
|
111
|
+
Dependabot::RegistryClient.get(url: homepage_url)
|
124
112
|
rescue Excon::Error::Timeout, Excon::Error::Socket,
|
125
113
|
Excon::Error::TooManyRedirects, ArgumentError
|
126
114
|
nil
|
@@ -153,15 +141,15 @@ module Dependabot
|
|
153
141
|
Regexp.last_match.captures[1].include?("@")
|
154
142
|
protocol, user, pass, url = Regexp.last_match.captures
|
155
143
|
|
156
|
-
|
157
|
-
"#{protocol}://#{url}",
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
144
|
+
Dependabot::RegistryClient.get(
|
145
|
+
url: "#{protocol}://#{url}",
|
146
|
+
options: {
|
147
|
+
user: user,
|
148
|
+
password: pass
|
149
|
+
}
|
162
150
|
)
|
163
151
|
else
|
164
|
-
|
152
|
+
Dependabot::RegistryClient.get(url: url)
|
165
153
|
end
|
166
154
|
end
|
167
155
|
|
@@ -7,7 +7,7 @@ require "nokogiri"
|
|
7
7
|
require "dependabot/dependency"
|
8
8
|
require "dependabot/python/update_checker"
|
9
9
|
require "dependabot/update_checkers/version_filters"
|
10
|
-
require "dependabot/
|
10
|
+
require "dependabot/registry_client"
|
11
11
|
require "dependabot/python/authed_url_builder"
|
12
12
|
require "dependabot/python/name_normaliser"
|
13
13
|
|
@@ -214,18 +214,16 @@ module Dependabot
|
|
214
214
|
end
|
215
215
|
|
216
216
|
def registry_response_for_dependency(index_url)
|
217
|
-
|
218
|
-
index_url + normalised_name + "/",
|
219
|
-
|
220
|
-
**SharedHelpers.excon_defaults(headers: { "Accept" => "text/html" })
|
217
|
+
Dependabot::RegistryClient.get(
|
218
|
+
url: index_url + normalised_name + "/",
|
219
|
+
headers: { "Accept" => "text/html" }
|
221
220
|
)
|
222
221
|
end
|
223
222
|
|
224
223
|
def registry_index_response(index_url)
|
225
|
-
|
226
|
-
index_url,
|
227
|
-
|
228
|
-
**SharedHelpers.excon_defaults(headers: { "Accept" => "text/html" })
|
224
|
+
Dependabot::RegistryClient.get(
|
225
|
+
url: index_url,
|
226
|
+
headers: { "Accept" => "text/html" }
|
229
227
|
)
|
230
228
|
end
|
231
229
|
|
@@ -6,7 +6,7 @@ require "toml-rb"
|
|
6
6
|
require "dependabot/dependency"
|
7
7
|
require "dependabot/update_checkers"
|
8
8
|
require "dependabot/update_checkers/base"
|
9
|
-
require "dependabot/
|
9
|
+
require "dependabot/registry_client"
|
10
10
|
require "dependabot/errors"
|
11
11
|
require "dependabot/python/requirement"
|
12
12
|
require "dependabot/python/requirement_parser"
|
@@ -274,10 +274,8 @@ module Dependabot
|
|
274
274
|
details = TomlRB.parse(pyproject.content).dig("tool", "poetry")
|
275
275
|
return false unless details
|
276
276
|
|
277
|
-
index_response =
|
278
|
-
"https://pypi.org/pypi/#{normalised_name(details['name'])}/json/"
|
279
|
-
idempotent: true,
|
280
|
-
**SharedHelpers.excon_defaults
|
277
|
+
index_response = Dependabot::RegistryClient.get(
|
278
|
+
url: "https://pypi.org/pypi/#{normalised_name(details['name'])}/json/"
|
281
279
|
)
|
282
280
|
|
283
281
|
return false unless index_response.status == 200
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.201.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.201.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.201.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debase
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|