libmozdata 0.2.4__tar.gz → 0.2.6__tar.gz
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.
- {libmozdata-0.2.4/libmozdata.egg-info → libmozdata-0.2.6}/PKG-INFO +1 -1
- libmozdata-0.2.6/VERSION +1 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/clouseau.py +18 -9
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/phabricator.py +7 -3
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/release_owners.py +2 -4
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/socorro.py +7 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/utils.py +37 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6/libmozdata.egg-info}/PKG-INFO +1 -1
- libmozdata-0.2.4/VERSION +0 -1
- {libmozdata-0.2.4 → libmozdata-0.2.6}/MANIFEST.in +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/README.md +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/BZInfo.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/FXRevision.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/FileStats.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/HGFileInfo.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/__init__.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/bugzilla.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/buildhub.py +1 -1
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/config.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/connection.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/fx_trains.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/handler.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/hgmozilla.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/lando.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/modules.json +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/modules.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/patchanalysis.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/redash.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/vcs_map.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/versions.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata/wiki_parser.py +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata.egg-info/SOURCES.txt +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata.egg-info/dependency_links.txt +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata.egg-info/not-zip-safe +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata.egg-info/requires.txt +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/libmozdata.egg-info/top_level.txt +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/requirements.txt +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/setup.cfg +0 -0
- {libmozdata-0.2.4 → libmozdata-0.2.6}/setup.py +0 -0
libmozdata-0.2.6/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.6
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
3
3
|
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
from libmozdata.utils import batched
|
|
7
|
+
|
|
5
8
|
from . import config
|
|
6
9
|
from .connection import Connection, Query
|
|
7
10
|
|
|
@@ -54,14 +57,20 @@ class Reports(CrashClouseau):
|
|
|
54
57
|
dict: the reports by signatures
|
|
55
58
|
"""
|
|
56
59
|
data = {}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
requests = [
|
|
61
|
+
cls(
|
|
62
|
+
params={
|
|
63
|
+
"signatures": signatures_batch,
|
|
64
|
+
"product": product,
|
|
65
|
+
"channel": channel,
|
|
66
|
+
},
|
|
67
|
+
handler=cls._default_handler,
|
|
68
|
+
handlerdata=data,
|
|
69
|
+
)
|
|
70
|
+
for signatures_batch in batched(signatures, 20)
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
for request in requests:
|
|
74
|
+
request.wait()
|
|
66
75
|
|
|
67
76
|
return data
|
|
@@ -7,6 +7,7 @@ import collections
|
|
|
7
7
|
import enum
|
|
8
8
|
import json
|
|
9
9
|
import logging
|
|
10
|
+
from functools import cached_property
|
|
10
11
|
from urllib.parse import urlencode, urlparse
|
|
11
12
|
|
|
12
13
|
import hglib
|
|
@@ -213,9 +214,12 @@ class PhabricatorAPI(object):
|
|
|
213
214
|
self.url = url
|
|
214
215
|
assert self.url.endswith("/api/"), "Phabricator API must end with /api/"
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
@cached_property
|
|
218
|
+
def user(self):
|
|
219
|
+
"""
|
|
220
|
+
Return the authenticated user details
|
|
221
|
+
"""
|
|
222
|
+
return self.request("user.whoami")
|
|
219
223
|
|
|
220
224
|
@property
|
|
221
225
|
def hostname(self):
|
|
@@ -48,7 +48,6 @@ def get_owners():
|
|
|
48
48
|
"Secondary",
|
|
49
49
|
"Engineering REO",
|
|
50
50
|
"Release Duty",
|
|
51
|
-
"QA Owner",
|
|
52
51
|
"Corresponding ESR",
|
|
53
52
|
"Release Date",
|
|
54
53
|
] != table[0]:
|
|
@@ -58,7 +57,7 @@ def get_owners():
|
|
|
58
57
|
for row in table[1:]:
|
|
59
58
|
try:
|
|
60
59
|
# sometimes the date is 2019-XX-XX (when the date is not known)
|
|
61
|
-
release_date = utils.get_date_ymd(row[
|
|
60
|
+
release_date = utils.get_date_ymd(row[6])
|
|
62
61
|
except (AssertionError, ValueError):
|
|
63
62
|
continue
|
|
64
63
|
|
|
@@ -69,8 +68,7 @@ def get_owners():
|
|
|
69
68
|
"secondary": row[2],
|
|
70
69
|
"engineering reo": row[3],
|
|
71
70
|
"release duty": _get_list_people(row[4]),
|
|
72
|
-
"
|
|
73
|
-
"corresponding esr": row[6],
|
|
71
|
+
"corresponding esr": row[5],
|
|
74
72
|
"release date": release_date,
|
|
75
73
|
}
|
|
76
74
|
)
|
|
@@ -63,6 +63,13 @@ class SuperSearch(Socorro):
|
|
|
63
63
|
automatically support retrieving it by redirecting the request to the
|
|
64
64
|
unredacted endpoint (i.e., SuperSearchUnredacted).
|
|
65
65
|
"""
|
|
66
|
+
if not isinstance(params, dict):
|
|
67
|
+
# This is a workaround to avoid crashing when the params values is a
|
|
68
|
+
# list of params. We could instead of this, check each item in the
|
|
69
|
+
# list, but it's not worth it since this method is just for backward
|
|
70
|
+
# compatibility.
|
|
71
|
+
return False
|
|
72
|
+
|
|
66
73
|
unredacted = False
|
|
67
74
|
if "_facets" in params:
|
|
68
75
|
facets = params["_facets"]
|
|
@@ -8,6 +8,7 @@ import operator
|
|
|
8
8
|
import os.path
|
|
9
9
|
import random
|
|
10
10
|
from datetime import date, datetime, timedelta
|
|
11
|
+
from itertools import count
|
|
11
12
|
|
|
12
13
|
import dateutil.parser
|
|
13
14
|
import pytz
|
|
@@ -381,3 +382,39 @@ def get_language(path):
|
|
|
381
382
|
for lang, names in langs.items():
|
|
382
383
|
if name in names or extension in names:
|
|
383
384
|
return lang
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
# This is roughly equivalent to the itertools.islice which was added in
|
|
388
|
+
# Python 3.10.
|
|
389
|
+
# Copied from https://docs.python.org/3/library/itertools.html#itertools.islice
|
|
390
|
+
def islice(iterable, *args):
|
|
391
|
+
# islice('ABCDEFG', 2) → A B
|
|
392
|
+
# islice('ABCDEFG', 2, 4) → C D
|
|
393
|
+
# islice('ABCDEFG', 2, None) → C D E F G
|
|
394
|
+
# islice('ABCDEFG', 0, None, 2) → A C E G
|
|
395
|
+
|
|
396
|
+
s = slice(*args)
|
|
397
|
+
start = 0 if s.start is None else s.start
|
|
398
|
+
stop = s.stop
|
|
399
|
+
step = 1 if s.step is None else s.step
|
|
400
|
+
if start < 0 or (stop is not None and stop < 0) or step <= 0:
|
|
401
|
+
raise ValueError
|
|
402
|
+
|
|
403
|
+
indices = count() if stop is None else range(max(start, stop))
|
|
404
|
+
next_i = start
|
|
405
|
+
for i, element in zip(indices, iterable):
|
|
406
|
+
if i == next_i:
|
|
407
|
+
yield element
|
|
408
|
+
next_i += step
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
# This is roughly equivalent to the itertools.batched which was added in
|
|
412
|
+
# Python 3.12.
|
|
413
|
+
# Copied from https://docs.python.org/3/library/itertools.html#itertools.batched
|
|
414
|
+
def batched(iterable, n):
|
|
415
|
+
# batched('ABCDEFG', 3) → ABC DEF G
|
|
416
|
+
if n < 1:
|
|
417
|
+
raise ValueError("n must be at least one")
|
|
418
|
+
iterator = iter(iterable)
|
|
419
|
+
while batch := tuple(islice(iterator, n)):
|
|
420
|
+
yield batch
|
libmozdata-0.2.4/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.2.4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,9 +6,9 @@ import json
|
|
|
6
6
|
import os
|
|
7
7
|
import re
|
|
8
8
|
from collections import defaultdict
|
|
9
|
+
from distutils.version import LooseVersion
|
|
9
10
|
|
|
10
11
|
import requests
|
|
11
|
-
from distutils.version import LooseVersion
|
|
12
12
|
|
|
13
13
|
SEARCH_URL = os.getenv("BUILDHUB_SEARCH_URL", "https://buildhub.moz.tools/api/search")
|
|
14
14
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|