Skip to content

Commit 7fb0434

Browse files
sostockKristofferC
authored andcommitted
Add compat notes for Julia 1.6 (#39671)
(cherry picked from commit 715e626)
1 parent 502bb38 commit 7fb0434

File tree

9 files changed

+34
-0
lines changed

9 files changed

+34
-0
lines changed

base/cmd.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ setenv(cmd::Cmd; dir="") = Cmd(cmd; dir=dir)
251251
Merge new environment mappings into the given `Cmd` object, returning a new `Cmd` object.
252252
Duplicate keys are replaced. If `command` does not contain any environment values set already,
253253
it inherits the current environment at time of `addenv()` call if `inherit` is `true`.
254+
255+
!!! compat "Julia 1.6"
256+
This function requires Julia 1.6 or later.
254257
"""
255258
function addenv(cmd::Cmd, env::Dict; inherit::Bool = true)
256259
new_env = Dict{String,String}()

base/floatfuncs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ for example, in `x - y ≈ 0`, `atol=1e-9` is an absurdly small tolerance if `x`
253253
but an absurdly large tolerance if `x` is the
254254
[radius of a Hydrogen atom](https://en.wikipedia.org/wiki/Bohr_radius) in meters.
255255
256+
!!! compat "Julia 1.6"
257+
Passing the `norm` keyword argument when comparing numeric (non-array) arguments
258+
requires Julia 1.6 or later.
256259
257260
# Examples
258261
```jldoctest

base/operators.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,9 @@ Avoid adding methods to this function; define `in` instead.
11571157
11581158
Create a function that checks whether its argument contains the given `item`, i.e.
11591159
a function equivalent to `y -> item in y`.
1160+
1161+
!!! compat "Julia 1.6"
1162+
This method requires Julia 1.6 or later.
11601163
"""
11611164
(x) = Fix2(, x)
11621165

base/strings/search.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ Create a function that checks whether its argument occurs in `haystack`, i.e.
628628
a function equivalent to `needle -> occursin(needle, haystack)`.
629629
630630
The returned function is of type `Base.Fix2{typeof(occursin)}`.
631+
632+
!!! compat "Julia 1.6"
633+
This method requires Julia 1.6 or later.
631634
"""
632635
occursin(haystack) = Base.Fix2(occursin, haystack)
633636

base/subarray.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ Some immutable parent arrays (like ranges) may choose to simply
135135
recompute a new array in some circumstances instead of returning
136136
a `SubArray` if doing so is efficient and provides compatible semantics.
137137
138+
!!! compat "Julia 1.6"
139+
In Julia 1.6 or later, `view` can be called on an `AbstractString`, returning a
140+
`SubString`.
141+
138142
# Examples
139143
```jldoctest
140144
julia> A = [1 2; 3 4]

stdlib/LinearAlgebra/src/dense.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ overwriting the existing value of `C`.
347347
!!! tip
348348
Bounds checking can be disabled by [`@inbounds`](@ref), but you need to take care of the shape
349349
of `C`, `A`, `B` yourself.
350+
351+
!!! compat "Julia 1.6"
352+
This function requires Julia 1.6 or later.
350353
"""
351354
@inline function kron!(C::AbstractMatrix, A::AbstractMatrix, B::AbstractMatrix)
352355
require_one_based_indexing(A, B)

stdlib/Printf/src/Printf.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ formatted string directly to `io`.
5656
5757
For convenience, the `Printf.format"..."` string macro form can be used for building
5858
a `Printf.Format` object at macro-expansion-time.
59+
60+
!!! compat "Julia 1.6"
61+
`Printf.Format` requires Julia 1.6 or later.
5962
"""
6063
struct Format{S, T}
6164
str::S # original full format string as CodeUnits
@@ -375,6 +378,9 @@ For arbitrary precision numerics, you might extend the method like:
375378
```julia
376379
Printf.tofloat(x::MyArbitraryPrecisionType) = BigFloat(x)
377380
```
381+
382+
!!! compat "Julia 1.6"
383+
This function requires Julia 1.6 or later.
378384
"""
379385
tofloat(x) = Float64(x)
380386
tofloat(x::Base.IEEEFloat) = x

stdlib/REPL/src/TerminalMenus/AbstractMenu.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ keypress(m::AbstractMenu, i::UInt32) = false
149149
numoptions(m::AbstractMenu) -> Int
150150
151151
Return the number of options in menu `m`. Defaults to `length(options(m))`.
152+
153+
!!! compat "Julia 1.6"
154+
This function requires Julia 1.6 or later.
152155
"""
153156
numoptions(m::AbstractMenu) = length(options(m))
154157

@@ -169,6 +172,9 @@ number used for the initial cursor position. `cursor` can be either an
169172
control of the cursor position from the outside.
170173
171174
Returns `selected(m)`.
175+
176+
!!! compat "Julia 1.6"
177+
The `cursor` argument requires Julia 1.6 or later.
172178
"""
173179
request(m::AbstractMenu; kwargs...) = request(terminal, m; kwargs...)
174180

stdlib/REPL/src/TerminalMenus/MultiSelectMenu.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ were selected by the user.
5151
- `selected=[]`: pre-selected items. `i ∈ selected` means that `options[i]` is preselected.
5252
5353
Any additional keyword arguments will be passed to [`TerminalMenus.MultiSelectConfig`](@ref).
54+
55+
!!! compat "Julia 1.6"
56+
The `selected` argument requires Julia 1.6 or later.
5457
"""
5558
function MultiSelectMenu(options::Array{String,1}; pagesize::Int=10, selected=Int[], warn::Bool=true, kwargs...)
5659
length(options) < 1 && error("MultiSelectMenu must have at least one option")

0 commit comments

Comments
 (0)