instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
scipy__scipy__23771
scipy/scipy
23,771
defect
ee35f25ef6754db0ec3e2a801ab11b565250e16b
18f9b86d403d38a9d45f5e9877ac914f62b79dd5
BUG: odr: prevent segfault with explicit model and job=1 (#23763)
#### Reference issue Closes #23763 #### What does this implement/fix? ODR now raises an OdrError if job is 1 mod 10 which configures implicit mode, even if model.implicit isn't set to be true. Also adds a corresponding test case. #### Additional information
diff --git a/scipy/odr/_odrpack.py b/scipy/odr/_odrpack.py index 0822025d0d39..f3f62540f500 100644 --- a/scipy/odr/_odrpack.py +++ b/scipy/odr/_odrpack.py @@ -799,6 +799,10 @@ def _check(self): y_s = list(self.data.y.shape) if self.model.implicit: raise OdrError("an implicit m...
1
1
0
[{"id": "G0", "claim": "Replace the error message raised when job requests an implicit model but an explicit model is passed with a more user-facing wording.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__23817
scipy/scipy
23,817
defect
38ecfef904efa99c048ebf1e25c23505c98a625c
eb450a800bf20ab8b4df69a0f988698a667bab61
BUG/TST: Bump xsf to v0.1.3 add tests for expi limits
Closes #23738 Bumps xsf to v0.1.3 and add tests for expi returning properly on 0 or inf.
diff --git a/scipy/special/tests/test_exponential_integrals.py b/scipy/special/tests/test_exponential_integrals.py index 8332a83267e2..52bab04669f7 100644 --- a/scipy/special/tests/test_exponential_integrals.py +++ b/scipy/special/tests/test_exponential_integrals.py @@ -111,6 +111,12 @@ def test_continuity_on_positive_...
1
1
0
[{"id": "G0", "claim": "The new test_limits test should use pytest.mark.parametrize here, like the similar test for _scaled_exp1, instead of two separate assignments and assertions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__23921
scipy/scipy
23,921
defect
13611dede29a58d465ccfe85df87d97293b7b8d1
fd4f7f8d23fb6c8bd5d78fb2246dec5376971dc0
BUG:signal: Ensure consistent dtypes for filter functions across alternative backends
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy...
diff --git a/scipy/signal/_filter_design.py b/scipy/signal/_filter_design.py index 324f6965f8c5..8ddb3d817751 100644 --- a/scipy/signal/_filter_design.py +++ b/scipy/signal/_filter_design.py @@ -1280,12 +1280,21 @@ def zpk2tf(z, p, k): ( array([ 5., -40., 60.]), array([ 1., -9., 8.])) """ xp = array...
3
3
2
[{"id": "G0", "claim": "The dtype-setting dance added to zpk2tf for k is scary and overly complex; ask whether k can simply always be converted with one plain cast (e.g. k = xp.asarray(k, dtype=xp.float64)), with a caveat like Wn if needed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "sco...
null
scipy__scipy__23923
scipy/scipy
23,923
defect
c16dc4154f6aaaa7f570f6eb90e9577524bef2e8
b321b81d2aaad401ebd725a305c0e047c077afe6
BUG: sparse: remove spurious CSC to CSR conversions in binops
Fixes #23826 The nD binops changes inadvertently caused CSC inputs to be converted to CSR. This can cause large memory allocations for short but wide arrays. This PR also checks for spurious conversions from CSR to CSC for completeness. No bug exsists for that case. This only affects binops which act on two spa...
diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py index c72a3a02f453..9478123e24ef 100644 --- a/scipy/sparse/_base.py +++ b/scipy/sparse/_base.py @@ -555,16 +555,20 @@ def _maximum_minimum(self, other, np_op): " dense matrix.", SparseEfficiencyWarning, stacklevel=3) retur...
3
3
0
[{"id": "G0", "claim": "operator.mul is duplicated in the test's parametrize list.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The timing-based test can be very fragile (e.g. very slow under an emulator), so if the check is kept it should be ...
null
scipy__scipy__23979
scipy/scipy
23,979
defect
4bbe88477ab7b8b5577175beda76857fb8691e1e
dbc9bad713b81fb9fa058ae5b793f9bcf022b509
BUG: special: fix `comb(n, 0, repetition=True)` returning `0` instead of `1`
Fixes #23867 ## Description This PR fixes a bug where incorrectly returns 0 instead of 1 for any n >= 0. ## Root Cause When , the implementation transforms the multiset coefficient into a binomial coefficient via: ```python comb(N, k, repetition=True) → comb(N + k - 1, k) ``` For the edge case where `k=0`, this bec...
diff --git a/scipy/special/_basic.py b/scipy/special/_basic.py index f4c08b9e989a..f804889d09e7 100644 --- a/scipy/special/_basic.py +++ b/scipy/special/_basic.py @@ -2528,6 +2528,15 @@ def comb(N, k, *, exact=False, repetition=False): """ if repetition: + # Special case: C(n, 0) with repetition = 1 ...
4
4
1
[{"id": "G0", "claim": "For array-like input with exact=False, the special case should use the same `cond` boolean-mask trick as the code around line 2550 instead of only handling np.isscalar values.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Th...
null
scipy__scipy__24120
scipy/scipy
24,120
defect
633b82d5545a94a5d271e690d5ef883b2d96a78a
e5c37646ec2f4262034dd710a7061ae664638769
Fix bug in scipy.sparse.linalg.lsmr() if maxiter=0 and show=True
Closes #23748
diff --git a/scipy/sparse/linalg/_isolve/lsmr.py b/scipy/sparse/linalg/_isolve/lsmr.py index 97eb734aa64c..9fd0a30e6d53 100644 --- a/scipy/sparse/linalg/_isolve/lsmr.py +++ b/scipy/sparse/linalg/_isolve/lsmr.py @@ -287,6 +287,12 @@ def lsmr(A, b, damp=0.0, atol=1e-6, btol=1e-6, conlim=1e8, condA = 1 normx = 0...
1
1
1
[{"id": "G0", "claim": "Add the example from the original issue as a test to prevent any future regressions.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scipy__scipy__24198
scipy/scipy
24,198
defect
5ac585ede7a479422a98ae660e913b9811373082
6a05153713071ca414526e8826a3794f967ca10b
ENH: signal.lfilter_zi: refactor for efficiency and stability
* Make calculation of initial filter coefficients a little more efficient and numerically stable. * Improve docstr and unit tests. * Raise Error if a[0] == 0, since it is not supported by `lfilter` and by `filtfilt` (needs release note). Closes #23480.
diff --git a/doc/source/tutorial/signal.rst b/doc/source/tutorial/signal.rst index b23cc3def075..50d0ac1c4a26 100644 --- a/doc/source/tutorial/signal.rst +++ b/doc/source/tutorial/signal.rst @@ -620,6 +620,8 @@ Filter coefficients can be stored in several different formats: Functions, such as :func:`tf2zpk` and :fun...
6
3
1
[{"id": "G0", "claim": "The PR author should explain what calculation the rewrite rearranges and why the new version is believed to be algebraically equivalent to the old one.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The PR author should explain...
null
scipy__scipy__24297
scipy/scipy
24,297
defect
9bc9295147040a06d00a00ce8b0ad180c66a2101
2ebfc51e547e2ec630767ca46cf308d1db8db746
BUG: IndexError when giving a zero distance matrix to multiscale_graphcorr
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy...
diff --git a/scipy/stats/_mgc.py b/scipy/stats/_mgc.py index 70aa310ff6d5..f2ecbe9747ac 100644 --- a/scipy/stats/_mgc.py +++ b/scipy/stats/_mgc.py @@ -407,7 +407,7 @@ def _mgc_stat(distx, disty): # calculate MGC map and optimal scale stat_mgc_map = _local_correlations(distx, disty, global_corr='mgc') - n...
1
1
0
[{"id": "G0", "claim": "The new regression test should assert something about the returned MGCResult (e.g. statistic or p-value) in addition to checking the absence of an error.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__24460
scipy/scipy
24,460
defect
892baa06054c31bed734423c0f53eaed52b1914b
89f74f6b239c020fc0875545d39e9b57d50440d7
ENH: stats.cumfreq/relfreq: add array API support
#### Reference issue Toward gh-20544 Closes gh-23931 #### What does this implement/fix? Adds array API support to `scipy.stats.cumfreq` and `scipy.stats.relfreq`. #### Additional information ~~In draft: running new tests with unchanged functions to show that they pass. Then, I'll commit the new versions of th...
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 23a06bb1df2d..ea796343e3b9 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -2261,8 +2261,8 @@ def count(x): ('count', 'lowerlimit', 'binsize', 'extrapoints')) -def _histogram(a, numbins=10, d...
8
6
2
[{"id": "G0", "claim": "Keeping `np_only=True` in the `xp_capabilities` decorators of cumfreq and relfreq may be a mistake; both should read `@xp_capabilities(skip_backends=[('dask.array', 'fails tests')])`.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ...
null
scipy__scipy__24464
scipy/scipy
24,464
defect
740d1cc0279dcdb80ae50dea85d29fd47ebbf3ac
2d1b26484219a61598a28b63ce494c8fc4f081f8
ENH: stats.mannwhitneyu: add zstatistic to result object; declare `ranksums` "legacy"
#### Reference issue Toward gh-21077 - implements https://github.com/scipy/scipy/issues/21077#issuecomment-3027313242 Toward gh-20544 - makes translation of `ranksums` unnecessary #### What does this implement/fix? This adds `zstatistic` to the result object of `scipy.stats.mannwhityneyu`, following the precedent...
diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py index d6f07c7456ab..f16db740857c 100644 --- a/scipy/stats/_mannwhitneyu.py +++ b/scipy/stats/_mannwhitneyu.py @@ -1,10 +1,12 @@ import threading import numpy as np -from collections import namedtuple from scipy._lib._array_api import array_name...
1
1
0
[{"id": "G1", "claim": "In the new `ranksums` legacy docstring, the option should be written as `use_continuity=False` with a single equals sign instead of `use_continuity==False`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__24518
scipy/scipy
24,518
defect
fe4d79ecda5026a365ec6734113d3e18baeafbdc
e9b6cc9d9b33e543a238e4d4fb37b0e383dd7fb8
DOC: spatial.transform.Rotation.apply: fix formula
#### Reference issue Closes gh-24517. #### What does this implement/fix? Fixes `Rotation.apply` docstring: replace `self.as_matrix() @ vectors` with `vectors @ self.as_matrix().T` so the documented formula matches the allowed `(P, 3)` vector shape.
diff --git a/scipy/spatial/transform/_rigid_transform.py b/scipy/spatial/transform/_rigid_transform.py index 59417f7db1d3..323480d31f9e 100644 --- a/scipy/spatial/transform/_rigid_transform.py +++ b/scipy/spatial/transform/_rigid_transform.py @@ -1764,9 +1764,9 @@ def apply(self, vector: ArrayLike, inverse: bool = Fals...
6
5
3
[{"id": "G0", "claim": "The new doc formula ``vectors @ self.as_matrix().T`` is only generally true for a single Rotation (for N-d rotations it is wrong), so the doc should say the example is for a single Rotation.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "...
null
scipy__scipy__24563
scipy/scipy
24,563
defect
93d4114a3889c66121e90d36411e9159a64e6bd7
9f8112402383a0487ef4efe92f5356415e6f24a5
BUG: special: ensure that ufuncs follow NEP50 promotion rules
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy...
diff --git a/scipy/special/_gufuncs.cpp b/scipy/special/_gufuncs.cpp index 883cdf00f966..baca6de954a5 100644 --- a/scipy/special/_gufuncs.cpp +++ b/scipy/special/_gufuncs.cpp @@ -62,22 +62,22 @@ _gufuncs_module_exec(PyObject *module) PyObject *legendre_p_all = Py_BuildValue("(N, N, N)", ...
4
3
1
[{"id": "G0", "claim": "The float128/complex256 symbols used in _get_nan_val are not always available (can be named float96 on some platforms), so the test should use np.longdouble/np.clongdouble, which are always available.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ...
null
scipy__scipy__24656
scipy/scipy
24,656
defect
f9d014e35bcc057ce8d283dd7b09b11f18c3cd7d
c306c5952ffca0b332def7ed5add6c720e0a6e34
ENH: integrate: support `sparray` in IVP and BVP
[Edited to reflect change of focus toward returning same sparse type as input 4/3/26] The sparse parts of integrate are focused on the jacobian matrices. These are computed internally. The two main functions are `num_jac` (in the `_ivp` suite) and `construct_global_jac` (in the `_bvp.py` module). They both appear to...
diff --git a/scipy/integrate/_bvp.py b/scipy/integrate/_bvp.py index e6b769050a21..da1707043f4e 100644 --- a/scipy/integrate/_bvp.py +++ b/scipy/integrate/_bvp.py @@ -4,7 +4,7 @@ import numpy as np from numpy.linalg import pinv -from scipy.sparse import coo_matrix, csc_matrix +from scipy.sparse import coo_array fr...
6
5
3
[{"id": "G0", "claim": "The sparsity helper medazko_sparsity was changed from returning a coo sparse object to a csc one without a reason and should stay coo (the author's earlier revert got lost in a force push).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl...
null
scipy__scipy__24695
scipy/scipy
24,695
defect
cdc9373c81826a4f3f2715f7ddf5c53c7604374b
aede6ae753c28f22751ec2a6c30590159a07728b
MAINT: special: migrate `nrdtrimn/nrdtrisd` to xsf
#### Reference issue Towards #21966 #### What does this implement/fix? Migrates normal distribution inverses to xsf/cephes. #### Additional information I could not get the new cpp based ufunc machinery to work so I stuck with what I did in #23758. #### Accuracy benchmark Accuracy stays the same <img w...
diff --git a/scipy/special/_cdflib_wrappers.pxd b/scipy/special/_cdflib_wrappers.pxd index 77c6bda1c758..bc26d2122ee9 100644 --- a/scipy/special/_cdflib_wrappers.pxd +++ b/scipy/special/_cdflib_wrappers.pxd @@ -19,15 +19,11 @@ cdef extern from "cdflib.h" nogil: int i1 double d3 - TupleDID cdfchi_...
4
2
0
[{"id": "G0", "claim": "The edge-case tests asserting `inf` and `nan` results should be split into separate test functions.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests should also check that both functions return `nan` when one of the inputs is...
null
scipy__scipy__24709
scipy/scipy
24,709
defect
51d17d9a4592ced0349cd9d299291860618abfa5
3a74e941a86bb18208a976683050fca6e4ac661e
MAINT: linalg/{svd, eig}: re-enable overwrite_a
#### Reference issue <!--Example: Closes gh-WXYZ.--> towards https://github.com/scipy/scipy/issues/24645 Also cross-ref https://github.com/scipy/scipy/issues/9682 which talked about SVD specifically. #### What does this implement/fix? <!--Please explain your changes.--> Implement `overwrite_a` for `linalg.s...
diff --git a/scipy/linalg/_decomp_svd.py b/scipy/linalg/_decomp_svd.py index 4c552c3e1a74..699c90f87dfd 100644 --- a/scipy/linalg/_decomp_svd.py +++ b/scipy/linalg/_decomp_svd.py @@ -150,7 +150,6 @@ def svd(a, full_matrices=True, compute_uv=True, overwrite_a=False, # basic sanity checks of the input matrix a1...
1
1
0
[{"id": "G0", "claim": "The in-place `data = (T *)Am_data` branch in the svd/gesvd workspace partitioning hides that `overwrite_a` is only enabled for 2D F-ordered input, and the reviewer asks that this precondition be made clear from the immediate context (e.g. by moving the assignment into the batching loop with a co...
null
scipy__scipy__24750
scipy/scipy
24,750
defect
5710093b43149472e458c1c29ea3e2be73ad9c59
20d2b087e6dd9c77adea8b64d0d4ea4342a8df4a
MAINT: linalg.solve: reenable 'overwrite_b' for solve(..., assume_a="banded")
#### Reference issue Towards #24645 #### What does this implement/fix? Reenable the `overwrite_b` kwarg for the case where `assume_a="banded"`. Since this is a separate branch in the lower-level implementation this was not covered in #24442. #### Additional information As mentioned before in https://github.com...
diff --git a/scipy/linalg/src/_common_array_utils.hh b/scipy/linalg/src/_common_array_utils.hh index f049c55d418d..f24f56d18b64 100644 --- a/scipy/linalg/src/_common_array_utils.hh +++ b/scipy/linalg/src/_common_array_utils.hh @@ -1303,13 +1303,14 @@ bandwidth_strided(T* data, npy_intp n, npy_intp m, npy_intp s1, npy_i...
5
2
1
[{"id": "G0", "claim": "Optional nit: the test's in-place flags could gain `and assume_a != \"banded\"` (on `b_inplace`, or per the follow-up clarification so that `a_inplace` reads off as the precise conditions under which `a` is overwritten).", "category": "testing", "verdict": "supported", "priority": "P2", "scope":...
null
scipy__scipy__24759
scipy/scipy
24,759
defect
5710093b43149472e458c1c29ea3e2be73ad9c59
6b289a9ac2a109b56936630e351d188dea168d73
ENH: linalg.cholesky: move batching loop to C
#### Reference issue Towards #24474 by lowering `cholesky`. #### What does this implement/fix? Removes the decorator and instead moves the batching loop to C. A benchmark has been added (results under the fold): remarkably for 2D arrays this implementation is slower than before, but this conflicts the fact that...
diff --git a/benchmarks/benchmarks/linalg.py b/benchmarks/benchmarks/linalg.py index 40403f50eccb..34c1dc6bca76 100644 --- a/benchmarks/benchmarks/linalg.py +++ b/benchmarks/benchmarks/linalg.py @@ -222,6 +222,23 @@ def time_eig(self, shape, module): sl.eig(self.a) +class BatchedCholeskyBench(Benchmark...
9
8
2
[{"id": "G0", "claim": "Make `lower` and `overwrite_a` optional in the C `_linalg_cholesky` entry point - parse with `\"O!|pp\"` and give them default values - for consistency with the module's other entry points.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl...
null
scipy__scipy__24799
scipy/scipy
24,799
defect
a6454d25396855f6c201e8dea4be387564dfae13
018a53651fc61a82092211536ce809967dd5e8fc
ENH: spatial.KDTree: make thread-safe via immutability
Towards fixing #20669. Supersedes #20655. Currently, scipy.spatial.KDTree is *mostly* thread-safe. There are two major issues right now that this PR helps to fix: * `KDTree.tree` is lazily-initialized, which can lead to data races. * Some attributes of the KDTree are exposed as mutable ndarrays, which can cause ...
diff --git a/doc/source/tutorial/thread_safety.rst b/doc/source/tutorial/thread_safety.rst index f4de0f3ac619..9bc78414a684 100644 --- a/doc/source/tutorial/thread_safety.rst +++ b/doc/source/tutorial/thread_safety.rst @@ -31,16 +31,26 @@ informative error. For example, `scipy.integrate.ode` may raise an ``IntegratorC...
6
3
2
[{"id": "G0", "claim": "Changing tree.data to a read-only view may count as a breaking change, since t.data is now a view whose base is points rather than points itself.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new multithreaded query_ball_point ...
null
scipy__scipy__24804
scipy/scipy
24,804
defect
6f4b0bc89c71b23f11aa1ca990e44abe500b2a48
52be6b347fd528afbb8b5b4cf95dc9616a06c280
ENH: interpolate: add CuPy delegation for BSpline
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy....
diff --git a/benchmarks/benchmarks/interpolate.py b/benchmarks/benchmarks/interpolate.py index 68ba7e1f08d6..a3651cfbfb69 100644 --- a/benchmarks/benchmarks/interpolate.py +++ b/benchmarks/benchmarks/interpolate.py @@ -68,6 +68,29 @@ def time_evaluation(self): self.pp(self.xp) +class BenchBSpline(Benchmark...
5
4
3
[{"id": "G0", "claim": "The delegation code duplicates attribute-setting logic across __init__, construct_fast and _construct_from_xp (each object carries two sets of attributes with only one used) and mixes delegation with computation in one class; the reviewer asks to reuse _construct_from_xp in __init__ and, more fu...
null
scipy__scipy__24817
scipy/scipy
24,817
defect
6a6be8622f1bc8a2399240f5309b1ec484572f56
921d2fc1841663574357d940e7b21412689ece96
BUG: signal: fix peak widths zero division error
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy....
diff --git a/scipy/signal/_peak_finding_utils.pyx b/scipy/signal/_peak_finding_utils.pyx index 16c67ecc7c14..e3559a81546f 100644 --- a/scipy/signal/_peak_finding_utils.pyx +++ b/scipy/signal/_peak_finding_utils.pyx @@ -1,6 +1,7 @@ #cython: wraparound=False #cython: boundscheck=False #cython: nonecheck=False +#cython...
5
3
0
[{"id": "G0", "claim": "The reviewer asks whether anyone confirmed the hardcoded expected result of test_no_zero_division_with_prominence_data is genuinely correct, saying it may be the best that can be done but is worth asking.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
scipy__scipy__24913
scipy/scipy
24,913
defect
644777dce605a64948342cc4af1225e44da20453
54a041c6bae1c3d8b8d7744a7913055ce7117cc1
ENH: linalg.cholesky: leverage symmetry for performance
#### Reference issue - #24759 @ev-br @BasilLiekens #### What does this implement/fix? #24759 introduced a regression in the performance of Cholesky performance, particularly for real large matrices due to unnecessary copies (e.g. 3x worse for 512x512 with `lower=False`). This PR resolves the regression by lev...
diff --git a/benchmarks/benchmarks/linalg.py b/benchmarks/benchmarks/linalg.py index 5c3696ff6cd3..246ef6dfcceb 100644 --- a/benchmarks/benchmarks/linalg.py +++ b/benchmarks/benchmarks/linalg.py @@ -222,6 +222,30 @@ def time_eig(self, shape, module): sl.eig(self.a) +class CholeskyBench(Benchmark): + ...
9
8
1
[{"id": "G0", "claim": "Display the benchmark plots directly in the PR description rather than under a foldout, and add the benchmark script used to reproduce those plots in a foldout (or a link to a gist).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl...
null
scipy__scipy__24919
scipy/scipy
24,919
defect
4f84a43c5b3601a42dd9b6083fa4b2ebf1deb403
e6592cf63d7fc8a9e070adee930a19bc62fe2aa0
ENH: stats.rankdata: CuPy support via `repeat` workaround
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: https://scipy....
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 5b3c3cbbf519..201dbe53fead 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -10203,8 +10203,7 @@ def _validate_distribution(values, weights): return values, None -@xp_capabilities(skip_backends=[("cupy", "`repeat` can...
4
3
1
[{"id": "G0", "claim": "The code comment should say that `cupy.repeat` (not `xp.repeat`) does not support arrays of repeats, referencing CuPy issue 3849.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The index array could instead be generated as ...
null
scipy__scipy__24934
scipy/scipy
24,934
defect
7b67444a6a3f8b76bbbf0b069dda326f09c85422
9311fb362eb85ce00ecea6508cbd7603458dec37
BUG: fix VODE Jacobian transposition in dvode_jacobian_thunk (gh-24933)
## Summary Fixes #24933. In `scipy 1.17.x`, `scipy.integrate.ode` with `integrator='vode'` silently consumed the user-supplied Jacobian in **transposed** form relative to the documented convention (`jac[i,j] = df_i/dy_j`). The solver worked as though the user had supplied `jac[i,j] = df_j/dy_i`, causing ~17× more...
diff --git a/scipy/integrate/_dzvodemodule.c b/scipy/integrate/_dzvodemodule.c index 74d8c3fd233f..157ff4640b5d 100644 --- a/scipy/integrate/_dzvodemodule.c +++ b/scipy/integrate/_dzvodemodule.c @@ -352,25 +352,19 @@ dvode_jacobian_thunk(int neq, double t, double* y, int ml, int mu, return; } - // Co...
1
1
0
[{"id": "G0", "claim": "The assertion messages in the new test are way too long and should be removed, and the test's generally overly verbose AI-generated comments should be made more concise.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__24967
scipy/scipy
24,967
defect
e0d987ff01baca8a5e82275fc2dc8be37236046c
ae3777e9946818baf962cc1f11fb74bff01098d2
ENH:MAINT:linalg: Move `bandwidth` function from Cython to C
#### Reference issue This is a separation of #24907 that moves `linalg.bandwidth` from Cython to C without the SIMD details. On top of the changes over that PR, the missing nD docstring details and similar nD rectangle tests are added. #### AI Generation Disclosure No AI on top of #24907
diff --git a/scipy/linalg/_cythonized_array_utils.pxd b/scipy/linalg/_cythonized_array_utils.pxd index ccec61c078e5..103491beabba 100644 --- a/scipy/linalg/_cythonized_array_utils.pxd +++ b/scipy/linalg/_cythonized_array_utils.pxd @@ -35,6 +35,5 @@ ctypedef fused np_complex_numeric_t: cdef void swap_c_and_f_layout...
13
9
0
[{"id": "G0", "claim": "The inline return type annotation on `bandwidth` should say `np.int64` for both tuple positions; the author asks what belongs there if not `np.int64` and then notes the first optional should also be `np.int64`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "in...
null
scipy__scipy__24969
scipy/scipy
24,969
defect
f91569ab508100b8477dfdb6b7c5e5f3823c3db0
978e79e9bc2e6d322c526ae36a501f069a632e21
MAINT: linalg.qr: re-enable `overwrite_a`
#### Reference issue Towards #24645 by (partially) re-enabling `overwrite_a` for qr. #### What does this implement/fix? Re-enables `overwrite_a` for `mode == "raw"/"r"` + small optimization to zero-initialize returned `R` to prevent having to put it to 0 afterwards. Another optimization that bypasses the buffer en...
diff --git a/scipy/linalg/_decomp_qr.py b/scipy/linalg/_decomp_qr.py index db30f6dc304a..a014ea8f750b 100644 --- a/scipy/linalg/_decomp_qr.py +++ b/scipy/linalg/_decomp_qr.py @@ -214,6 +214,12 @@ def qr(a, overwrite_a=False, lwork=_NoValue, mode="full", pivoting=False, a1 = a1.copy() overwrite_a = overw...
3
3
0
[{"id": "G0", "claim": "The new test_overwrite_args parametrization should probably also cover the (2, 3, 4) shape and pivoting.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The copy_triangle_to_C docstring examples should keep the explanatory second ...
null
scipy__scipy__24996
scipy/scipy
24,996
defect
8a4633fa0e01d62e9ccdd06ebe5bb30551cfa056
fa0fa58d213ef01b2dc1c7e657f5711d8e60acff
ENH: sparse.csgraph.connected_components: state-of-the-art implementation of Tarjan's algorithm
The current implementation of the computation of strongly connected components of directed graphs in SciPy is an original algorithm described [here](https://www.timl.id.au/scc). While the algorithm might be very useful in an implicit context, such as compressed graphs, as it materializes just one successor iterator at ...
diff --git a/scipy/sparse/csgraph/_traversal.pyx b/scipy/sparse/csgraph/_traversal.pyx index c63eae259cb0..5ae8a7b63bf5 100644 --- a/scipy/sparse/csgraph/_traversal.pyx +++ b/scipy/sparse/csgraph/_traversal.pyx @@ -11,6 +11,7 @@ cimport numpy as np from scipy.sparse.csgraph._validation import validate_graph from scip...
7
4
0
[{"id": "G0", "claim": "The docstring should link to (cite) the Tarjan & Zwick paper instead of just saying \"their recent survey\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A repo link for the Rust implementation of the WebGraph framework m...
null
scipy__scipy__25001
scipy/scipy
25,001
defect
99a805bf59dd82bc91af224ef2325b0fecdb59f9
11b308256ff9aabac64e76a053b8d5a379e1ab43
ENH: linalg: add `overwrite_b` argument to `eigvals`
#### Reference issue Discovered in https://github.com/scipy/scipy/pull/24963#discussion_r3035416338, tracked in https://github.com/scipy/scipy/issues/24645#issuecomment-4186994113 #### What does this implement/fix? Add an `overwrite_b` keyword argument to `eigvals`. During the review of #24963 it was discovered th...
diff --git a/scipy/linalg/_decomp.py b/scipy/linalg/_decomp.py index f8d64acfc887..e375eedcae1b 100644 --- a/scipy/linalg/_decomp.py +++ b/scipy/linalg/_decomp.py @@ -858,7 +858,7 @@ def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False, return w, v -def eigvals(a, b=None, overwrite_a=...
2
2
1
[{"id": "G0", "claim": "The `overwrite_b` docstring line is missing a space before the colon and should read `overwrite_b : bool, optional`, as the reviewer's suggestion block proposes, to fix the numpydoc_lint failure.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"i...
null
scipy__scipy__25025
scipy/scipy
25,025
defect
7b8f056ebfecd71dea4c61f07e8b9a3d853fd90b
c564709a7f8520e22798636d96cff35a4454d6de
ENH: add a worked example of downstream usage of ILP64 `cython_lapack`
The bulk of work here done by @rgommers. #### Reference issue <!--Example: Closes gh-WXYZ.--> a follow-up to https://github.com/scipy/scipy/pull/24977 #### What does this implement/fix? <!--Please explain your changes.--> gh-24977 introduced the `blas_int` type for `cython_{blas,lapack}` which resolves to...
diff --git a/.github/workflows/linux_blas.yml b/.github/workflows/linux_blas.yml index baf1e3c099de..e9278dcb3f30 100644 --- a/.github/workflows/linux_blas.yml +++ b/.github/workflows/linux_blas.yml @@ -102,7 +102,6 @@ jobs: - name: Test run: spin test -j4 - mkl-cyilp64: runs-on: ubuntu-latest ...
11
8
3
[{"id": "G0", "claim": "The pixi.toml changes add a duplicated `[feature.build-mkl-cyilp64]` block, apparently fallout from a merge conflict, which should be removed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The doc sentence saying packages 'm...
null
scipy__scipy__25054
scipy/scipy
25,054
defect
77497d7eb0c8156e4c15504e017848195723f335
938a1bb9f6f8b5929c17fe6241da02e573248d70
DOC: misc typos in syntax
Some purely visual update (missing closing }), Also imbalanced backticks, and directive with a single colon, (interpreted as comments) One math directive was also not indented and had a trailing $, likely previosuly inline math was moved to a block math. [skip ci] #### Reference issue N/A #### What do...
diff --git a/scipy/_lib/_uarray/__init__.py b/scipy/_lib/_uarray/__init__.py index 91afdcedb180..843ab88a2084 100644 --- a/scipy/_lib/_uarray/__init__.py +++ b/scipy/_lib/_uarray/__init__.py @@ -1,5 +1,6 @@ """ -.. note: +.. note:: + If you are looking for overrides for NumPy-specific methods, see the docume...
1
1
0
[{"id": "G0", "claim": "The changes to scipy/_lib/_uarray/__init__.py should be submitted upstream to the Quansight-Labs/uarray repository instead of being made in this PR, including reverting the `.. note::` edit.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scitix__siclaw__127
scitix/siclaw
127
defect
94b0165ee0a87bfc8582d5926e474f4949cc1d83
2f88bc34156850e7ed0f9cae72dee78b67f1ef19
fix: allow combined short flags and add AUDIT_WRITE capability
## Summary - **Combined short flags**: `sort -rn` was rejected even though `-r` and `-n` are both individually whitelisted. The `allowedFlags` validator now decomposes all-letter combined short flags and checks each character. Partially-allowed combinations (e.g. `-ro`) are still blocked. - **AUDIT_WRITE capability**: ...
diff --git a/k8s/agentbox-template.yaml b/k8s/agentbox-template.yaml index efb9b67ec..1913dc79d 100644 --- a/k8s/agentbox-template.yaml +++ b/k8s/agentbox-template.yaml @@ -33,7 +33,7 @@ spec: securityContext: capabilities: drop: ["ALL"] - add: ["SETUID", "SETGID", "CHOWN", "FOWNER"] + ...
4
3
2
[{"id": "G0", "claim": "A row justifying AUDIT_WRITE should be added to the capability table in docs/design/security.md (section 5.2), which currently documents only SETUID, SETGID, CHOWN and FOWNER.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
scitix__siclaw__128
scitix/siclaw
128
defect
7e9937b1766d0e6a3c180ad1f4f946513443a087
e5fee0c08546f4084313997eb32d5eed9bad0679
feat(tools): require explicit kubeconfig in multi-cluster sessions
## Summary - All K8s tools (`run_skill`, `node_exec`, `pod_exec`, `pod_script`, `node_script`, `netns_script`, `pod_nsenter_exec`) now accept an optional `kubeconfig` parameter for cluster selection - When multiple kubeconfigs are registered, **omitting the parameter is an error** — prevents accidental operations on t...
diff --git a/src/tools/exec-utils.ts b/src/tools/exec-utils.ts index accd1369e..5fd952515 100644 --- a/src/tools/exec-utils.ts +++ b/src/tools/exec-utils.ts @@ -53,9 +53,15 @@ export interface ExecEnv { * Build a sanitised child-process environment with kubeconfig resolution. * Sets KUBECONFIG=/dev/null to block de...
6
5
0
[{"id": "G0", "claim": "Kubeconfig errors are returned in inconsistent formats across the 7 tools (JSON.stringify in node-exec/pod-exec/pod-nsenter-exec vs plain `Error: ...` in node-script/pod-script/netns-script/run-skill), so the agent LLM sees different error formats for the same failure; standardize on one format....
null
scitix__siclaw__257
scitix/siclaw
257
defect
0452a30e850bf88c91552f1482328fe70e45df00
b7ca5b4e759bea635545af9920f66f9e5a60d718
feat(runtime): make Runtime restart non-disruptive to active AgentBoxes
Three coordinated fixes that together let a Runtime pod restart leave existing AgentBox pods, in-flight chats, and async callback attribution intact. cert-manager: derive issuer DN from the loaded CA subject instead of hardcoding "Siclaw Runtime CA". Hardcoding broke chart-managed CAs (Helm genCA only sets CN) — iss...
diff --git a/helm/siclaw/templates/NOTES.txt b/helm/siclaw/templates/NOTES.txt index fc0f9eaf2..c953f11f3 100644 --- a/helm/siclaw/templates/NOTES.txt +++ b/helm/siclaw/templates/NOTES.txt @@ -9,3 +9,17 @@ Thank you for installing {{ include "siclaw.fullname" . }}! {{- end }} Gateway will create per-user subdir...
8
7
5
[{"id": "G0", "claim": "The lossy {CN, O, OU} DN projection only partially fixes the issuer-DN bug: real-world CAs carrying C/ST/L and other attributes still produce an issuer DN that is a strict subset of the CA subject DN, so X.509 path validation fails; pass the CA's full attribute list through (and at minimum add a...
null
scitix__siclaw__261
scitix/siclaw
261
defect
683d82d36630d425db37729d57d20ece9ffbdf27
115a089f63388d06f52b58beab94e03219be8a78
Truncate chat session title fields before persistence
## Summary - clamp chat session titles and previews to their MySQL column limits before persistence - reuse the same normalization for adapter RPC, internal adapter route, and portal chat session routes - add unit coverage for long title/preview handling ## Test plan - npm test -- src/portal/chat-session-fields.test.t...
diff --git a/src/portal/adapter-rpc.test.ts b/src/portal/adapter-rpc.test.ts index 78c094c6f..ba398fa4f 100644 --- a/src/portal/adapter-rpc.test.ts +++ b/src/portal/adapter-rpc.test.ts @@ -633,6 +633,25 @@ describe("chat.ensureSession", () => { expect(query.mock.calls[0][1]).toContain("New Session"); }); + i...
3
2
2
[{"id": "G0", "claim": "The PATCH endpoint reuses normalizeChatSessionTitle for an UPDATE, so a user sending PATCH {title: \"\"} to clear the title gets it silently rewritten to \"New Session\" and can never blank the title via the API; it should be split into a truncate-only helper for UPDATE while INSERT paths keep t...
null
scitix__siclaw__52
scitix/siclaw
52
defect
e0b0b96fd5dd897a98d7a9e616b0aeb95db52d00
9359288a61ecf109d45e10f741b2a7a66dcacff6
Dev/ob
## Summary <!-- 1-3 sentences: what problem does this solve and how. --> ### Problem <!-- What broke or was missing? What symptom/impact did it cause? --> ### Solution <!-- What changed and why this approach over alternatives? --> ## Test Plan - [ ] `npx tsc --noEmit` passes - [ ] `npm test` passe...
diff --git a/docs/install/kubernetes.mdx b/docs/install/kubernetes.mdx index 77b832164..6cc90d9ad 100644 --- a/docs/install/kubernetes.mdx +++ b/docs/install/kubernetes.mdx @@ -126,3 +126,118 @@ spec: <Note> WebSocket support is required for real-time investigation updates. Set appropriate proxy timeouts for long-run...
10
8
2
[{"id": "G0", "claim": "The bearer-token auth check for /metrics endpoints is copy-pasted in three locations (agentbox-main.ts, agentbox/http-server.ts, gateway/server.ts) and should be extracted to a shared checkMetricsAuth helper in shared/metrics.ts.", "category": "maintainability", "verdict": "supported", "priority...
null
score-spec__score-compose__120
score-spec/score-compose
120
defect
0d4f338a56ffc664c1b832b2e56001417fb2af4f
c939a12eec01704f2dce4a0cf4ec1b9c13de1a60
fix: workload when container command or args contains `$` variables
A suggestion for solving issue #105 with the `$` variables in the commands and the arguments. #### Description Replaces the Dollar sign (`$`) in the variables in the command and argument strings with the double Dollar sign (`$$`). #### What does this PR do? Fix for the bug #105 . #### Types of changes <!---...
diff --git a/internal/compose/convert.go b/internal/compose/convert.go index 333ba48a..4d2f6e61 100644 --- a/internal/compose/convert.go +++ b/internal/compose/convert.go @@ -78,6 +78,16 @@ func ConvertSpec(state *project.State, spec *score.Workload) (*compose.Project, env[key] = &resolved } + // replace doll...
1
1
1
[{"id": "G0", "claim": "The regex misses strings that start with '$' (e.g. \"$VAR\"); fix it and add a test.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
score-spec__score-compose__150
score-spec/score-compose
150
defect
508760856c570dd71e7a30e911d8f5535ed31276
e11fa140e9d1fc6f4757890a7f705c46a6fa3cbd
feat: added kafka-topic provisioner
See the newly added example in examples/13-kafka-topic. This provisions a 3-partition kafka topic on a random host. ``` $ go run ../../cmd/score-compose resources list dns.default#hello-world.dns kafka-topic.default#hello-world.bus route.default#hello-world.route $ go run ../../cmd/score-compose resources get...
diff --git a/README.md b/README.md index 0b22f670..f026b2be 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ The `score.yaml` specification file can be executed against a _Score Implementat | route | default | `host`, `path`, `port` | ...
2
1
0
[{"id": "G0", "claim": "The reviewer questions making the broker host port opt-in via the compose.score.dev/publish-port annotation and suggests always publishing the port instead.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The hard-coded 9092 broker p...
null
score-spec__score-compose__267
score-spec/score-compose
267
defect
4bb24e8f22ffc482ff6099e8f0db7c7ff24d0b45
e0beccacd7f01acda337f0930230d1dcacc0f92b
refactor: resources list update output format
<!--- Provide a general summary of your changes in the Title above --> #### Description <!--- Describe your changes in detail --> Fix #257 update `score-compose resources list` command to reuse behavior added in provisioners list command ```bash ~$ go run cmd/score-compose/main.go resources list +--------...
diff --git a/internal/command/resources.go b/internal/command/resources.go index 48f0a9ab..4d9b2440 100644 --- a/internal/command/resources.go +++ b/internal/command/resources.go @@ -27,6 +27,7 @@ import ( "gopkg.in/yaml.v3" "github.com/score-spec/score-compose/internal/project" + "github.com/score-spec/score-com...
3
3
0
[{"id": "G0", "claim": "The reviewer questions whether the new single-line (minified) JSON formatting of the provisioners list golden output was intended.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The output formatter refactor should also be applied...
null
score-spec__score-compose__302
score-spec/score-compose
302
defect
840caa825540c78b4fe84a4f39e84e95bc5f4ef0
04165bce363a5d6ac402bb4a9bdab500f9d03849
Support new `files|volumes` spec with `score-go` `v1.10.0`
github.com/score-spec/score-go v1.10.0 https://github.com/score-spec/score-go/pull/103 based on https://github.com/score-spec/spec/pull/123#issuecomment-2793203515 This PR also makes sure that previous/old `files|volumes` spec is still working while we support the new spec. Both examples working with this new ...
diff --git a/go.mod b/go.mod index 3c8ee074..7310c100 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/compose-spec/compose-go/v2 v2.6.0 github.com/mitchellh/mapstructure v1.5.0 - github.com/score-spec/score-go v1.9.7 + github.com/score-spec/score-go v1....
5
5
2
[{"id": "G0", "claim": "Iterate volumes in deterministic sorted-key order instead of Go's randomised map order.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The volumes slice should be created with len 0 and a capacity of len(cSpec.Volumes) instea...
null
score-spec__score-compose__34
score-spec/score-compose
34
defect
9bff21d2cd8bc4ba58c90d9c795aa7144407a9cb
79e2528b721c2d2af1b0b0ec3199f7297230a524
removed properties from score spec
<!--- Provide a general summary of your changes in the Title above --> #### Description We are planning to deprecate resource properties in the Score spec: https://github.com/score-spec/spec/issues/61 #### What does this PR do? It removes resource properties from the example score.yaml files we store in this re...
diff --git a/examples/02-environment/README.md b/examples/02-environment/README.md index 8d0a05a5..6af0e991 100644 --- a/examples/02-environment/README.md +++ b/examples/02-environment/README.md @@ -21,10 +21,6 @@ containers: resources: env: type: environment - properties: - NAME: - type: string...
1
1
1
[{"id": "G0", "claim": "The CLI code needs to be updated to work with the property-less examples, otherwise the examples will not work and would confuse users, so code changes must land before approval or merge.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
score-spec__score-compose__57
score-spec/score-compose
57
defect
2bfce294aa44bf92c8f0dcffdd3f3fae9fdb1195
39cb8afe05d109e5d138ae53063f3010e40ca487
feat: support score-compose init subcommand
The init subcommand makes it easier to get started with Score compose! ``` $ score-compose init --help The init subcommand will prepare the current directory for working with score-compose and prepare any local files or configuration needed to be successful. A directory named .score-compose will be created if ...
diff --git a/internal/command/init.go b/internal/command/init.go new file mode 100644 index 00000000..b1c29802 --- /dev/null +++ b/internal/command/init.go @@ -0,0 +1,135 @@ +package command + +import ( + "errors" + "fmt" + "log/slog" + "os" + "path/filepath" + + "github.com/spf13/cobra" + + "github.com/score-spec/scor...
2
2
2
[{"id": "G0", "claim": "LoadStateDirectory should not stat the config file before opening it; it should attempt the read directly and handle the failure, to avoid file-opening race conditions.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The init comma...
null
score-spec__score-go__14
score-spec/score-go
14
defect
75a810d22ad1d61598de36c7e4faa95716a0505a
bcc59908baa7f1ea13911a98e08e86837a342e13
fix: added missing host and scheme properties into httpGet probe spec
Added missing `host` and `scheme` properties into `httpGet` probe spec #### Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) ...
diff --git a/loader/loader_test.go b/loader/loader_test.go index 20ddf6f..95f8d1e 100644 --- a/loader/loader_test.go +++ b/loader/loader_test.go @@ -81,6 +81,8 @@ containers: port: 8080 readinessProbe: httpGet: + host: "1.1.1.1" + scheme: HTTPS path: /ready port: 808...
1
1
0
[{"id": "G0", "claim": "The test case that sets httpGet scheme to 12 is named 'containers.*.livenessProbe.httpGet.path is not a string', so the test's name should say scheme instead, as the reviewer's suggestion asks.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
score-spec__score-go__150
score-spec/score-go
150
defect
41d8718041d86b5a711a4cd02652e09aaf0aea3b
65e4b7855783db83ae4912aa4fb72a07a6069f76
feat: non-schema valiodation
Add `Validate` function to `loader` package that performs non-schema validation. #### Description The new validation function allows users of the `score-go` package to optionally perform non-schema validation such as placeholder correctness. #### What does this PR do? - This is a pre-requisite for [Support o...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a23ab4..ab46f1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,6 @@ jobs: go vet ./... go test ./... --cover - name: Install license check tool - run: go install github.com/goog...
3
3
1
[{"id": "G0", "claim": "The comment above placeholderMatch misspells \"Differnete\" and should read \"Different\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new validation duplicates the parsing logic of framework.Substitutor (regex, subs...
null
score-spec__score-go__48
score-spec/score-go
48
defect
3693bf27a646427891738c1b57d2f8c3f6c8184d
0c8b008a35a834c244c4a34c9b3f72c2fd6d5e79
added a oci function to support generic image
<!--- Provide a general summary of your changes in the Title above --> The main purpose of this PR is to fix #45 by adding the OCI feature mentioned [here](https://github.com/score-spec/score-compose/issues/178) #### Description <!--- Describe your changes in detail --> Added a new case check for oci and implemente...
diff --git a/go.mod b/go.mod index 997217d..60e4ed1 100644 --- a/go.mod +++ b/go.mod @@ -13,5 +13,9 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pmezard/go-difflib...
5
4
0
[{"id": "G0", "claim": "The ExampleGetFile_oci test prints `err`, which is necessarily nil at that point, so printing it is pointless and should be dropped.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The hand-rolled OCI URL parsing and repo-url comp...
null
score-spec__score-go__59
score-spec/score-go
59
defect
b417b1efae6768d99cbd90b44880ba7bcab68444
56de00d82c80ed2ed6680166c747a329c47f1e82
fixed OCI image import bug
<!--- Provide a general summary of your changes in the Title above --> #### Description <!--- Describe your changes in detail --> It's an attempt to solve the issue faced by getOci #### What does this PR do? <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, plea...
diff --git a/uriget/example_test.go b/uriget/example_test.go index f4ad784..99c4dff 100644 --- a/uriget/example_test.go +++ b/uriget/example_test.go @@ -52,7 +52,7 @@ func ExampleWithHttpClient() { // Output: failed to make get request: Get "https://example.com": no proxy } func ExampleGetFile_oci() { - testUrl := ...
2
2
2
[{"id": "G0", "claim": "If specifiedFile is blank and the manifest contains more than one yaml layer, the fetcher should return an error telling the user to pick a specific file via the URL fragment instead of silently selecting the first match.", "category": "correctness", "verdict": "supported", "priority": "P1", "sc...
null
score-spec__score-go__85
score-spec/score-go
85
defect
6d43d4261c561a54ed2a19d680aed087331670a6
0964d5b35bbb6a81885633164918305d364a11bb
GetStdinFile functionality moved from score compose
### **Description** This pull request moves the `GetStdinFile` function from the score-compose repository to the score-go repository under the uriget package. ### **Changes Made** Moved `GetStdinFile` to score-go: - The `GetStdinFile` function is now located in score-go/uriget/uriget.go. - The `GetStdinFil...
diff --git a/uriget/uriget.go b/uriget/uriget.go index d498571..5a56c19 100644 --- a/uriget/uriget.go +++ b/uriget/uriget.go @@ -94,6 +94,9 @@ const () // - file or no scheme: attempts to read the file from local file system. // - git-ssh / git-https: attempts to perform a sparse checkout of just the target file. fu...
3
2
1
[{"id": "G0", "claim": "The rawUri == \"-\" special case should not be a branch in the top-level GetFile scheme dispatch but handled down in o.getFile so the logic stays consistent with the other URI options.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
scp-fs2open__fs2open.github.com__4771
scp-fs2open/fs2open.github.com
4,771
defect
663474516f3ad7784fe33bd56fb82edc78c591e7
8a576d0cdd5389c3f791a4fb2045e9e0231b370c
add support for subfolders to cfile
Allow indexing of files in subfolders of known cfile path types as if the files in those subfolders were directly part of the known path. Essentially a cosmetic change allowing mod makers to organize their files in a better way without requiring any direct content changes or special code handling to take advantage of t...
diff --git a/cmake/platform-win32.cmake b/cmake/platform-win32.cmake index 6e3345ef5a5..b20502fb9cb 100644 --- a/cmake/platform-win32.cmake +++ b/cmake/platform-win32.cmake @@ -10,6 +10,7 @@ SET(WIN32_LIBS winmm ws2_32 psapi + shlwapi ) IF (MINGW) diff --git a/code/bmpman/bmpman.cpp b/code/bmpman/bmpman.cpp i...
10
7
5
[{"id": "G0", "claim": "Cfile paths with known subfolders get the files in those subfolders indexed twice, currently affecting data/interface.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "cf_get_file_list() does not support requesting or listing f...
null
scp-fs2open__fs2open.github.com__5468
scp-fs2open/fs2open.github.com
5,468
defect
8c237626a5d9959a00e1f597816289437572bd0a
9a0be2d1414a74629f9a7e470bbfbf612a50bc91
additional cleanup from PR 5462
Some streamlining and constifying of the readyroom popup list and associated functions. Followup to #5462.
diff --git a/code/cfile/cfile.cpp b/code/cfile/cfile.cpp index 3de718d153f..f3c9457ed40 100644 --- a/code/cfile/cfile.cpp +++ b/code/cfile/cfile.cpp @@ -438,7 +438,7 @@ int cfile_flush_dir(int dir_type) // filename = name of filename or filepath to process // ext = extension to add. Must start with the period ...
1
1
0
[{"id": "G0", "claim": "Use a const-qualified declaration (e.g. `const auto`) for `fname` in hud_config_color_load instead of plain `auto`, so the constness is easier to tell.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
scp-fs2open__fs2open.github.com__5655
scp-fs2open/fs2open.github.com
5,655
defect
be8ec8264923e02e8f4109b6599c918a83dff02c
9d30ed53a9ef405040d483cfed0851c380aa72d8
Make version parsing available
Extracts the version parsing code from the Lua API. Prerequisite for #5583
diff --git a/code/globalincs/version.cpp b/code/globalincs/version.cpp index 89979ef54d4..38e226eb8cf 100644 --- a/code/globalincs/version.cpp +++ b/code/globalincs/version.cpp @@ -102,6 +102,39 @@ version get_executable_version() { version::version(int major_in, int minor_in, int build_in, int revision_in) : major(...
2
2
2
[{"id": "G0", "claim": "The two version parsing functions introduced by this PR should be consolidated into one.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A version could be successfully parsed yet still have one of its numbers be -1, so version::ve...
null
scp-fs2open__fs2open.github.com__5894
scp-fs2open/fs2open.github.com
5,894
defect
733e1adcba84f20aa2021f241a368380a0207fa5
71ee9501f9cac3d3d0499b4c9adc3b1890ec854e
Coverity: Change many auto calls to const auto& to avoid unnecessary copies.
Technically these are all optimizations. Some of them might even have the tiniest impact. There are also a couple of very small refactors that also avoid unnecessary copies instead of usting auto &.
diff --git a/code/controlconfig/controlsconfig.cpp b/code/controlconfig/controlsconfig.cpp index 4aea4be1cf9..c2e6a3f9e73 100644 --- a/code/controlconfig/controlsconfig.cpp +++ b/code/controlconfig/controlsconfig.cpp @@ -923,8 +923,8 @@ bool control_config_do_reset(bool cycle, bool API_Access) // first, determine h...
4
3
0
[{"id": "G0", "claim": "The 64-byte stack buffer `temp` used with snprintf could be reduced to 32 bytes.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Do not remove the `const` from keyType/valueType in visitMap_type.", "category": "maintainabi...
null
scrapinghub__extruct__100
scrapinghub/extruct
100
defect
c3ef08892b076d342bc9e15aafa372f10cca371e
25a832d7614a7ea4ef069a0af909d202ded75fec
ignore any exception if errors='ignore'
as explained in #99 errors='ignore' was not universal. I wanted to add a test but I don't know how to test exceptions
diff --git a/extruct/_extruct.py b/extruct/_extruct.py index c2323abf..9c4e82b1 100644 --- a/extruct/_extruct.py +++ b/extruct/_extruct.py @@ -13,7 +13,9 @@ SYNTAXES = ['microdata', 'opengraph', 'json-ld', 'microformat', 'rdfa'] -def extract(htmlstring, base_url=None, encoding="UTF-8", +def extract(htmlstring, + ...
4
4
3
[{"id": "G0", "claim": "The unification failure handler must also handle errors='log'; as written at S1 only 'ignore' returns {} and everything else falls through to a bare raise, so a unification failure under errors='log' would not be logged.", "category": "correctness", "verdict": "supported", "priority": "P1", "sco...
null
scrapinghub__extruct__101
scrapinghub/extruct
101
defect
3ab5592b4ae0f1f2a5e321d089219d9300e6851c
3d4bf5d6258bf3d3ecec45c3646585772881b6aa
[MRG+1] Add dublincore metadata
This PR adds Dublincore schema to extruct. To implement parsing I used this document as guide: http://dublincore.org/documents/dcq-html/ (Specially on **3.** that explains how a DC consumer should act). More references: - https://en.wikipedia.org/wiki/Dublin_Core - http://dublincore.org/2012/06/14/dcterms - http:...
diff --git a/extruct/_extruct.py b/extruct/_extruct.py index ba35a6fa..81a951f6 100644 --- a/extruct/_extruct.py +++ b/extruct/_extruct.py @@ -6,11 +6,12 @@ from extruct.w3cmicrodata import MicrodataExtractor from extruct.opengraph import OpenGraphExtractor from extruct.microformat import MicroformatExtractor -from ...
9
9
4
[{"id": "G0", "claim": "A uniform processor should be added for dublincore so its output is converted to the uniform syntax like the other extractors (reviewer unsure whether applicable).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The code should not...
null
scrapinghub__extruct__105
scrapinghub/extruct
105
defect
3ab5592b4ae0f1f2a5e321d089219d9300e6851c
b0d55ac1f5b9e3fde92b71e959cf299cfbb29c68
Avoid including itemprop from child itemscopes when using itemref
Extruct deals wrongly with elements referenced by `itemref` if the referenced element also include other items defined inside with `itemscope`. For example: ```html <html> <body> <div id="product" itemscope itemtype="http://schema.org/Product" itemref="other-product-properties"> <span itemprop="name">Executive...
diff --git a/extruct/w3cmicrodata.py b/extruct/w3cmicrodata.py index 54e9c167..4561b91c 100644 --- a/extruct/w3cmicrodata.py +++ b/extruct/w3cmicrodata.py @@ -10,6 +10,8 @@ """ import collections +from functools import partial + try: from urlparse import urljoin except ImportError: @@ -119,10 +121,25 @@ def ...
3
1
1
[{"id": "G0", "claim": "The order of the extracted images seems reversed relative to the depth-first traversal order, and the reviewer wonders whether that should be cared about.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The sample output conta...
null
scrapinghub__extruct__115
scrapinghub/extruct
115
defect
de219cb809676ecdf59dfe8f127a198764be5d4a
07a556b58069d6cd4d1857b569496b5d4c9752a0
Reverse priorities for repeated properties in uniform format for opengraph
Some pages contain a duplicated definition of some properties like "og:image". See the following pages: https://nerdist.com/article/star-wars-cast-reylo-episode-ix/ https://cleantechnica.com/2019/04/16/fukushimas-final-costs-will-approach-one-trillion-dollars-just-for-nuclear-disaster/ Extruct default behaviour se...
diff --git a/extruct/uniform.py b/extruct/uniform.py index 9a530b53..3d7ffd5c 100644 --- a/extruct/uniform.py +++ b/extruct/uniform.py @@ -4,7 +4,7 @@ def _uopengraph(extracted): out = [] for obj in extracted: - flattened = dict(obj['properties']) + flattened = dict(reversed(obj['properties']))...
2
1
1
[{"id": "G0", "claim": "The tests do not check whether the first seen value of a repeated OpenGraph property is the one kept, and the reviewer asks the author to add such a test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Taking the last og: value a...
null
scrapinghub__extruct__121
scrapinghub/extruct
121
defect
6df8e1908882ecca950e2792ac6dd1bda5f49c0d
9c6e8c4c4c5957fe84ff503e7b55f99339f5db4a
OpenGraph skipping empty for properties with values on flattening
Solves https://github.com/scrapinghub/extruct/issues/117
diff --git a/extruct/uniform.py b/extruct/uniform.py index 3d7ffd5c..ead34252 100644 --- a/extruct/uniform.py +++ b/extruct/uniform.py @@ -4,7 +4,13 @@ def _uopengraph(extracted): out = [] for obj in extracted: - flattened = dict(reversed(obj['properties'])) + # In order of appearance in the pa...
1
1
0
[{"id": "G0", "claim": "Use a `{k: v ...}` dict comprehension instead of `dict((k, v) ...)` when building the flattened OpenGraph properties.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
scrapinghub__extruct__138
scrapinghub/extruct
138
defect
0648f1ac27e11ea691a28c9c73f76b58027e65a7
41f8ce1e2e04223a8b6b844baeaa683c3534a233
Added support for Open Graph arrays
Fixes #92 Once merged this would return Open Graph array when uniform is set True
diff --git a/extruct/_extruct.py b/extruct/_extruct.py index ba35a6fa..988acb6e 100644 --- a/extruct/_extruct.py +++ b/extruct/_extruct.py @@ -21,6 +21,7 @@ def extract(htmlstring, uniform=False, return_html_node=False, schema_context='http://schema.org', + with_og_arra...
9
8
2
[{"id": "G0", "claim": "With the with_og_array flag the output should drop the list suffix and return a list under the original key (e.g. \"og:image\": [...]) instead of \"og:image_list\", making the change backwards-compatible.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {...
null
scrapinghub__extruct__206
scrapinghub/extruct
206
defect
9453e4348e06509e7716ada3de585cddfe2ad0d4
6d46d4feb95e568231acbca3846f45094a7edd0f
Allow receiving an external tree, drop python 3.7
A small performance improvement: allow receiving an external tree into extruct. Also bump the default Python version to 3.9, hope that's OK.
diff --git a/extruct/_extruct.py b/extruct/_extruct.py index cbe2a1a8..51da7f49 100644 --- a/extruct/_extruct.py +++ b/extruct/_extruct.py @@ -4,13 +4,15 @@ import warnings from typing import Any, Callable +from lxml.html import HtmlElement + from extruct.dublincore import DublinCoreExtractor from extruct.jsonld ...
3
3
0
[{"id": "G0", "claim": "Update the supported Python versions in setup.py classifiers and align the CI config, which still runs 3.7 and does not reflect the versions the pull request targets.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Parametrize...
null
scrapinghub__extruct__217
scrapinghub/extruct
217
defect
60538125f743c7c357fd170abcf94440ea45a132
699c8584d0250c7ffd18ba6658624f30226f45dd
fix: Add Support for lxml >= 5.2.0
lxml 5.1.0 removed _ElementStringResult which we use during dom traversal. This PR attempts to import _ElementStringResult as usual, but falls back to defining it explicitly if the import fails. This fixes https://github.com/scrapinghub/extruct/issues/215 I chose to attempt to import first to preserve existing behav...
diff --git a/extruct/xmldom.py b/extruct/xmldom.py index fe0a03ba..93d4e7c4 100644 --- a/extruct/xmldom.py +++ b/extruct/xmldom.py @@ -6,13 +6,7 @@ from xml.dom import Node from xml.dom.minidom import Attr, NamedNodeMap -from lxml.etree import ( - ElementBase, - XPath, - _ElementStringResult, - _Element...
4
3
0
[{"id": "G0", "claim": "Instead of the isinstance conditions in this code block, node.is_text and node.is_attribute could be used, at the cost of a baseline dependency of lxml>=5.1.1.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The requirements entry ...
null
scrapinghub__extruct__56
scrapinghub/extruct
56
defect
a524fed40dab12d5469c0664387a6eba66edfb38
7213a075ca37becaaaa89eaafd8dd1841795601c
Account for if jsonld is null
I recently found a URL for which ld+json was set to null. Wasn't sure where else this should have been caught so changed at the point where failure occurs
diff --git a/extruct/jsonld.py b/extruct/jsonld.py index 19518158..ddc179dd 100644 --- a/extruct/jsonld.py +++ b/extruct/jsonld.py @@ -12,6 +12,7 @@ HTML_OR_JS_COMMENTLINE = re.compile('^(\s*//.*)|(\s*<!--.*-->\s*)') + class JsonLdExtractor(object): _xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@...
2
2
2
[{"id": "G0", "claim": "Wrapping the whole extract_items comprehension in try/except TypeError means one empty (null) JSON-LD block makes the extraction return [] and swallows the potentially successful extraction of the other blocks; the catch belongs in _extract_items.", "category": "correctness", "verdict": "support...
null
scrapinghub__extruct__70
scrapinghub/extruct
70
defect
54ef8e7d405607253e864649379c354eaa5b0a1b
b2b68ba4f2b492312cf05767335fc6ed24068ed1
Add uniform and tests for opengraph, microdata and microformat
Still work in progress, need to define wether to add rdfa normalization here or to another pull request
diff --git a/extruct/__init__.py b/extruct/__init__.py index 0bbc17ba..b1a5dc22 100644 --- a/extruct/__init__.py +++ b/extruct/__init__.py @@ -6,19 +6,31 @@ from extruct.opengraph import OpenGraphExtractor from extruct.microformat import MicroformatExtractor from extruct.xmldom import XmlDomHTMLParser +from extruct....
9
7
2
[{"id": "G0", "claim": "Add examples of information loss caused by uniform=True to the README and document the new uniform feature there.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use ``elif`` instead of a second ``if`` for the dict branch in...
null
scrapinghub__extruct__74
scrapinghub/extruct
74
defect
9439fa48e51b071d26372af9ea94661e06a480d8
fcad79daa32eb0ae554e93bb6a4bfb9fad879e35
Flatten microformat children
some microformat pages return an extra ``children`` field that is structured as a list of dicts with ``type`` and ``properties``, eg: ``` { 'children': [ { 'properties': {'name': ['']}, 'type': [ 'h-hidden-tablet', 'h-hidden-phone']}, ...
diff --git a/extruct/uniform.py b/extruct/uniform.py index 38369f85..3c1c8651 100644 --- a/extruct/uniform.py +++ b/extruct/uniform.py @@ -51,6 +51,20 @@ def flatten_dict(d, schema_context, add_context): for o in value ] out[field] = value + + children = out.pop('children', [])...
2
2
1
[{"id": "G0", "claim": "Add unit tests for the new children-flattening logic in flatten_dict so its coverage can be ensured and the code easier to support.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Refactor the duplicated flattening logic in flatte...
null
scrapinghub__extruct__80
scrapinghub/extruct
80
defect
206cc1eaeb398a150efe3a9599c0bf531a9ab6cc
3a083548a4fb06744d516145739e74f7434734b3
Fix tests for microformats
It seems that new version of the library for parsing microformats have been updated recently and it causes that three tests does not pass anymore. I did the following here: - I verified why exactly the tests fails. * First of all `mf2py` seems to trim text in the content, so it means that signs of new line are rem...
diff --git a/requirements.txt b/requirements.txt index 1f2420ea..8281c38b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ gevent requests rdflib rdflib-jsonld -mf2py +mf2py==1.1.0 six w3lib diff --git a/tests/samples/misc/microformat_flat_test.json b/tests/samples/misc/microformat_flat_test.js...
1
1
0
[{"id": "G0", "claim": "requirements.txt should declare mf2py as >=1.1.0 instead of ==1.1.0 so that tests keep running against the latest mf2py release instead of a manually tracked fixed version.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scrapinghub__extruct__81
scrapinghub/extruct
81
defect
995f6b019b31085361ba8d8263bd43928b96d19b
a719a3a0a813046e6a76f303d6ee4f13e7347b49
[MRG+1] Add option to return html node during extraction
I've added here an option to return html nodes in the result of `extract` method. The motivation of that change is to be able to parse additionally html node in case the metadata item is not fully consistent with the standard. I checked in which syntaxes I can add that option and it seems it's possible only for microd...
diff --git a/HISTORY.rst b/HISTORY.rst index ea665d76..63cb7b92 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -31,6 +31,7 @@ v0.5.0 (TBD) * In ``w3microdata`` ``_extract_properties``, ``_extract_property_refs``, ``_extract_property``, ``_extract_property_value`` and ``_extract_item`` now need ``items_seen`` and...
6
6
1
[{"id": "G0", "claim": "The docstring of the return_html_node argument should add a note about the key under which the node is returned, mention that the node is of lxml.etree.Element type, and be wrapped to 79 columns.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"i...
null
scrapinghub__splash__13
scrapinghub/splash
13
defect
a3ff836b2c55212ad554e0bfcc79ab958e4c1b5d
abbfc3670614932cb21d34efbb54981c9db14fa1
render.json endpoint
render.json endpoint is introduced in this PR. It returns basically the same output as old iframes.json endpoint + a base64-encoded screenshot. It accepts the following GET arguments: - html=1 turns on html output (both for main page and for iframes); - png=1 turns on png rendering; - iframes=1 includes iframe inform...
diff --git a/README.rst b/README.rst index 516eca283..b44a07f95 100644 --- a/README.rst +++ b/README.rst @@ -49,9 +49,14 @@ baseurl : string : optional timeout : float : optional A timeout (in seconds) for the render (defaults to 30) +wait : float : optional + Time to wait for updates after page is loaded (defau...
4
1
0
[{"id": "G0", "claim": "The README should state that the 'wait' parameter is measured in seconds.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README should mention the splash/defaults.py module and its settings.", "category": "documentation...
null
scrapinghub__splash__159
scrapinghub/splash
159
defect
c34b7e027723de70db14de4dda5cb77c79923ba4
72f770041c0482294998413bafa93a5f48191a25
Split viewport size and full-page rendering parameters
This is yet another attempt at #131. The problem was that when "viewport=full" was selected, viewport was not resized till the very rendering and inherited the default window size which is small (640x480). In presence of so called fluid layouts this could significantly affect the appearance of the site (see #150 and ...
diff --git a/splash/browser_tab.py b/splash/browser_tab.py index 393ea883a..d3fcb116b 100644 --- a/splash/browser_tab.py +++ b/splash/browser_tab.py @@ -20,6 +20,7 @@ WrappedSignal, render_qwebpage) from splash.har.qt import cookies2har from splash.har.utils import without_private +from s...
7
6
3
[{"id": "G0", "claim": "BrowserTab should not be tied to GET/POST parameters: setting the window size in _init_webpage from render_options means the window size is set whenever a window_size argument is passed to /execute regardless of the script; the reviewer asks to require an explicit command for that instead.", "ca...
null
scrapinghub__splash__171
scrapinghub/splash
171
defect
6cabd338076cb489e1b438131406e992228cdab8
da1ddbcee8b40486d151128567126908c00c0bed
Make Lua viewport resize commands trigger a page relayout
This PR makes `splash:set_viewport_size` and `splash:set_viewport_full` operations synchronous w.r.t. Lua runtime. This should fix #167. ~~This is achieved by adding `qtutils.process_pending_events` function and using it in respective `Splash` commands. Internally visible `BrowserTab.set_viewport` is unchanged, becaus...
diff --git a/docs/scripting-ref.rst b/docs/scripting-ref.rst index d02e51491..d762e0882 100644 --- a/docs/scripting-ref.rst +++ b/docs/scripting-ref.rst @@ -603,17 +603,31 @@ Return a `width x height` screenshot of a current page in PNG format. **Returns:** PNG screenshot data. -TODO: document what default values ...
1
1
1
[{"id": "G0", "claim": "process_pending_events() may deliver pending Qt events — e.g. the page may redirect to a different URL — during a Lua command, and it is asked whether this differs from (is safer than) simply waiting 0 seconds.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intr...
null
scrapinghub__splash__225
scrapinghub/splash
225
defect
3765e3f3f223bda422cb0392667ff7fdd3b1873e
03ec169bd52e275383802d962338705ca855aaf7
Allow aborting requests depending on the content-type
Issue: #106 This can be used to block images, videos, css and other unnecessary resources from loading.
diff --git a/splash/network_manager.py b/splash/network_manager.py index 3f3e65cb8..8c8f16cf2 100644 --- a/splash/network_manager.py +++ b/splash/network_manager.py @@ -8,6 +8,7 @@ QNetworkAccessManager, QNetworkProxyQuery, QNetworkRequest, + QNetworkReply, QNetworkCookieJar ) from PyQt4.QtWebK...
6
6
2
[{"id": "G0", "claim": "Splash should allow setting the allowed/forbidden content-type filters per request rather than only at startup.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The two static helpers should be regular functions and the pull reque...
null
scrapinghub__splash__227
scrapinghub/splash
227
defect
d6f44909dddec6556262b98a243a36679565ce84
7c7af77e6f509f84009e4b40e34ee0a5b27b5905
[Issue #188][lua_scripting] allow to set result header
Adds method to lua splash objects allowing for setting response headers. https://github.com/scrapinghub/splash/issues/188
diff --git a/splash/qtrender_lua.py b/splash/qtrender_lua.py index dd5c53c7d..69c783155 100644 --- a/splash/qtrender_lua.py +++ b/splash/qtrender_lua.py @@ -260,6 +260,7 @@ class Splash(object): _result_content_type = None _attribute_whitelist = ['commands', 'args', 'tmp_storage', ...
6
6
2
[{"id": "G0", "claim": "The bad-result-header test should use self.assertErrorLineNumber instead of only asserting the 400 status code.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "str(header[0]) encodes non-ascii header values with a locale-dependent...
null
scrapinghub__splash__246
scrapinghub/splash
246
defect
6a2bcb6da07c4bee6fa12e0976bd38a4143648b2
3606fc5e5aaeacaa9992af4ae558e4383bd935a8
On response headers
Adds support for Lua callback `on_response_headers`. Callback will accept response object as argument, for now this object will have two methods: `get_header` and `abort()`. Using callback will allow users to abort requests if some header is present in response (e.g. content_type). https://github.com/scrapinghub/spla...
diff --git a/splash/lua_modules/splash.lua b/splash/lua_modules/splash.lua index cf8959c34..3afba11df 100644 --- a/splash/lua_modules/splash.lua +++ b/splash/lua_modules/splash.lua @@ -223,5 +223,31 @@ function Splash:on_request(cb) end) end +local Response = {} +Response.__index = Response + +function Response._...
6
5
1
[{"id": "G0", "claim": "The new _handleMetaData docstring says the signal is emitted before the response body is read / after the first bytes are read, which does not match the actual metaDataChanged timing (headers received, body not yet read).", "category": "design", "verdict": "supported", "priority": "P3", "scope":...
null
scrapinghub__splash__276
scrapinghub/splash
276
defect
607f75abe6f4f598b3663162160cb52822023de4
c86c05eb217c6fcd3f65443fa4929bbd9e28a5c6
POST method for outgoing Splash requests
it adds support for passing http_method argument to browser tab go() method. This allows to pass http_method and body in both HTTP API and in lua scripting. In Lua this can be done with `splash:go(url, http_method=method_name, body=raw_body)`. I also added optional argument `formdata` for `splash:go()`, it can be Lua...
diff --git a/splash/browser_tab.py b/splash/browser_tab.py index 5ab5f4cb5..5857b3b94 100644 --- a/splash/browser_tab.py +++ b/splash/browser_tab.py @@ -22,6 +22,8 @@ from splash.render_options import validate_size_str from splash.qwebpage import SplashQWebPage, SplashQWebView +from splash.render_options import Bad...
11
10
5
[{"id": "G0", "claim": "The first `(body and not headers)` condition in request_obj's content-type check is redundant and not needed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR should not use getattr to dispatch on the user-supplied m...
null
scrapinghub__splash__375
scrapinghub/splash
375
defect
f21e7b34e3596210f8712d65dab767548105ffa3
98f0dd09fdfa4c944873675bcf7fb32db3d35f9b
[browser_tab] set UA for requests not going via web page
before this commit requests not issued with QWebPage (e.g. from Lua with go and base_url, or with http_get, http_post or with all endpoints but base url argument) were not getting user agent. After this commit all requests issued by Splash will have UA set, regardless of where they are issued from (either web page or b...
diff --git a/splash/browser_tab.py b/splash/browser_tab.py index 03e9d89f6..0d20a7dbb 100644 --- a/splash/browser_tab.py +++ b/splash/browser_tab.py @@ -892,6 +892,9 @@ def _send_request(self, url, callback, method='GET', body=None, request = self.request_obj(url, headers=headers, body=body) + user_...
4
3
0
[{"id": "G0", "claim": "For completeness, add a test covering a user agent set both with set_user_agent and via the headers argument.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A user agent passed via the headers argument appears to persist for late...
null
scrapinghub__splash__402
scrapinghub/splash
402
defect
74cd6011d422ae000c25a29369867592e5dbc7ad
1a2747e82d95de1fde594c0c297216975ca20524
request/response middleware fixes
A fix for https://github.com/scrapinghub/splash/issues/397.
diff --git a/splash/network_manager.py b/splash/network_manager.py index 017fc6a6f..915b81689 100644 --- a/splash/network_manager.py +++ b/splash/network_manager.py @@ -332,12 +332,9 @@ def _run_webpage_callbacks(self, request, event_name, *args): # should we raise errors here? # https...
3
2
0
[{"id": "G0", "claim": "The PR should add an exception hook (sys.excepthook or equivalent) so that unhandled QT crashes, such as a TypeError from createRequest returning None, are logged instead of going completely unnoticed.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {...
null
scrapinghub__splash__41
scrapinghub/splash
41
defect
11a9b8d9466bd46e8a7f121e39ae8b0b71dbca9d
2437c3afe266b8a6d9ee591e8000fc22d1ba8de2
Add JavaScript execution support
This PR implements supports to execute javascript code in any of the Splash endpoints. It also add 2 new parameters to render.json (script and console) to control the display of the JavaScript output. This is an alternative approach to a previous PR implementing JS support (https://github.com/scrapinghub/splash/pull/2...
diff --git a/README.rst b/README.rst index d1d8d0a32..3b3c0ea13 100644 --- a/README.rst +++ b/README.rst @@ -276,6 +276,50 @@ add ``proxy=mywebsite`` parameter to request:: curl http://localhost:8050/render.html?url=http://mywebsite.com/page-with-javascript.html&proxy=mywebsite +Javascript Support +===========...
4
4
2
[{"id": "G0", "claim": "Restore the blank lines that separated groups of methods in splash/qtrender.py, which the pull request removed.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Move the JavaScript documentation out of the standalone 'Javas...
null
scrapinghub__splash__438
scrapinghub/splash
438
defect
2796a4debeadb810567942f61b50b94c697516d9
69d44b1ad8ea10fabce88202cac15f684c734264
adds splash:click() method
~~for now it gets css selector and does click on this element~~ updated to work with x, y coordinates
diff --git a/splash/browser_tab.py b/splash/browser_tab.py index 713b63798..d685e755a 100644 --- a/splash/browser_tab.py +++ b/splash/browser_tab.py @@ -6,10 +6,12 @@ import weakref import uuid -from PyQt5.QtCore import QObject, QSize, Qt, QTimer, pyqtSlot +from PyQt5.QtCore import QObject, QSize, Qt, QTimer, pyqtS...
10
6
1
[{"id": "G0", "claim": "splash:click cannot process <a> elements with target=_blank because the navigation request caused by clicking them is not handled by splash.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "splash:click only works for elements ...
null
scrapinghub__splash__447
scrapinghub/splash
447
defect
03a6daa868219bf5ea619062e5ff067edc15b956
f0a4e55650fa3db59c65fdcd857d34c7bd3442b6
Add splash:send_keys() method
This set of commits adds support for native send_keys method.
diff --git a/splash/browser_tab.py b/splash/browser_tab.py index d685e755a..365240e62 100644 --- a/splash/browser_tab.py +++ b/splash/browser_tab.py @@ -7,7 +7,7 @@ import uuid from PyQt5.QtCore import QObject, QSize, Qt, QTimer, pyqtSlot, QEvent, QPointF -from PyQt5.QtGui import QMouseEvent +from PyQt5.QtGui impor...
3
3
2
[{"id": "G0", "claim": "Sending the whole text as a single keyboard event (a Key_unknown press carrying all the text) is unlike a real keypress, and it would be better to send the events in a loop, one per key.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim...
null
scrapinghub__splash__45
scrapinghub/splash
45
defect
e9b104bd8278f7f494646d655f88d3d3b2aef446
1f579c46fbd6027a566158a9b79fb9f2210f210d
Add Javascript profiles support.
Add support to preload javascript libraries. This feature can be used to load common libraries like JQuery or custom libraries defined by the user.
diff --git a/README.rst b/README.rst index 596b1862a..6d9606b70 100644 --- a/README.rst +++ b/README.rst @@ -85,6 +85,31 @@ Curl example:: -d "document.title='My Title';" \ "http://localhost:8050/render.html?url=http://domain.com" +Splash supports "javascript profiles" that allows to preload javascr...
11
10
5
[{"id": "G0", "claim": "The README curl example contains a typo: the posted code should read myfunc('Hello');, not myfunc('Hello')';.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The js profile directory path should be restricted to the js_profi...
null
scrapinghub__splash__482
scrapinghub/splash
482
defect
e19bcefa548bdcaac0965374c597271124ba0321
2d8edb4faf4f139a951a7cbb74d4ab68669897ac
wraputils.lua setup_property_access shouldn't override class methods
This PR fixes bug when you create multiple instances for exposed objects. For example, when you call `splash#call_later` you create a new instance of `_ExposedTimer` Python class and `Timer` Lua class.
diff --git a/splash/lua_modules/extras.lua b/splash/lua_modules/extras.lua index 1a6d247b5..3233371d1 100644 --- a/splash/lua_modules/extras.lua +++ b/splash/lua_modules/extras.lua @@ -9,11 +9,12 @@ local Extras = {} local Extras_private = {} function Extras._create(py_extras) - local self = {} - setmetatable(sel...
6
3
0
[{"id": "G0", "claim": "The setters/getters tables created in setup_property_access should somehow be hidden from the wrapped object (`self`) instead of being stored on it.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR reworks @lua_property gette...
null
scrapinghub__splash__495
scrapinghub/splash
495
defect
477f93b5e0a43c193748bb1b0bfb6c4b0947be6f
775f03eb2017b40de8a6c0a7722c92434ff23a88
Store private fields on objects (take 2)
This is another take at what #487 was trying to accomplish. The idea is to have the object represented by an empty (public) table forwarding all field accesses via a metatable to the real (private) table . The metatable would reject all unwanted accesses and the object methods would work on the private instance direct...
diff --git a/splash/lua_modules/extras.lua b/splash/lua_modules/extras.lua index f00158d80..26f695f1c 100644 --- a/splash/lua_modules/extras.lua +++ b/splash/lua_modules/extras.lua @@ -6,12 +6,10 @@ local wraputils = require("wraputils") local Extras = wraputils.create_metatable() -local Extras_private = {} func...
4
2
1
[{"id": "G0", "claim": "Re-indent the trailing line-number comments on the lines added in test_private_jsfunc_attributes so they line up.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "public_self (and likewise public_mt just above it) is assign...
null
scrapinghub__splash__808
scrapinghub/splash
808
defect
3cba485e603998e6325277d1298e98ace1378f09
dbc76a911fed78736916eba9d4c490d10d0a5a05
Add callback for requests locked by lock_navigation
The `on_navigation_locked` callback proposed here is useful to track requests even after calling `splash:lock_navigation()`.
diff --git a/docs/scripting-ref.rst b/docs/scripting-ref.rst index 1ecdbafdf..bf9a4840e 100644 --- a/docs/scripting-ref.rst +++ b/docs/scripting-ref.rst @@ -2783,3 +2783,49 @@ Example: select all ``<img />`` elements and get their ``src`` attributes return treat.as_array(srcs) end + + +.. _splash-on-nav...
2
2
1
[{"id": "G0", "claim": "The RST section underlines for the new on_navigation_locked docs should match the length of their heading text (they currently raise/would raise a Sphinx 'underline is too short' error).", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1",...
null
scrapinghub__splash__811
scrapinghub/splash
811
defect
a3f7e757b3bdbc9d3cb6f79c5bfc316a8a05ae69
6caf758441566393d182f3430fd0f05fdd5845bb
Provide request body in request info.
Fixes #688 Besides the issues mentioned in the added documentation (non-standard HAR, request body not available in certain Lua functions), when this functionality is enabled it breaks the HAR viewer, which always expects postData with type "application/x-www-form-urlencoded" to have the "params" field.
diff --git a/docs/api.rst b/docs/api.rst index 263f24d56..4b0e5da4d 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -355,14 +355,26 @@ You can use online `HAR viewer`_ to visualize information returned from this endpoint; it will be very similar to "Network" tabs in Firefox and Chrome developer tools. -Currently th...
3
2
1
[{"id": "G0", "claim": "The new splash.request_body_enabled docs only say where request content is not available and do not say where it is available (e.g. in on_request callbacks, HAR).", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "_get_request_...
null
scrapinghub__splash__821
scrapinghub/splash
821
defect
a3f7e757b3bdbc9d3cb6f79c5bfc316a8a05ae69
7b2ea43cf87042ee3d7f5153dceb81b307fae769
[MRG+1] Added option to disable the webkit in-memory and network caches
Hi, I've been reading through the existing open issues. This pull request is intended to address #203 , #519 , scrapy-plugins/scrapy-splash#168 , #817 , webrecorder/har2warc#1 Please review Thanks, Stefan Note: To try this out, you can use this docker image: docker pull wsdookadr/splash:v1 docker...
diff --git a/docs/faq.rst b/docs/faq.rst index 6988723f1..9e54ec1cd 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -343,6 +343,19 @@ Please refer to `this great answer from kmike on reddit. .. _why-lua: +Why are CSS styling and images missing from the .har archive? +-----------------------------------------------...
4
4
2
[{"id": "G0", "claim": "The new FAQ text misspells the command as 'splasy' instead of 'splash' in the --disable-browser-caches instruction.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new settings.setObjectCacheCapacities(0,0,0) call does n...
null
scrapinghub__splash__86
scrapinghub/splash
86
defect
b510fc0264f6b00eee47a489bf0f20f67997c170
e5591a5c94e6c90298adf7e1a1458ef13ab72d73
Fix for issue #82
This PR fixes the issues #82 and #83. I used @kmike tests (e41f78df4fb53b687c58fcde17c7e4d03836a580) to validate them. Note that I am adding a SplashRequest class that inherits from twisted.web.server.Request. This is currently used to differentiate a Proxy request from a normal request.
diff --git a/splash/proxy_server.py b/splash/proxy_server.py index 5ed50a7ec..80ccb7660 100644 --- a/splash/proxy_server.py +++ b/splash/proxy_server.py @@ -20,6 +20,7 @@ class SplashProxyRequest(http.Request): + pass_headers = True def __init__(self, channel, queued): http.Request.__init__(self...
4
4
2
[{"id": "G0", "claim": "The custom SplashRequest class is unnecessary; use isinstance/getattr or a class attribute instead of creating another file and overriding the constructor.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add tests checking that hea...
null
scrapy__queuelib__38
scrapy/queuelib
38
defect
96ced3b0426177bc037c8f0ff3a25f7a6e7bcba0
f3bd12b5a893247d9f83f259750ba34f3155cdf7
peek
- [x] `queuelib.queue` - [x] `queuelib.pqueue` - [x] `queuelib.rrqueue`
diff --git a/.gitignore b/.gitignore index 0358150..3cc9bca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +htmlcov/ .coverage .tox *egg-info diff --git a/queuelib/pqueue.py b/queuelib/pqueue.py index 8ae295e..16e15cb 100644 --- a/queuelib/pqueue.py +++ b/queuelib/pqueue.py @@ -4,6 +4,7 @@ class PriorityQu...
3
2
0
[{"id": "G0", "claim": "One line of the new disk-queue peek code (the empty size-header branch) is not covered by the tests, and the author is unsure how to cover it, since it is also uncovered in the existing pop methods for disk queues.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "intr...
null
scrapy__scrapy__3442
scrapy/scrapy
3,442
defect
722397859465a6d82851c244dd8dfe8c36f1bcb8
f95f5c3876157f5206de8dcb6d74cb395711b5bb
Support for overriding OpenSSL ciphers
This adds the `DOWNLOADER_CLIENT_TLS_CIPHERS` setting which is then used in `ScrapyClientContextFactory`. There is a real-world example of when it may be needed in #3392 (the server offers a cipher that is rejected by the client so we need to not advertise it), there are other theoretical problems e.g. a server suppor...
diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst index 1f121777046..5ead9c8df07 100644 --- a/docs/topics/settings.rst +++ b/docs/topics/settings.rst @@ -431,6 +431,24 @@ parameter at init (this is the ``OpenSSL.SSL`` method mapping .. setting:: DOWNLOADER_CLIENT_TLS_METHOD +DOWNLOADER_CLIENT_TLS_CI...
7
4
0
[{"id": "G0", "claim": "The broken_ssl_context_factory helper in tests/mockserver.py should be renamed and restructured: removed in favour of a cipher_string argument (None by default) on ssl_context_factory, with a comment explaining the ctx.set_options line.", "category": "maintainability", "verdict": "supported", "p...
null
scrapy__scrapy__3450
scrapy/scrapy
3,450
defect
722397859465a6d82851c244dd8dfe8c36f1bcb8
94d0764990288f572dc383f417452df3c6820a16
Log cipher, certificate and temp key info on establishing an SSL connection
Fix #2111. Also related to #2726, though that ticket most likely asks for a programmatical access to all of this (I don't know if it's easily doable). Output example: > 2018-10-05 20:08:36 [scrapy.core.downloader.tls] DEBUG: SSL connection to market.yandex.ru using protocol TLSv1.2, cipher ECDHE-RSA-AES128-GCM-SH...
diff --git a/scrapy/core/downloader/tls.py b/scrapy/core/downloader/tls.py index df805118249..56e63563479 100644 --- a/scrapy/core/downloader/tls.py +++ b/scrapy/core/downloader/tls.py @@ -1,7 +1,9 @@ import logging from OpenSSL import SSL +import OpenSSL._util as pyOpenSSLutil from scrapy import twisted_version +...
2
2
1
[{"id": "G0", "claim": "The SSL information collecting (not the logging itself) should be moved out of the handshake callback into helper functions, likely with an OpenSSL compatibility check, e.g. in a new scrapy.util.ssl or scrapy.util.openssl module with helpers like x509name_to_string.", "category": "maintainabilit...
null
scrapy__scrapy__3559
scrapy/scrapy
3,559
defect
ab037ab7c99603325b3f40fe9d5da208ec018dae
cfd490ed1ce115942cfda6d049adc9068533cb38
Scheduler: minimal interface, API docs
Fixes #3537
diff --git a/docs/index.rst b/docs/index.rst index da264fb3417..aa1e72e9080 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -227,6 +227,7 @@ Extending Scrapy topics/extensions topics/api topics/signals + topics/scheduler topics/exporters @@ -248,6 +249,9 @@ Extending Scrapy :doc:`topics/signa...
5
5
0
[{"id": "G0", "claim": "Most of the scheduler API documentation should be moved into the Scheduler docstrings, with autodocs pulling from them (after #3520 settles).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The architecture.rst scheduler par...
null
scrapy__scrapy__3858
scrapy/scrapy
3,858
defect
3d8f075b0a9cd24558eecfad9995cc7e28ce9827
9ae89634a8d3dee6fa426a8289bb96d425661b45
[MRG+1] Support for exporting to multiple feeds in a single crawl
Fixes #1336 Introduced a new setting (`FEEDS`) and deprecated `FEED_URI` and `FEED_FORMAT`. `FEEDS` is a dictionary of feed definitions, which enables the user to override certain parameters independently for each feed. An example of this can be seen at https://github.com/scrapy/scrapy/pull/3858#issuecomment-5119247...
diff --git a/scrapy/commands/crawl.py b/scrapy/commands/crawl.py index 8093fd40295..c56ebe609ca 100644 --- a/scrapy/commands/crawl.py +++ b/scrapy/commands/crawl.py @@ -1,7 +1,5 @@ -import os from scrapy.commands import ScrapyCommand -from scrapy.utils.conf import arglist_to_dict -from scrapy.utils.python import witho...
7
6
4
[{"id": "G0", "claim": "The exporter check maps _storage_supported over the feed formats instead of _exporter_supported (typo in the S1 code).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The UsageError message should say 'colon' where it wrongly ...
null
scrapy__scrapy__4054
scrapy/scrapy
4,054
defect
7632e375c268d31c570904452902799db180c415
5bc97d55ced96b813aa2de542ae0b9f211ca06fb
Expose certificate for HTTPS responses
Fixes #2726 The approach I took here is very similar to the one in #3940. ~~No tests at the moment (not sure how to test this without requesting external pages since the mockserver uses HTTP, any help is appreciated :heart:),~~ posting a `scrapy shell` session instead: ``` $ scrapy shell https://example.org 20...
diff --git a/docs/conf.py b/docs/conf.py index 34dd5bcb7dd..c22e94321b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -273,4 +273,5 @@ intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), + 'twisted': ('https://twistedmatrix.com/documents/current/api', None), } diff --git a/docs/topics/r...
6
5
1
[{"id": "G0", "claim": "kmike asks that the Response documentation changes be separated into a different PR so they can be merged separately (M002), and that the docs/conf.py intersphinx 'twistedapi' entry likewise be reviewed and merged separately in scrapy/scrapy#4197 (M016).", "category": "process", "verdict": "unce...
null
scrapy__scrapy__4111
scrapy/scrapy
4,111
defect
be2e910dd06ba4904e7b10eb5a7e3251e8dab099
ec5a5bc15c61a61d888534dbf0bd1129741439d7
refactor LogStats extension to log IPM and RPM to stats on spider_close
Fixes #4110 **NOTE:** I noticed that the `LogStats` extension doesn't have any tests at all. I will write the tests later when this refactoring approach is approved.
diff --git a/scrapy/extensions/logstats.py b/scrapy/extensions/logstats.py index b685e7b1999..051b199b1cf 100644 --- a/scrapy/extensions/logstats.py +++ b/scrapy/extensions/logstats.py @@ -9,7 +9,10 @@ class LogStats(object): - """Log basic scraping stats periodically""" + """Log basic scraping stats periodi...
1
1
0
[{"id": "G0", "claim": "The new stats keys 'IPM' and 'RPM' would be better named 'items_per_minute' and 'requests_per_minute'.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scrapy__scrapy__4198
scrapy/scrapy
4,198
defect
8a1c99676e958b724cf3a35cc681ddee6941319d
63546cbf3e02380819732441ad55d95725dca7c5
Deprecate the HTTPS proxy noconnect mode.
This deprecates the noconnect mode for HTTPS proxies and removes related tests. As the mode was made for old Crawlera, it doesn't look like anything else needs it. scrapy_crawlera version is important because before 1.3.0 it added '?noconnect' to all Crawlera URLs automatically. Closes: #4187 (as not needed anymo...
diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index 7d917cb744f..782eca89e96 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -16,6 +16,7 @@ from twisted.web.client import Agent, ResponseDone, HTTPConnectionPo...
2
1
0
[{"id": "G0", "claim": "The deprecation warning should use a higher stacklevel so it points at the user code where noconnect is used.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Keep test_download_with_proxy_https_noconnect instead of deleting it...
null
scrapy__scrapy__4303
scrapy/scrapy
4,303
defect
22f7934fcc4912c1f9cdf87e426eb29d777db349
3769f75386104c1a3072894b302d3c3239ff8c37
request_left_downloader signal
As requested in https://github.com/scrapy/scrapy/pull/3520#issuecomment-580100847 (cc @elacuesta )
diff --git a/docs/topics/signals.rst b/docs/topics/signals.rst index 3f29aa32330..7fa5bc030c5 100644 --- a/docs/topics/signals.rst +++ b/docs/topics/signals.rst @@ -295,6 +295,23 @@ request_reached_downloader :param spider: the spider that yielded the request :type spider: :class:`~scrapy.spiders.Spider` obje...
7
7
0
[{"id": "G0", "claim": "The new signal's doc sentence should read \"leaves the downloader\" instead of \"left downloader\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The sentence \"The signal does not support returning deferreds from their ha...
null
scrapy__scrapy__4439
scrapy/scrapy
4,439
defect
0ee04e1e91f42d7fdd69f20b00a06e7856cdc919
1e12618f5b37a418b94dbfe4a694f62465484820
extract domain from cli genspider URL
This PR modifies behavior of cli `genspider` command to allow passing not only domain names, but also URLs. For example, `https://test.com/`, `http://test.com/`, `https://test.com/other` and `test.com/` arguments would all produce spider with `allowed_domains = ['test.com']` and `start_urls = ['http://test.com/']` ...
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index adb01fa7060..4cb71024a7d 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -4,6 +4,7 @@ from importlib import import_module from os.path import join, dirname, abspath, exists, splitext +from urllib.parse imp...
3
3
1
[{"id": "G0", "claim": "The PR author should add tests covering the new behavior of extracting the domain from the URL passed to genspider.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The find_in_file docstring should use double quotes instead of sin...
null
scrapy__scrapy__4500
scrapy/scrapy
4,500
defect
36abe9235c7e85f89fe80ae726ca2a72b8ed7971
47a992615a046d20c31bfca6f8b65c3194e9fd30
Serialize requests with callback references as spider attribute
You could define a spider attribute that references a callback method but if this method has a different name than your spider attribute, the request serializer is not able to find it on the spider class. With this commit we're fixing this behavior as we're searching for callback references in the spider object i...
diff --git a/scrapy/utils/reqser.py b/scrapy/utils/reqser.py index 749bbc3872f..78e13ec1003 100644 --- a/scrapy/utils/reqser.py +++ b/scrapy/utils/reqser.py @@ -1,6 +1,8 @@ """ Helper functions for serializing (and deserializing) requests. """ +import inspect + from scrapy.http import Request from scrapy.utils.pyt...
4
3
0
[{"id": "G0", "claim": "Add a comment explaining why the comparison uses `obj_func.__func__` instead of `obj_func`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The coverage report shows this line is never executed, and it is worth investigating...
null
scrapy__scrapy__4559
scrapy/scrapy
4,559
defect
892467cb8a40c54840284a08d0f98ab1b3af7bc4
a736df795b3055f3d32a52c28189ef9935f4e079
Stop response download from signal handler
Allow the cancellation of a download while it's in progress. Motivated by https://github.com/scrapy/scrapy/pull/4205#issuecomment-588155415. Tasks: - [x] Implementation - [x] Tests - [x] Docs - [x] Exceptions topic - [x] Request/Response topic - [x] FAQ entry - [x] Note in the `bytes_recei...
diff --git a/docs/faq.rst b/docs/faq.rst index 75a0f4864ff..c32ea9a9061 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -371,6 +371,18 @@ Twisted reactor is :class:`twisted.internet.selectreactor.SelectReactor`. Switch different reactor is possible by using the :setting:`TWISTED_REACTOR` setting. +.. _faq-cancel-d...
8
6
3
[{"id": "G0", "claim": "The import reordering in scrapy/signalmanager.py is wrong: third-party imports should come before the current library (Scrapy).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The repeated self.assertTrue(len(data) == 1) i...
null
scrapy__scrapy__4623
scrapy/scrapy
4,623
defect
092f6fdea1583a9fa31002506a9de22637ef52af
59c48f74e4af45b71f863cad29e3a3259a087743
Check if file is already present on running `scrapy genspider` and terminate if so (#4561)
Continuing from PR #4616 to fix #4561, I've added a direct file check to see if a spider with the name provided in `scrapy genspider` is already present in the directory and not overwrite the existing spider file if present.
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index abf3b7a5c68..638c8a65b3d 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -66,6 +66,10 @@ def run(self, args, opts): print("Cannot create a spider with the same name as your project") ...
5
5
2
[{"id": "G0", "claim": "The message \"Spider %r already exists in module\" is not entirely accurate, since any file with the same name would trigger it (not necessarily a spider), so the wording should talk about the file instead.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introd...
null
scrapy__scrapy__4626
scrapy/scrapy
4,626
defect
8b549392f924ddad9536e55c6120638daf688dfd
75d361e9eaddef018dcb83337a69cf5b19e7cc78
Fix missing storage.store calls in FeedExporter.close_spider
Fixes #4621.
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.py index 998d2a5d17a..30e6349d62f 100644 --- a/scrapy/extensions/feedexport.py +++ b/scrapy/extensions/feedexport.py @@ -270,7 +270,9 @@ def close_spider(self, spider): if not slot.itemcount and not slot.store_empty: ...
2
2
0
[{"id": "G0", "claim": "Import the two w3lib.url names in alphabetical order (file_uri_to_path first).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new test should carry a docstring explaining what it checks, and ideally the check would be...
null
scrapy__scrapy__4629
scrapy/scrapy
4,629
defect
8b549392f924ddad9536e55c6120638daf688dfd
9cd97ae655fd5436bc77909db2769c3f4e5ed2c3
Fix duplicated feed logs
Fixes #4619.
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.py index 998d2a5d17a..61ece9f7e04 100644 --- a/scrapy/extensions/feedexport.py +++ b/scrapy/extensions/feedexport.py @@ -277,11 +277,25 @@ def close_spider(self, spider): 'itemcount': slot.itemcount, ...
3
2
1
[{"id": "G0", "claim": "The get_cb/get_eb helper closures should be replaced with the linked default-argument technique, which would be much cleaner.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test covering the error scenario of feed storage.",...
null
scrapy__scrapy__4649
scrapy/scrapy
4,649
defect
0c8d8c5e85b8495992275c1df9444bb64da5e57b
f53f06020b740b450c7555d562565a27918e8036
Support schema-less HTTP proxy (#4504)
Fixes #4505 Implemented the solution suggested by @Gallaecio [in this PR](https://github.com/scrapy/scrapy/pull/4536#discussion_r420784056).
diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index 22c9ac5205e..73e56c87d4b 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -7,7 +7,7 @@ from contextlib import suppress from io import BytesIO from time imp...
2
2
1
[{"id": "G0", "claim": "The new test should strip the whole `http://` scheme (via the suggested `replace('http://', '')`) and ideally also cover a proxy without the `//`.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The implementation needs to change ...
null
scrapy__scrapy__4691
scrapy/scrapy
4,691
defect
f3372a3753643fea601564c01fcf65cc25a2db62
24e81bade70d8eb80a43f505ec68c67b000f30d6
Typing: annotate a few Spider attributes
Not really a comprehensive annotation, just a few attributes to remove several files from the ignore list.
diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py index 12b4fba09af..a66d6584653 100644 --- a/scrapy/spiders/__init__.py +++ b/scrapy/spiders/__init__.py @@ -5,6 +5,7 @@ """ import logging import warnings +from typing import Optional from scrapy import signals from scrapy.http import Request @...
3
1
0
[{"id": "G0", "claim": "The added `custom_settings: dict` annotation on the test spider may be unnecessary, since `custom_settings` is already annotated in the base class.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The added attribute annota...
null
scrapy__scrapy__4743
scrapy/scrapy
4,743
defect
07b0c591e06e76ab120e56fd0aa229dbabec9613
27de0c05a36d87a45dd70a7585f069cc882ba462
Remove py35 from CI
Closes #4732
diff --git a/.travis.yml b/.travis.yml index 33a920bb6d8..b883c5b78d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,16 +19,10 @@ matrix: python: 3.8 - env: TOXENV=pinned - python: 3.5.2 + python: 3.6.1 - env: TOXENV=asyncio-pinned - python: 3.5.2 # We use additional code to suppor...
3
2
2
[{"id": "G0", "claim": "The pinned Pillow version used for Windows needs to be upgraded to a release that ships a wheel for Python 3.6.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test expectation for get_func_args(\" \".join, stripself=True)...
null
scrapy__scrapy__4753
scrapy/scrapy
4,753
defect
f1250177dc1c486517b9ca8ed136162533014da7
ecec5f9e5171568c4ead64336245a1bb3be2ecfe
Do not recode JPEG files in imagepipelines
This patch completes the last few suggestions on the pull request #3689. Fixes #3055, closes #3689
diff --git a/scrapy/pipelines/images.py b/scrapy/pipelines/images.py index 0a67a0b1dc4..47d688c62a1 100644 --- a/scrapy/pipelines/images.py +++ b/scrapy/pipelines/images.py @@ -5,19 +5,20 @@ """ import functools import hashlib +import warnings from contextlib import suppress from io import BytesIO from itemadap...
5
5
1
[{"id": "G0", "claim": "Reorder the import into alphabetical order: `from scrapy.utils.python import get_func_args, to_bytes`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Drop the redundant `stacklevel=1` from the 'overriden in a deprecated w...
null