dependabot-python 0.390.0 → 0.391.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 +4 -4
- data/lib/dependabot/python/authed_url_builder.rb +2 -1
- data/lib/dependabot/python/dependency_grapher/requirements_layers.rb +4 -4
- data/lib/dependabot/python/file_fetcher.rb +1 -1
- data/lib/dependabot/python/file_parser/python_requirement_parser.rb +2 -2
- data/lib/dependabot/python/file_updater/pip_compile_file_updater.rb +16 -21
- data/lib/dependabot/python/file_updater/pipfile_file_updater.rb +1 -1
- data/lib/dependabot/python/file_updater/poetry_file_updater.rb +1 -1
- data/lib/dependabot/python/file_updater/pyproject_preparer.rb +2 -5
- data/lib/dependabot/python/file_updater/requirement_file_updater.rb +4 -4
- data/lib/dependabot/python/file_updater/requirement_replacer.rb +5 -5
- data/lib/dependabot/python/file_updater/setup_file_sanitizer.rb +2 -2
- data/lib/dependabot/python/package/package_registry_finder.rb +3 -3
- data/lib/dependabot/python/poetry_plugin_installer.rb +1 -1
- data/lib/dependabot/python/requirement.rb +9 -6
- data/lib/dependabot/python/shared_file_fetcher.rb +5 -5
- data/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb +15 -17
- data/lib/dependabot/python/update_checker/pipenv_version_resolver.rb +4 -4
- data/lib/dependabot/python/update_checker/poetry_version_resolver.rb +6 -6
- data/lib/dependabot/python/update_checker/requirements_updater.rb +5 -5
- data/lib/dependabot/python/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52f2cde620dcbabcf87eb9cbd827b7008699eb6132926fd3d7ace0d4d331586e
|
|
4
|
+
data.tar.gz: dde99d06a325a2cd4cb0f9f70027369797cabc171fa7753beccd9dd9c9d647d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c0e331e9893ce5b246313c77cf7820992b32360c264f7544f605893a83d7b84cb9cc37fdaf8917e2b42bda2b56704d96968415e95b35b4cd465cdcdd68d317d
|
|
7
|
+
data.tar.gz: e6f99d3ed5613acd2692c38fc44af578c57284d3297759dae6f5db464a16c4d57cbbc63b098368bdfea9060f2300ae2230647ace91c62c56385c16b33244071f
|
|
@@ -17,7 +17,8 @@ module Dependabot
|
|
|
17
17
|
return url unless token
|
|
18
18
|
|
|
19
19
|
basic_auth_details =
|
|
20
|
-
if token.ascii_only? && token.include?(":")
|
|
20
|
+
if token.ascii_only? && token.include?(":")
|
|
21
|
+
token
|
|
21
22
|
elsif Base64.decode64(token).ascii_only? &&
|
|
22
23
|
Base64.decode64(token).include?(":")
|
|
23
24
|
Base64.decode64(token)
|
|
@@ -29,24 +29,24 @@ module Dependabot
|
|
|
29
29
|
# Matches "requirements" preceded by a hyphen, period, underscore, start-of-string, or slash,
|
|
30
30
|
# followed by non-whitespace chars and ".txt".
|
|
31
31
|
# Examples: requirements.txt, requirements.prod.txt, requirements/production.txt
|
|
32
|
-
REQUIREMENTS_TXT_REGEX =
|
|
32
|
+
REQUIREMENTS_TXT_REGEX = %r{(?:[-._]|^|/)requirements[^\s]*\.txt$}i
|
|
33
33
|
|
|
34
34
|
# More lenient: matches "require" at the start of the filename or after a hyphen/period/underscore/
|
|
35
35
|
# slash delimiter, with an optional hyphen/underscore/slash suffix. The leading delimiter prevents
|
|
36
36
|
# matching "require" as a substring of another word (e.g. "prequire.txt", "acquire.txt").
|
|
37
37
|
# Examples: require.txt, require-test.txt, py3-require.txt, pyenv_require_e2e.txt
|
|
38
|
-
REQUIRE_TXT_REGEX =
|
|
38
|
+
REQUIRE_TXT_REGEX = %r{(?:[-._]|^|/)require(?:[-_/][^\s.]*)?\.txt$}i
|
|
39
39
|
|
|
40
40
|
# Matches "dependencies" / "dependency" preceded by a hyphen, period, underscore,
|
|
41
41
|
# start-of-string, or slash, followed by non-whitespace chars and ".txt".
|
|
42
42
|
# Examples: dependencies.txt, my-dependencies.txt, dependencies/python/ansible-lint.txt
|
|
43
|
-
DEPENDENCIES_TXT_REGEX =
|
|
43
|
+
DEPENDENCIES_TXT_REGEX = %r{(?:[-._]|^|/)dependenc(?:y|ies)[^\s]*\.txt$}i
|
|
44
44
|
|
|
45
45
|
# More lenient: matches "depend" / "depends" at the start of the filename or after a hyphen/period/
|
|
46
46
|
# underscore/slash delimiter, with an optional hyphen/underscore/slash suffix. The leading delimiter
|
|
47
47
|
# prevents matching "depend" as a substring of another word (e.g. "codependent.txt").
|
|
48
48
|
# Examples: depend.txt, depends.txt, depend-test.txt, py3-depends.txt
|
|
49
|
-
DEPEND_TXT_REGEX =
|
|
49
|
+
DEPEND_TXT_REGEX = %r{(?:[-._]|^|/)depend(?:s)?(?:[-_/][^\s.]*)?\.txt$}i
|
|
50
50
|
|
|
51
51
|
# Whether a .txt filename looks like a real pip manifest rather than an unrelated .txt file.
|
|
52
52
|
sig { params(path: String).returns(T::Boolean) }
|
|
@@ -15,7 +15,7 @@ module Dependabot
|
|
|
15
15
|
class FileFetcher < Dependabot::Python::SharedFileFetcher
|
|
16
16
|
extend T::Sig
|
|
17
17
|
|
|
18
|
-
ECOSYSTEM_SPECIFIC_FILES =
|
|
18
|
+
ECOSYSTEM_SPECIFIC_FILES = %w(Pipfile setup.py setup.cfg).freeze
|
|
19
19
|
|
|
20
20
|
sig { override.returns(T::Array[String]) }
|
|
21
21
|
def self.ecosystem_specific_required_files
|
|
@@ -114,7 +114,7 @@ module Dependabot
|
|
|
114
114
|
end.reject(&:empty?)
|
|
115
115
|
|
|
116
116
|
file_version = content_lines.first
|
|
117
|
-
return if file_version
|
|
117
|
+
return if file_version && file_version.empty?
|
|
118
118
|
return unless T.must(pyenv_versions).include?("#{file_version}\n")
|
|
119
119
|
|
|
120
120
|
file_version
|
|
@@ -126,7 +126,7 @@ module Dependabot
|
|
|
126
126
|
|
|
127
127
|
file_version = T.must(T.must(runtime_file).content)
|
|
128
128
|
.match(/(?<=python-).*/)&.to_s&.strip
|
|
129
|
-
return if file_version
|
|
129
|
+
return if file_version && file_version.empty?
|
|
130
130
|
return unless T.must(pyenv_versions).include?("#{file_version}\n")
|
|
131
131
|
|
|
132
132
|
file_version
|
|
@@ -25,23 +25,18 @@ module Dependabot
|
|
|
25
25
|
require_relative "requirement_file_updater"
|
|
26
26
|
require_relative "setup_file_sanitizer"
|
|
27
27
|
|
|
28
|
-
UNSAFE_PACKAGES =
|
|
29
|
-
INCOMPATIBLE_VERSIONS_REGEX =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Regexp::MULTILINE
|
|
34
|
-
),
|
|
35
|
-
Regexp
|
|
36
|
-
)
|
|
37
|
-
WARNINGS = T.let(/\s*# WARNING:.*\Z/m, Regexp)
|
|
38
|
-
UNSAFE_NOTE = T.let(/\s*# The following packages are considered to be unsafe.*\Z/m, Regexp)
|
|
39
|
-
RESOLVER_REGEX = T.let(/(?<=--resolver=)(\w+)/, Regexp)
|
|
40
|
-
UNSAFE_PACKAGE_OPTION_REGEX = T.let(/--unsafe-package(?:=|\s+)(?<name>[^\s\\]+)/, Regexp)
|
|
41
|
-
NATIVE_COMPILATION_ERROR = T.let(
|
|
42
|
-
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1",
|
|
43
|
-
String
|
|
28
|
+
UNSAFE_PACKAGES = %w(setuptools distribute pip).freeze
|
|
29
|
+
INCOMPATIBLE_VERSIONS_REGEX = Regexp.new(
|
|
30
|
+
"(?:not supported between instances of 'InstallationCandidate'" \
|
|
31
|
+
"|There are incompatible versions in the resolved dependencies).*\\z",
|
|
32
|
+
Regexp::MULTILINE
|
|
44
33
|
)
|
|
34
|
+
WARNINGS = /\s*# WARNING:.*\Z/m
|
|
35
|
+
UNSAFE_NOTE = /\s*# The following packages are considered to be unsafe.*\Z/m
|
|
36
|
+
RESOLVER_REGEX = /(?<=--resolver=)(\w+)/
|
|
37
|
+
UNSAFE_PACKAGE_OPTION_REGEX = /--unsafe-package(?:=|\s+)(?<name>[^\s\\]+)/
|
|
38
|
+
NATIVE_COMPILATION_ERROR =
|
|
39
|
+
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1"
|
|
45
40
|
|
|
46
41
|
sig { returns(T::Array[Dependabot::Dependency]) }
|
|
47
42
|
attr_reader :dependencies
|
|
@@ -60,10 +55,10 @@ module Dependabot
|
|
|
60
55
|
index_urls: T.nilable(T::Array[T.nilable(String)])
|
|
61
56
|
).void
|
|
62
57
|
end
|
|
63
|
-
def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil)
|
|
64
|
-
@dependencies =
|
|
65
|
-
@dependency_files =
|
|
66
|
-
@index_urls =
|
|
58
|
+
def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil)
|
|
59
|
+
@dependencies = dependencies
|
|
60
|
+
@dependency_files = dependency_files
|
|
61
|
+
@index_urls = index_urls
|
|
67
62
|
@build_isolation = T.let(true, T::Boolean)
|
|
68
63
|
@sanitized_setup_file_content = T.let({}, T::Hash[String, String])
|
|
69
64
|
@requirement_map = T.let(nil, T.nilable(T::Hash[String, T::Array[String]]))
|
|
@@ -73,7 +68,7 @@ module Dependabot
|
|
|
73
68
|
@setup_cfg_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
|
|
74
69
|
@pip_compile_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
|
|
75
70
|
@compiled_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
|
|
76
|
-
@credentials =
|
|
71
|
+
@credentials = credentials
|
|
77
72
|
end
|
|
78
73
|
|
|
79
74
|
sig { returns(T.nilable(T::Array[Dependabot::DependencyFile])) }
|
|
@@ -22,7 +22,7 @@ module Dependabot
|
|
|
22
22
|
require_relative "pipfile_manifest_updater"
|
|
23
23
|
require_relative "setup_file_sanitizer"
|
|
24
24
|
|
|
25
|
-
DEPENDENCY_TYPES =
|
|
25
|
+
DEPENDENCY_TYPES = %w(packages dev-packages).freeze
|
|
26
26
|
|
|
27
27
|
sig { returns(T::Array[Dependabot::Dependency]) }
|
|
28
28
|
attr_reader :dependencies
|
|
@@ -45,7 +45,7 @@ module Dependabot
|
|
|
45
45
|
@dependencies = dependencies
|
|
46
46
|
@dependency_files = dependency_files
|
|
47
47
|
@credentials = credentials
|
|
48
|
-
@cooldown =
|
|
48
|
+
@cooldown = cooldown
|
|
49
49
|
@updated_dependency_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
|
|
50
50
|
@prepared_pyproject = T.let(nil, T.nilable(String))
|
|
51
51
|
@pyproject = T.let(nil, T.nilable(Dependabot::DependencyFile))
|
|
@@ -18,10 +18,7 @@ module Dependabot
|
|
|
18
18
|
|
|
19
19
|
# Fixed regex for extracting the name+extras prefix from a PEP 508 entry.
|
|
20
20
|
# Does not interpolate library input, avoiding polynomial backtracking.
|
|
21
|
-
PEP508_PREFIX =
|
|
22
|
-
/\A(?<prefix>(?<name>[a-zA-Z0-9](?:[a-zA-Z0-9._-]*[a-zA-Z0-9])?)(?:\[[^\]]*\])?)/i,
|
|
23
|
-
Regexp
|
|
24
|
-
)
|
|
21
|
+
PEP508_PREFIX = /\A(?<prefix>(?<name>[a-zA-Z0-9](?:[a-zA-Z0-9._-]*[a-zA-Z0-9])?)(?:\[[^\]]*\])?)/i
|
|
25
22
|
|
|
26
23
|
# Pins a single PEP 508 dependency entry string to a specific version,
|
|
27
24
|
# preserving extras and environment markers.
|
|
@@ -142,7 +139,7 @@ module Dependabot
|
|
|
142
139
|
.gsub('#{', "{")
|
|
143
140
|
end
|
|
144
141
|
|
|
145
|
-
UNSUPPORTED_SOURCE_TYPES =
|
|
142
|
+
UNSUPPORTED_SOURCE_TYPES = %w(directory file url).freeze
|
|
146
143
|
|
|
147
144
|
sig { params(dependencies: T::Array[Dependabot::Dependency]).returns(String) }
|
|
148
145
|
def freeze_top_level_dependencies_except(dependencies)
|
|
@@ -33,10 +33,10 @@ module Dependabot
|
|
|
33
33
|
).void
|
|
34
34
|
end
|
|
35
35
|
def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil)
|
|
36
|
-
@dependencies =
|
|
37
|
-
@dependency_files =
|
|
38
|
-
@credentials =
|
|
39
|
-
@index_urls =
|
|
36
|
+
@dependencies = dependencies
|
|
37
|
+
@dependency_files = dependency_files
|
|
38
|
+
@credentials = credentials
|
|
39
|
+
@index_urls = index_urls
|
|
40
40
|
@updated_dependency_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -37,12 +37,12 @@ module Dependabot
|
|
|
37
37
|
new_hash_version: nil,
|
|
38
38
|
index_urls: nil
|
|
39
39
|
)
|
|
40
|
-
@content =
|
|
40
|
+
@content = content
|
|
41
41
|
@dependency_name = T.let(normalise(dependency_name), String)
|
|
42
|
-
@old_requirement =
|
|
43
|
-
@new_requirement =
|
|
44
|
-
@new_hash_version =
|
|
45
|
-
@index_urls =
|
|
42
|
+
@old_requirement = old_requirement
|
|
43
|
+
@new_requirement = new_requirement
|
|
44
|
+
@new_hash_version = new_hash_version
|
|
45
|
+
@index_urls = index_urls
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
sig { returns(String) }
|
|
@@ -20,8 +20,8 @@ module Dependabot
|
|
|
20
20
|
).void
|
|
21
21
|
end
|
|
22
22
|
def initialize(setup_file:, setup_cfg:)
|
|
23
|
-
@setup_file =
|
|
24
|
-
@setup_cfg =
|
|
23
|
+
@setup_file = setup_file
|
|
24
|
+
@setup_cfg = setup_cfg
|
|
25
25
|
@install_requires_array = T.let(nil, T.nilable(T::Array[String]))
|
|
26
26
|
@setup_requires_array = T.let(nil, T.nilable(T::Array[String]))
|
|
27
27
|
@extras_require_hash = T.let(nil, T.nilable(T::Hash[String, T::Array[String]]))
|
|
@@ -25,9 +25,9 @@ module Dependabot
|
|
|
25
25
|
).void
|
|
26
26
|
end
|
|
27
27
|
def initialize(dependency_files:, credentials:, dependency:)
|
|
28
|
-
@dependency_files =
|
|
29
|
-
@credentials =
|
|
30
|
-
@dependency =
|
|
28
|
+
@dependency_files = dependency_files
|
|
29
|
+
@credentials = credentials
|
|
30
|
+
@dependency = dependency
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
sig { returns(T::Array[String]) }
|
|
@@ -27,7 +27,7 @@ module Dependabot
|
|
|
27
27
|
|
|
28
28
|
sig { params(pyproject_content: T.nilable(String)).void }
|
|
29
29
|
def initialize(pyproject_content:)
|
|
30
|
-
@pyproject_content =
|
|
30
|
+
@pyproject_content = pyproject_content
|
|
31
31
|
@plugins_installed = T.let(false, T::Boolean)
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -12,7 +12,7 @@ module Dependabot
|
|
|
12
12
|
class Requirement < Dependabot::Requirement
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
|
-
OR_SEPARATOR =
|
|
15
|
+
OR_SEPARATOR = /(?<=[a-zA-Z0-9)*])\s*\|+/
|
|
16
16
|
|
|
17
17
|
# Add equality and arbitrary-equality matchers
|
|
18
18
|
OPS = T.let(
|
|
@@ -28,8 +28,8 @@ module Dependabot
|
|
|
28
28
|
version_pattern = Python::Version::VERSION_PATTERN
|
|
29
29
|
|
|
30
30
|
PATTERN_RAW = T.let("\\s*(?<op>#{quoted})?\\s*(?<version>#{version_pattern})\\s*".freeze, String)
|
|
31
|
-
PATTERN =
|
|
32
|
-
PARENS_PATTERN =
|
|
31
|
+
PATTERN = /\A#{PATTERN_RAW}\z/
|
|
32
|
+
PARENS_PATTERN = /\A\(([^)]+)\)\z/
|
|
33
33
|
|
|
34
34
|
sig { params(obj: T.any(Gem::Version, String)).returns([String, Gem::Version]) }
|
|
35
35
|
def self.parse(obj)
|
|
@@ -107,11 +107,14 @@ module Dependabot
|
|
|
107
107
|
req_string = req_string.gsub("~=", "~>")
|
|
108
108
|
req_string = req_string.gsub(/(?<=\d)[<=>].*\Z/, "")
|
|
109
109
|
|
|
110
|
-
if req_string.match?(/~[^>]/)
|
|
111
|
-
|
|
110
|
+
if req_string.match?(/~[^>]/)
|
|
111
|
+
convert_tilde_req(req_string)
|
|
112
|
+
elsif req_string.start_with?("^")
|
|
113
|
+
convert_caret_req(req_string)
|
|
112
114
|
elsif req_string.match?(/^=?={0,2}\s*\d+\.\d+(\.\d+)?(-[a-z0-9.-]+)?(\.\*)?$/i)
|
|
113
115
|
convert_exact(req_string)
|
|
114
|
-
elsif req_string.include?(".*")
|
|
116
|
+
elsif req_string.include?(".*")
|
|
117
|
+
convert_wildcard(req_string)
|
|
115
118
|
else
|
|
116
119
|
req_string
|
|
117
120
|
end
|
|
@@ -21,10 +21,10 @@ module Dependabot
|
|
|
21
21
|
|
|
22
22
|
abstract!
|
|
23
23
|
|
|
24
|
-
CHILD_REQUIREMENT_REGEX =
|
|
25
|
-
CONSTRAINT_REGEX =
|
|
26
|
-
DEPENDENCY_TYPES =
|
|
27
|
-
MAX_FILE_SIZE =
|
|
24
|
+
CHILD_REQUIREMENT_REGEX = /^-r\s?(?<path>.*\.(?:txt|in))/
|
|
25
|
+
CONSTRAINT_REGEX = /^-c\s?(?<path>.*\.(?:txt|in))/
|
|
26
|
+
DEPENDENCY_TYPES = %w(packages dev-packages).freeze
|
|
27
|
+
MAX_FILE_SIZE = 500_000
|
|
28
28
|
|
|
29
29
|
sig { abstract.returns(T::Array[String]) }
|
|
30
30
|
def self.ecosystem_specific_required_files; end
|
|
@@ -34,7 +34,7 @@ module Dependabot
|
|
|
34
34
|
return true if filenames.any? { |name| name.end_with?(".txt", ".in") }
|
|
35
35
|
return true if filenames.include?("requirements")
|
|
36
36
|
return true if filenames.include?("pyproject.toml")
|
|
37
|
-
return true if filenames.
|
|
37
|
+
return true if filenames.intersect?(ecosystem_specific_required_files)
|
|
38
38
|
|
|
39
39
|
false
|
|
40
40
|
end
|
|
@@ -27,16 +27,14 @@ module Dependabot
|
|
|
27
27
|
class PipCompileVersionResolver # rubocop:disable Metrics/ClassLength
|
|
28
28
|
extend T::Sig
|
|
29
29
|
|
|
30
|
-
GIT_DEPENDENCY_UNREACHABLE_REGEX =
|
|
31
|
-
GIT_REFERENCE_NOT_FOUND_REGEX =
|
|
32
|
-
NATIVE_COMPILATION_ERROR =
|
|
33
|
-
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1"
|
|
34
|
-
String
|
|
35
|
-
)
|
|
30
|
+
GIT_DEPENDENCY_UNREACHABLE_REGEX = /git clone --filter=blob:none --quiet (?<url>[^\s]+).* /
|
|
31
|
+
GIT_REFERENCE_NOT_FOUND_REGEX = /Did not find branch or tag '(?<tag>[^\n"]+)'/m
|
|
32
|
+
NATIVE_COMPILATION_ERROR =
|
|
33
|
+
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1"
|
|
36
34
|
# See https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata
|
|
37
|
-
PYTHON_PACKAGE_NAME_REGEX =
|
|
38
|
-
RESOLUTION_IMPOSSIBLE_ERROR =
|
|
39
|
-
ERROR_REGEX =
|
|
35
|
+
PYTHON_PACKAGE_NAME_REGEX = /[A-Za-z0-9_\-]+/
|
|
36
|
+
RESOLUTION_IMPOSSIBLE_ERROR = "ResolutionImpossible"
|
|
37
|
+
ERROR_REGEX = /(?<=ERROR\:\W).*$/
|
|
40
38
|
|
|
41
39
|
sig { returns(Dependabot::Dependency) }
|
|
42
40
|
attr_reader :dependency
|
|
@@ -62,10 +60,10 @@ module Dependabot
|
|
|
62
60
|
).void
|
|
63
61
|
end
|
|
64
62
|
def initialize(dependency:, dependency_files:, credentials:, repo_contents_path:)
|
|
65
|
-
@dependency =
|
|
66
|
-
@dependency_files =
|
|
67
|
-
@credentials =
|
|
68
|
-
@repo_contents_path =
|
|
63
|
+
@dependency = dependency
|
|
64
|
+
@dependency_files = dependency_files
|
|
65
|
+
@credentials = credentials
|
|
66
|
+
@repo_contents_path = repo_contents_path
|
|
69
67
|
@build_isolation = T.let(true, T::Boolean)
|
|
70
68
|
@error_handler = T.let(PipCompileErrorHandler.new, PipCompileErrorHandler)
|
|
71
69
|
end
|
|
@@ -585,13 +583,13 @@ module Dependabot
|
|
|
585
583
|
class PipCompileErrorHandler
|
|
586
584
|
extend T::Sig
|
|
587
585
|
|
|
588
|
-
SUBPROCESS_ERROR =
|
|
586
|
+
SUBPROCESS_ERROR = /subprocess-exited-with-error/
|
|
589
587
|
|
|
590
|
-
INSTALLATION_ERROR =
|
|
588
|
+
INSTALLATION_ERROR = /InstallationError/
|
|
591
589
|
|
|
592
|
-
INSTALLATION_SUBPROCESS_ERROR =
|
|
590
|
+
INSTALLATION_SUBPROCESS_ERROR = /InstallationSubprocessError/
|
|
593
591
|
|
|
594
|
-
HASH_MISMATCH =
|
|
592
|
+
HASH_MISMATCH = /HashMismatch/
|
|
595
593
|
|
|
596
594
|
sig { params(error: String).void }
|
|
597
595
|
def handle_pipcompile_error(error)
|
|
@@ -56,10 +56,10 @@ module Dependabot
|
|
|
56
56
|
).void
|
|
57
57
|
end
|
|
58
58
|
def initialize(dependency:, dependency_files:, credentials:, repo_contents_path:)
|
|
59
|
-
@dependency =
|
|
60
|
-
@dependency_files =
|
|
61
|
-
@credentials =
|
|
62
|
-
@repo_contents_path =
|
|
59
|
+
@dependency = dependency
|
|
60
|
+
@dependency_files = dependency_files
|
|
61
|
+
@credentials = credentials
|
|
62
|
+
@repo_contents_path = repo_contents_path
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
sig { params(requirement: T.nilable(String)).returns(T.nilable(Dependabot::Python::Version)) }
|
|
@@ -78,10 +78,10 @@ module Dependabot
|
|
|
78
78
|
).void
|
|
79
79
|
end
|
|
80
80
|
def initialize(dependency:, dependency_files:, credentials:, repo_contents_path:)
|
|
81
|
-
@dependency =
|
|
82
|
-
@dependency_files =
|
|
83
|
-
@credentials =
|
|
84
|
-
@repo_contents_path =
|
|
81
|
+
@dependency = dependency
|
|
82
|
+
@dependency_files = dependency_files
|
|
83
|
+
@credentials = credentials
|
|
84
|
+
@repo_contents_path = repo_contents_path
|
|
85
85
|
@error_handler = T.let(
|
|
86
86
|
PoetryErrorHandler.new(dependencies: dependency, dependency_files: dependency_files),
|
|
87
87
|
Dependabot::Python::PoetryErrorHandler
|
|
@@ -490,8 +490,8 @@ module Dependabot
|
|
|
490
490
|
).void
|
|
491
491
|
end
|
|
492
492
|
def initialize(dependencies:, dependency_files:)
|
|
493
|
-
@dependencies =
|
|
494
|
-
@dependency_files =
|
|
493
|
+
@dependencies = dependencies
|
|
494
|
+
@dependency_files = dependency_files
|
|
495
495
|
end
|
|
496
496
|
|
|
497
497
|
private
|
|
@@ -16,9 +16,9 @@ module Dependabot
|
|
|
16
16
|
class RequirementsUpdater
|
|
17
17
|
extend T::Sig
|
|
18
18
|
|
|
19
|
-
PYPROJECT_OR_SEPARATOR =
|
|
20
|
-
PYPROJECT_SEPARATOR =
|
|
21
|
-
LOWER_BOUND_OPS =
|
|
19
|
+
PYPROJECT_OR_SEPARATOR = /(?<=[a-zA-Z0-9*])\s*\|+/
|
|
20
|
+
PYPROJECT_SEPARATOR = /#{PYPROJECT_OR_SEPARATOR}|,/
|
|
21
|
+
LOWER_BOUND_OPS = %w(> >=).freeze
|
|
22
22
|
|
|
23
23
|
class UnfixableRequirement < StandardError; end
|
|
24
24
|
|
|
@@ -52,8 +52,8 @@ module Dependabot
|
|
|
52
52
|
requirements.map { |req| Dependabot::DependencyRequirement.create(req) },
|
|
53
53
|
T::Array[Dependabot::DependencyRequirement]
|
|
54
54
|
)
|
|
55
|
-
@update_strategy =
|
|
56
|
-
@has_lockfile =
|
|
55
|
+
@update_strategy = update_strategy
|
|
56
|
+
@has_lockfile = has_lockfile
|
|
57
57
|
@latest_resolvable_version = T.let(nil, T.nilable(Dependabot::Python::Version))
|
|
58
58
|
|
|
59
59
|
return unless latest_resolvable_version
|
|
@@ -30,7 +30,7 @@ module Dependabot
|
|
|
30
30
|
sig { returns(T.nilable(T::Array[T.any(String, Integer)])) }
|
|
31
31
|
attr_reader :local
|
|
32
32
|
|
|
33
|
-
INFINITY =
|
|
33
|
+
INFINITY = 1000
|
|
34
34
|
NEGATIVE_INFINITY = T.let(-INFINITY, Integer)
|
|
35
35
|
|
|
36
36
|
# See https://peps.python.org/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions
|
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.391.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.391.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.391.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -323,7 +323,7 @@ licenses:
|
|
|
323
323
|
- MIT
|
|
324
324
|
metadata:
|
|
325
325
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
326
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
326
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.391.0
|
|
327
327
|
rdoc_options: []
|
|
328
328
|
require_paths:
|
|
329
329
|
- lib
|