dependabot-python 0.128.2 → 0.129.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/build +1 -1
- data/helpers/lib/hasher.py +6 -4
- data/helpers/lib/parser.py +10 -10
- data/helpers/requirements.txt +2 -1
- data/lib/dependabot/python/file_fetcher.rb +1 -0
- data/lib/dependabot/python/python_versions.rb +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f993abe633884b6004bab4268d3303788ba822e338c3df0893d2a89871b5b9b
|
4
|
+
data.tar.gz: 20325fbd36faf417e299bc295f45387cab879a53d91b28ef8a7300aa2e71da1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b7d4eaa8dacc01d11249de8129972cd0c8f165718383366d50b55843e3684dd061369da818c1ae739547683234348254eae8a7785e4c845045905dbb47d6b0
|
7
|
+
data.tar.gz: 6780224fd1beaeb0a91f75f636a00c33fb10ce71dd356e60728031e4c0ff40e176dd7339cb08d664db37cc31c0f8a28a84eca5ac2be649df8d654420fc11598a
|
data/helpers/build
CHANGED
data/helpers/lib/hasher.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import hashin
|
2
2
|
import json
|
3
3
|
import pipfile
|
4
|
-
from poetry.poetry import Poetry
|
5
4
|
from poetry.factory import Factory
|
6
5
|
|
6
|
+
|
7
7
|
def get_dependency_hash(dependency_name, dependency_version, algorithm):
|
8
8
|
hashes = hashin.get_package_hashes(
|
9
9
|
dependency_name,
|
@@ -11,14 +11,16 @@ def get_dependency_hash(dependency_name, dependency_version, algorithm):
|
|
11
11
|
algorithm=algorithm
|
12
12
|
)
|
13
13
|
|
14
|
-
return json.dumps({
|
14
|
+
return json.dumps({"result": hashes["hashes"]})
|
15
|
+
|
15
16
|
|
16
17
|
def get_pipfile_hash(directory):
|
17
18
|
p = pipfile.load(directory + '/Pipfile')
|
18
19
|
|
19
|
-
return json.dumps({
|
20
|
+
return json.dumps({"result": p.hash})
|
21
|
+
|
20
22
|
|
21
23
|
def get_pyproject_hash(directory):
|
22
24
|
p = Factory().create_poetry(directory)
|
23
25
|
|
24
|
-
return json.dumps({
|
26
|
+
return json.dumps({"result": p.locker._get_content_hash()})
|
data/helpers/lib/parser.py
CHANGED
@@ -1,28 +1,26 @@
|
|
1
|
-
from itertools import chain
|
2
1
|
import glob
|
3
2
|
import io
|
4
3
|
import json
|
5
|
-
import optparse
|
6
4
|
import os.path
|
7
5
|
import re
|
8
6
|
|
9
7
|
import setuptools
|
10
8
|
import pip._internal.req.req_file
|
11
9
|
from pip._internal.network.session import PipSession
|
12
|
-
from pip._internal.models.format_control import FormatControl
|
13
10
|
from pip._internal.req.constructors import (
|
14
|
-
|
15
|
-
|
11
|
+
install_req_from_line,
|
12
|
+
install_req_from_parsed_requirement,
|
16
13
|
)
|
17
14
|
|
15
|
+
|
18
16
|
def parse_requirements(directory):
|
19
17
|
# Parse the requirements.txt
|
20
18
|
requirement_packages = []
|
21
19
|
requirement_files = glob.glob(os.path.join(directory, '*.txt')) \
|
22
|
-
|
20
|
+
+ glob.glob(os.path.join(directory, '**', '*.txt'))
|
23
21
|
|
24
22
|
pip_compile_files = glob.glob(os.path.join(directory, '*.in')) \
|
25
|
-
|
23
|
+
+ glob.glob(os.path.join(directory, '**', '*.in'))
|
26
24
|
|
27
25
|
def version_from_install_req(install_req):
|
28
26
|
if install_req.is_pinned:
|
@@ -52,10 +50,11 @@ def parse_requirements(directory):
|
|
52
50
|
"extras": sorted(list(install_req.extras))
|
53
51
|
})
|
54
52
|
except Exception as e:
|
55
|
-
print(json.dumps({
|
53
|
+
print(json.dumps({"error": repr(e)}))
|
56
54
|
exit(1)
|
57
55
|
|
58
|
-
return json.dumps({
|
56
|
+
return json.dumps({"result": requirement_packages})
|
57
|
+
|
59
58
|
|
60
59
|
def parse_setup(directory):
|
61
60
|
# Parse the setup.py
|
@@ -99,6 +98,7 @@ def parse_setup(directory):
|
|
99
98
|
return []
|
100
99
|
|
101
100
|
global fake_open
|
101
|
+
|
102
102
|
def fake_open(*args, **kwargs):
|
103
103
|
content = ("VERSION = ('0', '0', '1+dependabot')\n"
|
104
104
|
"__version__ = '0.0.1+dependabot'\n"
|
@@ -135,4 +135,4 @@ def parse_setup(directory):
|
|
135
135
|
# Exec the setup.py
|
136
136
|
exec(content) in globals(), locals()
|
137
137
|
|
138
|
-
return json.dumps({
|
138
|
+
return json.dumps({"result": setup_packages})
|
data/helpers/requirements.txt
CHANGED
@@ -4,13 +4,13 @@ module Dependabot
|
|
4
4
|
module Python
|
5
5
|
module PythonVersions
|
6
6
|
PRE_INSTALLED_PYTHON_VERSIONS = %w(
|
7
|
-
3.9.
|
7
|
+
3.9.1 2.7.18
|
8
8
|
).freeze
|
9
9
|
|
10
10
|
# Due to an OpenSSL issue we can only install the following versions in
|
11
11
|
# the Dependabot container.
|
12
12
|
SUPPORTED_VERSIONS = %w(
|
13
|
-
3.9.0
|
13
|
+
3.9.1 3.9.0
|
14
14
|
3.8.6 3.8.5 3.8.4 3.8.3 3.8.2 3.8.1 3.8.0
|
15
15
|
3.7.9 3.7.8 3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.7.2 3.7.1 3.7.0
|
16
16
|
3.6.12 3.6.11 3.6.10 3.6.9 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2
|
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.129.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-06 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.129.4
|
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.129.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.7.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.7.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.21.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.21.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: simplecov-console
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|