dependabot-python 0.106.22 → 0.106.23
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 +4 -4
- data/lib/dependabot/python/file_updater/pip_compile_file_updater.rb +11 -0
- data/lib/dependabot/python/file_updater/pipfile_file_updater.rb +11 -1
- data/lib/dependabot/python/file_updater/poetry_file_updater.rb +14 -2
- data/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb +11 -0
- data/lib/dependabot/python/update_checker/pipenv_version_resolver.rb +11 -1
- data/lib/dependabot/python/update_checker/poetry_version_resolver.rb +14 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4f43ca6e03a3165737008db1c14863d6a8605723bac69955130e8f68d0d5aa0
|
4
|
+
data.tar.gz: b8bc081bc2921dda414743801885c012414fa571c15036261cd30df8bc912ee7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f03815b87e1a33ef5522553f27488af10bf4f89f623cdf6997fc10c70ebf075eda87e943442bbf1c5220164f65d5e49a564d8fbd2d7ce87af714ea39451d82f
|
7
|
+
data.tar.gz: d038fbc33cee062fa0fdd79523b327ca79397d4d43a291032c6ea75de4ad5de99f420722c8e0cf93904afffb4c841c67c16c66d58b4cb5e0456df49d1627c9aa
|
@@ -555,6 +555,7 @@ module Dependabot
|
|
555
555
|
|
556
556
|
def user_specified_python_version
|
557
557
|
file_version = python_version_file&.content&.strip
|
558
|
+
file_version ||= runtime_file_python_version
|
558
559
|
|
559
560
|
return unless file_version
|
560
561
|
return unless pyenv_versions.include?("#{file_version}\n")
|
@@ -562,6 +563,12 @@ module Dependabot
|
|
562
563
|
file_version
|
563
564
|
end
|
564
565
|
|
566
|
+
def runtime_file_python_version
|
567
|
+
return unless runtime_file
|
568
|
+
|
569
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
570
|
+
end
|
571
|
+
|
565
572
|
def pyenv_versions
|
566
573
|
@pyenv_versions ||= run_command("pyenv install --list")
|
567
574
|
end
|
@@ -585,6 +592,10 @@ module Dependabot
|
|
585
592
|
def python_version_file
|
586
593
|
dependency_files.find { |f| f.name == ".python-version" }
|
587
594
|
end
|
595
|
+
|
596
|
+
def runtime_file
|
597
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
598
|
+
end
|
588
599
|
end
|
589
600
|
# rubocop:enable Metrics/ClassLength
|
590
601
|
end
|
@@ -389,7 +389,7 @@ module Dependabot
|
|
389
389
|
return pipfile_python_requirement
|
390
390
|
end
|
391
391
|
|
392
|
-
python_version_file_version
|
392
|
+
python_version_file_version || runtime_file_python_version
|
393
393
|
end
|
394
394
|
|
395
395
|
def python_version_file_version
|
@@ -401,6 +401,12 @@ module Dependabot
|
|
401
401
|
file_version
|
402
402
|
end
|
403
403
|
|
404
|
+
def runtime_file_python_version
|
405
|
+
return unless runtime_file
|
406
|
+
|
407
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
408
|
+
end
|
409
|
+
|
404
410
|
def pyenv_versions
|
405
411
|
@pyenv_versions ||= run_command("pyenv install --list")
|
406
412
|
end
|
@@ -468,6 +474,10 @@ module Dependabot
|
|
468
474
|
dependency_files.find { |f| f.name == ".python-version" }
|
469
475
|
end
|
470
476
|
|
477
|
+
def runtime_file
|
478
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
479
|
+
end
|
480
|
+
|
471
481
|
def pipenv_env_variables
|
472
482
|
{
|
473
483
|
"PIPENV_YES" => "true", # Install new Python ver if needed
|
@@ -232,11 +232,13 @@ module Dependabot
|
|
232
232
|
poetry_object&.dig("dependencies", "python") ||
|
233
233
|
poetry_object&.dig("dev-dependencies", "python")
|
234
234
|
|
235
|
-
|
235
|
+
unless requirement
|
236
|
+
return python_version_file_version || runtime_file_python_version
|
237
|
+
end
|
236
238
|
|
237
239
|
requirements = Python::Requirement.requirements_array(requirement)
|
238
240
|
|
239
|
-
PythonVersions::
|
241
|
+
PythonVersions::SUPPORTED_VERSIONS_TO_ITERATE.find do |version|
|
240
242
|
requirements.any? do |r|
|
241
243
|
r.satisfied_by?(Python::Version.new(version))
|
242
244
|
end
|
@@ -252,6 +254,12 @@ module Dependabot
|
|
252
254
|
file_version
|
253
255
|
end
|
254
256
|
|
257
|
+
def runtime_file_python_version
|
258
|
+
return unless runtime_file
|
259
|
+
|
260
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
261
|
+
end
|
262
|
+
|
255
263
|
def pyenv_versions
|
256
264
|
@pyenv_versions ||= run_poetry_command("pyenv install --list")
|
257
265
|
end
|
@@ -318,6 +326,10 @@ module Dependabot
|
|
318
326
|
def python_version_file
|
319
327
|
dependency_files.find { |f| f.name == ".python-version" }
|
320
328
|
end
|
329
|
+
|
330
|
+
def runtime_file
|
331
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
332
|
+
end
|
321
333
|
end
|
322
334
|
end
|
323
335
|
end
|
@@ -435,6 +435,7 @@ module Dependabot
|
|
435
435
|
|
436
436
|
def user_specified_python_version
|
437
437
|
file_version = python_version_file&.content&.strip
|
438
|
+
file_version ||= runtime_file_python_version
|
438
439
|
|
439
440
|
return unless file_version
|
440
441
|
return unless pyenv_versions.include?("#{file_version}\n")
|
@@ -442,6 +443,12 @@ module Dependabot
|
|
442
443
|
file_version
|
443
444
|
end
|
444
445
|
|
446
|
+
def runtime_file_python_version
|
447
|
+
return unless runtime_file
|
448
|
+
|
449
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
450
|
+
end
|
451
|
+
|
445
452
|
def pyenv_versions
|
446
453
|
@pyenv_versions ||= run_command("pyenv install --list")
|
447
454
|
end
|
@@ -465,6 +472,10 @@ module Dependabot
|
|
465
472
|
def python_version_file
|
466
473
|
dependency_files.find { |f| f.name == ".python-version" }
|
467
474
|
end
|
475
|
+
|
476
|
+
def runtime_file
|
477
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
478
|
+
end
|
468
479
|
end
|
469
480
|
# rubocop:enable Metrics/ClassLength
|
470
481
|
end
|
@@ -413,7 +413,7 @@ module Dependabot
|
|
413
413
|
return pipfile_python_requirement
|
414
414
|
end
|
415
415
|
|
416
|
-
python_version_file_version
|
416
|
+
python_version_file_version || runtime_file_python_version
|
417
417
|
end
|
418
418
|
|
419
419
|
def python_version_file_version
|
@@ -425,6 +425,12 @@ module Dependabot
|
|
425
425
|
file_version
|
426
426
|
end
|
427
427
|
|
428
|
+
def runtime_file_python_version
|
429
|
+
return unless runtime_file
|
430
|
+
|
431
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
432
|
+
end
|
433
|
+
|
428
434
|
def pyenv_versions
|
429
435
|
@pyenv_versions ||= run_command("pyenv install --list")
|
430
436
|
end
|
@@ -562,6 +568,10 @@ module Dependabot
|
|
562
568
|
def python_version_file
|
563
569
|
dependency_files.find { |f| f.name == ".python-version" }
|
564
570
|
end
|
571
|
+
|
572
|
+
def runtime_file
|
573
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
574
|
+
end
|
565
575
|
end
|
566
576
|
end
|
567
577
|
end
|
@@ -169,12 +169,14 @@ module Dependabot
|
|
169
169
|
poetry_object&.dig("dependencies", "python") ||
|
170
170
|
poetry_object&.dig("dev-dependencies", "python")
|
171
171
|
|
172
|
-
|
172
|
+
unless requirement
|
173
|
+
return python_version_file_version || runtime_file_python_version
|
174
|
+
end
|
173
175
|
|
174
176
|
requirements =
|
175
177
|
Python::Requirement.requirements_array(requirement)
|
176
178
|
|
177
|
-
version = PythonVersions::
|
179
|
+
version = PythonVersions::SUPPORTED_VERSIONS_TO_ITERATE.find do |v|
|
178
180
|
requirements.any? { |r| r.satisfied_by?(Python::Version.new(v)) }
|
179
181
|
end
|
180
182
|
return version if version
|
@@ -195,6 +197,12 @@ module Dependabot
|
|
195
197
|
file_version
|
196
198
|
end
|
197
199
|
|
200
|
+
def runtime_file_python_version
|
201
|
+
return unless runtime_file
|
202
|
+
|
203
|
+
runtime_file.content.match(/(?<=python-).*/)&.to_s&.strip
|
204
|
+
end
|
205
|
+
|
198
206
|
def pyenv_versions
|
199
207
|
@pyenv_versions ||= run_poetry_command("pyenv install --list")
|
200
208
|
end
|
@@ -310,6 +318,10 @@ module Dependabot
|
|
310
318
|
dependency_files.find { |f| f.name == ".python-version" }
|
311
319
|
end
|
312
320
|
|
321
|
+
def runtime_file
|
322
|
+
dependency_files.find { |f| f.name.end_with?("runtime.txt") }
|
323
|
+
end
|
324
|
+
|
313
325
|
def run_poetry_command(command)
|
314
326
|
start = Time.now
|
315
327
|
command = SharedHelpers.escape_command(command)
|
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.106.
|
4
|
+
version: 0.106.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.106.
|
19
|
+
version: 0.106.23
|
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.106.
|
26
|
+
version: 0.106.23
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|