Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports release 1.6.0 #40150

Merged
merged 6 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ New library features
inserting or consuming the first dimension depending on the ratio of `sizeof(T)` and `sizeof(S)`.
* New `append!(vector, collections...)` and `prepend!(vector, collections...)` methods accept multiple
collections to be appended or prepended ([#36227]).
* The postfix operator `'ᵀ` can now be used as an alias for `transpose` ([#38062]).
* `keys(io::IO)` has been added, which returns all keys of `io` if `io` is an `IOContext` and an empty
`Base.KeySet` otherwise ([#37753]).
* `count` now accepts an optional `init` argument to control the accumulation type ([#37461]).
Expand Down
1 change: 0 additions & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ export
# linear algebra
var"'", # to enable syntax a' for adjoint
adjoint,
var"'ᵀ",
transpose,
kron,
kron!,
Expand Down
1 change: 0 additions & 1 deletion base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ end
function kron! end

const var"'" = adjoint
const var"'ᵀ" = transpose

"""
\\(x, y)
Expand Down
12 changes: 12 additions & 0 deletions base/timing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ allocations, and the total number of bytes its execution caused to be allocated,
returning the value of the expression. Any time spent garbage collecting (gc) or
compiling is shown as a percentage.

In some cases the system will look inside the `@time` expression and compile some of the
called code before execution of the top-level expression begins. When that happens, some
compilation time will not be counted. To include this time you can run `@time @eval ...`.

See also [`@timev`](@ref), [`@timed`](@ref), [`@elapsed`](@ref), and
[`@allocated`](@ref).

Expand Down Expand Up @@ -264,6 +268,10 @@ end
A macro to evaluate an expression, discarding the resulting value, instead returning the
number of seconds it took to execute as a floating-point number.

In some cases the system will look inside the `@elapsed` expression and compile some of the
called code before execution of the top-level expression begins. When that happens, some
compilation time will not be counted. To include this time you can run `@elapsed @eval ...`.

See also [`@time`](@ref), [`@timev`](@ref), [`@timed`](@ref),
and [`@allocated`](@ref).

Expand Down Expand Up @@ -323,6 +331,10 @@ A macro to execute an expression, and return the value of the expression, elapse
total bytes allocated, garbage collection time, and an object with various memory allocation
counters.

In some cases the system will look inside the `@timed` expression and compile some of the
called code before execution of the top-level expression begins. When that happens, some
compilation time will not be counted. To include this time you can run `@timed @eval ...`.

See also [`@time`](@ref), [`@timev`](@ref), [`@elapsed`](@ref), and
[`@allocated`](@ref).

Expand Down
2 changes: 1 addition & 1 deletion deps/p7zip.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(BUILDDIR)/p7zip-$(P7ZIP_VER)/source-extracted: $(SRCCACHE)/p7zip-$(P7ZIP_VER).
$(JLCHECKSUM) $<
mkdir -p $(dir $@)
cd $(dir $@) && $(TAR) --strip-components 1 -jxf $<
echo $1 > $@
echo 1 > $@

checksum-p7zip: $(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.bz2
$(JLCHECKSUM) $<
Expand Down
4 changes: 2 additions & 2 deletions deps/pcre.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted: $(SRCCACHE)/pcre2-$(PCRE_VER).ta
cp $(SRCDIR)/patches/config.sub $(SRCCACHE)/pcre2-$(PCRE_VER)/config.sub
cd $(SRCCACHE)/pcre2-$(PCRE_VER) && patch -p1 -f < $(SRCDIR)/patches/pcre2-cet-flags.patch
# Fix some old targets modified by the patching
touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/aclocal.m4
touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.am
touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.in
touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/aclocal.m4
touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/configure
echo $1 > $@
echo 1 > $@

checksum-pcre2: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2
$(JLCHECKSUM) $<
Expand Down
12 changes: 0 additions & 12 deletions stdlib/LinearAlgebra/src/adjtrans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ julia> x'x
adjoint(A::AbstractVecOrMat) = Adjoint(A)

"""
A'ᵀ
transpose(A)

Lazy transpose. Mutating the returned object should appropriately mutate `A`. Often,
Expand All @@ -146,9 +145,6 @@ that this operation is recursive.
This operation is intended for linear algebra usage - for general data manipulation see
[`permutedims`](@ref Base.permutedims), which is non-recursive.

!!! compat "Julia 1.6"
The postfix operator `'ᵀ` requires Julia 1.6.

# Examples
```jldoctest
julia> A = [3+2im 9+2im; 8+7im 4+6im]
Expand All @@ -160,14 +156,6 @@ julia> transpose(A)
2×2 transpose(::Matrix{Complex{Int64}}) with eltype Complex{Int64}:
3+2im 8+7im
9+2im 4+6im

julia> x = [3, 4im]
2-element Vector{Complex{Int64}}:
3 + 0im
0 + 4im

julia> x'ᵀx
-7 + 0im
```
"""
transpose(A::AbstractVecOrMat) = Transpose(A)
Expand Down
1 change: 1 addition & 0 deletions stdlib/Markdown/src/render/terminal/formatting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ wrapped_lines(io::IO, f::Function, args...; width = 80, i = 0) =

function print_wrapped(io::IO, s...; width = 80, pre = "", i = 0)
lines = wrapped_lines(io, s..., width = width, i = i)
isempty(lines) && return 0, 0
print(io, lines[1])
for line in lines[2:end]
print(io, '\n', pre, line)
Expand Down
9 changes: 9 additions & 0 deletions stdlib/Markdown/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1213,3 +1213,12 @@ end
| $x |
""")
end

@testset "issue 40080: empty list item breaks display()" begin
d = TextDisplay(devnull)
display(d, md"""
1. hello
2.
""")
end

4 changes: 3 additions & 1 deletion stdlib/Random/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ type, which is a wrapper over the OS provided entropy.
Most functions related to random generation accept an optional `AbstractRNG` object as first argument,
which defaults to the global one if not provided. Moreover, some of them accept optionally
dimension specifications `dims...` (which can be given as a tuple) to generate arrays of random
values.
values. In a multi-threaded program, you should generally use different RNG objects from different threads
in order to be thread-safe. However, the default global RNG is thread-safe as of Julia 1.3 (because
it internally corresponds to a per-thread RNG).

A `MersenneTwister` or `RandomDevice` RNG can generate uniformly random numbers of the following types:
[`Float16`](@ref), [`Float32`](@ref), [`Float64`](@ref), [`BigFloat`](@ref), [`Bool`](@ref),
Expand Down
3 changes: 0 additions & 3 deletions test/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,4 @@ end
@test ∋(0)(-2:2)
end

a = rand(3, 3)
@test transpose(a) === a'ᵀ

@test [Base.afoldl(+, 1:i...) for i = 1:40] == [i * (i + 1) ÷ 2 for i = 1:40]