From fe5ed171ade0795902f21f05ef9defb60e25c4ff Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Sat, 14 Dec 2024 07:41:42 -0500 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=96=20[master]=20Bump=20the=20Spar?= =?UTF-8?q?seArrays=20stdlib=20from=201b4933c=20to=204fd3aad=20(#56830)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 1b4933c New commit: 4fd3aad Julia version: 1.12.0-DEV SparseArrays version: 1.12.0 Bump invoked by: @DilumAluthge Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaSparse/SparseArrays.jl/compare/1b4933ccc7b1f97427ff88bd7ba58950021f2c60...4fd3aad5735e3b80eefe7b068f3407d7dd0c0924 ``` $ git log --oneline 1b4933c..4fd3aad 4fd3aad Generalize `istriu`/`istril` to accept a band index (#590) 780c4de Bump codecov/codecov-action from 4 to 5 (#589) 1beb0e4 Update LICENSE.md (#587) 268d390 QR: handle xtype/dtype returned from LibSuiteSparse that don't match matrix element type (#586) 9731aef get rid of UUID changing stuff (#582) ``` Co-authored-by: Dilum Aluthge --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/SparseArrays.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/md5 delete mode 100644 deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/sha512 create mode 100644 deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/md5 create mode 100644 deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/sha512 diff --git a/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/md5 b/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/md5 deleted file mode 100644 index 41d78a15f2ddb..0000000000000 --- a/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -a643f01ee101a274d86d6469dd6a9d48 diff --git a/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/sha512 b/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/sha512 deleted file mode 100644 index 1868f9a865af5..0000000000000 --- a/deps/checksums/SparseArrays-1b4933ccc7b1f97427ff88bd7ba58950021f2c60.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -09a86606b28b17f1066d608374f4f8b2fcdcd17d08a8fa37b08edea7b27a9e6becadc8e8e93b1dcc1477dc247255d6a8ded4f8e678f46d80c9fd0ad72a7f3973 diff --git a/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/md5 b/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/md5 new file mode 100644 index 0000000000000..4c75f5c1f619a --- /dev/null +++ b/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/md5 @@ -0,0 +1 @@ +308e26cc6171656caaa7f6ba07e83d1c diff --git a/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/sha512 b/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/sha512 new file mode 100644 index 0000000000000..ad389d6e42048 --- /dev/null +++ b/deps/checksums/SparseArrays-4fd3aad5735e3b80eefe7b068f3407d7dd0c0924.tar.gz/sha512 @@ -0,0 +1 @@ +62b94ad0dca0d62e5753f50aef806ebdb5c8b56b241a285957190845be21fc6b8c8f93089b6f627795f6d7f2b1b01118bcff87c21102a3f3bae6d4c408362681 diff --git a/stdlib/SparseArrays.version b/stdlib/SparseArrays.version index af6fac41ddf84..0ff7a761bffa3 100644 --- a/stdlib/SparseArrays.version +++ b/stdlib/SparseArrays.version @@ -1,4 +1,4 @@ SPARSEARRAYS_BRANCH = main -SPARSEARRAYS_SHA1 = 1b4933ccc7b1f97427ff88bd7ba58950021f2c60 +SPARSEARRAYS_SHA1 = 4fd3aad5735e3b80eefe7b068f3407d7dd0c0924 SPARSEARRAYS_GIT_URL := https://github.com/JuliaSparse/SparseArrays.jl.git SPARSEARRAYS_TAR_URL = https://api.github.com/repos/JuliaSparse/SparseArrays.jl/tarball/$1 From f84d0c4014decb2607c7a54285bb028311e22c77 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Sat, 14 Dec 2024 16:07:22 -0500 Subject: [PATCH 2/4] Missing tests for IdSet (#56258) Co-authored-by: CY Han --- test/sets.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/sets.jl b/test/sets.jl index b78d2f15dd989..4d52cb243620c 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -1037,6 +1037,8 @@ end @test !isempty(A) A = empty!(A) @test isempty(A) + @test isnothing(sizehint!(A, 10)) + @test Base.copymutable(A) == copy(A) end @testset "⊊, ⊋" begin From 06f988b74150367ac7000f2db25e4864cf9cb036 Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Sat, 14 Dec 2024 22:20:31 +0100 Subject: [PATCH 3/4] Fix eltype of flatten of tuple with non-2 length (#56802) In 4c076c80af, eltype of flatten of tuple was improved by computing a refined eltype at compile time. However, this implementation only worked for length-2 tuples, and errored for all others. Generalize this to all tuples. Closes #56783 --------- Co-authored-by: Neven Sajko --- base/iterators.jl | 12 +++++++++--- test/iterators.jl | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/base/iterators.jl b/base/iterators.jl index 6b8d9fe75e302..c6278e6284d70 100644 --- a/base/iterators.jl +++ b/base/iterators.jl @@ -15,7 +15,8 @@ using .Base: AbstractRange, AbstractUnitRange, UnitRange, LinearIndices, TupleOrBottom, (:), |, +, -, *, !==, !, ==, !=, <=, <, >, >=, =>, missing, any, _counttuple, eachindex, ntuple, zero, prod, reduce, in, firstindex, lastindex, - tail, fieldtypes, min, max, minimum, zero, oneunit, promote, promote_shape, LazyString + tail, fieldtypes, min, max, minimum, zero, oneunit, promote, promote_shape, LazyString, + afoldl using Core: @doc using .Base: @@ -1202,8 +1203,13 @@ julia> [(x,y) for x in 0:1 for y in 'a':'c'] # collects generators involving It flatten(itr) = Flatten(itr) eltype(::Type{Flatten{I}}) where {I} = eltype(eltype(I)) -eltype(::Type{Flatten{I}}) where {I<:Union{Tuple,NamedTuple}} = promote_typejoin(map(eltype, fieldtypes(I))...) -eltype(::Type{Flatten{Tuple{}}}) = eltype(Tuple{}) + +# For tuples, we statically know the element type of each index, so we can compute +# this at compile time. +function eltype(::Type{Flatten{I}}) where {I<:Union{Tuple,NamedTuple}} + afoldl((T, i) -> promote_typejoin(T, eltype(i)), Union{}, fieldtypes(I)...) +end + IteratorEltype(::Type{Flatten{I}}) where {I} = _flatteneltype(I, IteratorEltype(I)) IteratorEltype(::Type{Flatten{Tuple{}}}) = IteratorEltype(Tuple{}) _flatteneltype(I, ::HasEltype) = IteratorEltype(eltype(I)) diff --git a/test/iterators.jl b/test/iterators.jl index d1e7525c43465..1feccf5fb1d3e 100644 --- a/test/iterators.jl +++ b/test/iterators.jl @@ -515,6 +515,14 @@ end @test eltype(flatten(UnitRange{Int8}[1:2, 3:4])) == Int8 @test eltype(flatten(([1, 2], [3.0, 4.0]))) == Real @test eltype(flatten((a = [1, 2], b = Int8[3, 4]))) == Signed +@test eltype(flatten((Int[], Nothing[], Int[]))) == Union{Int, Nothing} +@test eltype(flatten((String[],))) == String +@test eltype(flatten((Int[], UInt[], Int8[],))) == Integer +@test eltype(flatten((; a = Int[], b = Nothing[], c = Int[]))) == Union{Int, Nothing} +@test eltype(flatten((; a = String[],))) == String +@test eltype(flatten((; a = Int[], b = UInt[], c = Int8[],))) == Integer +@test eltype(flatten(())) == Union{} +@test eltype(flatten((;))) == Union{} @test length(flatten(zip(1:3, 4:6))) == 6 @test length(flatten(1:6)) == 6 @test collect(flatten(Any[])) == Any[] From 006f19c33ccb5563bff06168c7a952fbc4154279 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Dec 2024 19:42:17 -0500 Subject: [PATCH 4/4] Skip or loosen two `errorshow` tests on 32-bit Windows (#56837) Ref #55900. --- test/errorshow.jl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test/errorshow.jl b/test/errorshow.jl index 7a3d50d599f2e..f83bbe31b7cc4 100644 --- a/test/errorshow.jl +++ b/test/errorshow.jl @@ -791,8 +791,22 @@ backtrace() @test occursin("g28442", output[3]) @test lstrip(output[5])[1:3] == "[2]" @test occursin("f28442", output[5]) - @test occursin("the above 2 lines are repeated 5000 more times", output[7]) - @test lstrip(output[8])[1:7] == "[10003]" + is_windows_32_bit = Sys.iswindows() && (Sys.WORD_SIZE == 32) + if is_windows_32_bit + # These tests are currently broken (intermittently/non-determistically) on 32-bit Windows. + # https://github.com/JuliaLang/julia/issues/55900 + # Instead of skipping them entirely, we skip one, and we loosen the other. + + # Broken test: @test occursin("the above 2 lines are repeated 5000 more times", output[7]) + @test occursin("the above 2 lines are repeated ", output[7]) + @test occursin(" more times", output[7]) + + # Broken test: @test lstrip(output[8])[1:7] == "[10003]" + @test_broken false + else + @test occursin("the above 2 lines are repeated 5000 more times", output[7]) + @test lstrip(output[8])[1:7] == "[10003]" + end end @testset "Line number correction" begin