dependabot-python 0.381.0 → 0.382.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: e521f3e297026d2b21597f830c9978e6365a5dd4b99ad7a24a9d0973772db45d
|
|
4
|
+
data.tar.gz: 446649a64857c3cc95aeed4c7e4c9d37bf55e6b5573e82445c6b0b0e4fc10f33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b67ffd686818a7d3e3399a2493a188815959102bc4235086ed16fc47b1bdf93a392e743cc2fb411619f90b9c1b01d0ce27de7e65b53e1ed6e52dfaf67b58107
|
|
7
|
+
data.tar.gz: 269b0733ac11ef8d19cefa5c972e6e67330c51792981fc98a80e389f6338477a099e62ab184873d28ce26dddf8d8b5213c1c2baed56b5d18b6ee9b8097f86338
|
|
@@ -65,6 +65,10 @@ module Dependabot
|
|
|
65
65
|
sig { override.void }
|
|
66
66
|
def prepare!
|
|
67
67
|
if poetry_project_without_lockfile?
|
|
68
|
+
# Generating an ephemeral lockfile requires executing `poetry lock`. Strictly speaking, that violates our
|
|
69
|
+
# policy of refusing to run Python tooling when external code execution is disallowed, so fail fast.
|
|
70
|
+
raise Dependabot::UnexpectedExternalCode if file_parser.reject_external_code?
|
|
71
|
+
|
|
68
72
|
Dependabot.logger.info("No poetry.lock found, generating ephemeral lockfile for dependency graphing")
|
|
69
73
|
generate_ephemeral_lockfile!
|
|
70
74
|
emit_missing_lockfile_warning! if @ephemeral_lockfile_generated
|
|
@@ -209,7 +209,10 @@ module Dependabot
|
|
|
209
209
|
|
|
210
210
|
sig { returns(T::Array[DependencyFile]) }
|
|
211
211
|
def pip_compile_files
|
|
212
|
-
@pip_compile_files ||= T.let(
|
|
212
|
+
@pip_compile_files ||= T.let(
|
|
213
|
+
dependency_files.select { |f| f.name.end_with?(".in") },
|
|
214
|
+
T.nilable(T::Array[DependencyFile])
|
|
215
|
+
)
|
|
213
216
|
end
|
|
214
217
|
end
|
|
215
218
|
end
|
|
@@ -65,7 +65,7 @@ module Dependabot
|
|
|
65
65
|
# Parses a single pip requirement string (e.g. "types-requests==2.31.0.10")
|
|
66
66
|
# into a structured hash. Returns nil if the string is not a valid requirement
|
|
67
67
|
# or has no version constraint.
|
|
68
|
-
sig { params(dependency_string: String).returns(T.nilable(T::Hash[Symbol, T.
|
|
68
|
+
sig { params(dependency_string: String).returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
69
69
|
def self.parse(dependency_string)
|
|
70
70
|
match = dependency_string.strip.match(VALID_REQ_TXT_REQUIREMENT)
|
|
71
71
|
return nil unless match
|
|
@@ -92,17 +92,17 @@ module Dependabot
|
|
|
92
92
|
sig { params(requirements_string: String).returns(T.nilable(String)) }
|
|
93
93
|
def self.extract_pinned_version(requirements_string)
|
|
94
94
|
requirement = Dependabot::Python::Requirement.new(requirements_string)
|
|
95
|
-
constraints = T.let(requirement.requirements, T::Array[
|
|
95
|
+
constraints = T.let(requirement.requirements, T::Array[[String, Gem::Version]])
|
|
96
96
|
|
|
97
97
|
exact_pin = constraints.find do |pair|
|
|
98
|
-
op =
|
|
98
|
+
op = pair[0]
|
|
99
99
|
op == "==" || op == "="
|
|
100
100
|
end
|
|
101
|
-
return
|
|
101
|
+
return exact_pin[1].to_s if exact_pin
|
|
102
102
|
|
|
103
103
|
lower_bound_operators = %w(>= > ~>).freeze
|
|
104
|
-
lower_bound = constraints.find { |pair| lower_bound_operators.include?(
|
|
105
|
-
return
|
|
104
|
+
lower_bound = constraints.find { |pair| lower_bound_operators.include?(pair[0]) }
|
|
105
|
+
return lower_bound[1].to_s if lower_bound
|
|
106
106
|
|
|
107
107
|
nil
|
|
108
108
|
rescue Gem::Requirement::BadRequirementError
|
|
@@ -93,16 +93,18 @@ module Dependabot
|
|
|
93
93
|
)
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
sig { override.returns(T::Array[
|
|
96
|
+
sig { override.returns(T::Array[Dependabot::DependencyRequirement]) }
|
|
97
97
|
def updated_requirements
|
|
98
|
-
return updated_git_requirements if git_dependency?
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
return wrap_requirements(updated_git_requirements) if git_dependency?
|
|
99
|
+
|
|
100
|
+
wrap_requirements(
|
|
101
|
+
RequirementsUpdater.new(
|
|
102
|
+
requirements: requirements,
|
|
103
|
+
latest_resolvable_version: preferred_resolvable_version&.to_s,
|
|
104
|
+
update_strategy: requirements_update_strategy,
|
|
105
|
+
has_lockfile: !(pipfile_lock || poetry_lock).nil?
|
|
106
|
+
).updated_requirements
|
|
107
|
+
)
|
|
106
108
|
end
|
|
107
109
|
|
|
108
110
|
sig { override.returns(T::Boolean) }
|
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.382.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.382.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.382.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.382.0
|
|
327
327
|
rdoc_options: []
|
|
328
328
|
require_paths:
|
|
329
329
|
- lib
|