Class: Dependabot::Python::FileUpdater::PipCompileFileUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/python/file_updater/pip_compile_file_updater.rb

Overview

rubocop:disable Metrics/ClassLength

Constant Summary collapse

UNSAFE_PACKAGES =
%w(setuptools distribute pip).freeze
INCOMPATIBLE_VERSIONS_REGEX =
/There are incompatible versions in the resolved dependencies:.*\z/m
WARNINGS =
/\s*# WARNING:.*\Z/m
UNSAFE_NOTE =
/\s*# The following packages are considered to be unsafe.*\Z/m
RESOLVER_REGEX =
/(?<=--resolver=)(\w+)/
NATIVE_COMPILATION_ERROR =
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependencies:, dependency_files:, credentials:, index_urls: nil) ⇒ PipCompileFileUpdater

Returns a new instance of PipCompileFileUpdater.



37
38
39
40
41
42
43
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 37

def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil)
  @dependencies = dependencies
  @dependency_files = dependency_files
  @credentials = credentials
  @index_urls = index_urls
  @build_isolation = true
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



35
36
37
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 35

def credentials
  @credentials
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



33
34
35
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 33

def dependencies
  @dependencies
end

#dependency_filesObject (readonly)

Returns the value of attribute dependency_files.



34
35
36
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 34

def dependency_files
  @dependency_files
end

Instance Method Details

#updated_dependency_filesObject



45
46
47
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 45

def updated_dependency_files
  @updated_dependency_files ||= fetch_updated_dependency_files
end