|
| 1 | +Julia v1.1 Release Notes |
| 2 | +======================== |
| 3 | + |
| 4 | +New language features |
| 5 | +--------------------- |
| 6 | + |
| 7 | + * An *exception stack* is maintained on each task to make exception handling |
| 8 | + more robust and enable root cause analysis. The stack may be accessed using |
| 9 | + the experimental function `Base.catch_stack` ([#28878]). |
| 10 | + * The experimental macro `Base.@locals` returns a dictionary of current local variable names |
| 11 | + and values ([#29733]). |
| 12 | + * Binary `~` can now be dotted, as in `x .~ y` ([#30341]). |
| 13 | + |
| 14 | +Language changes |
| 15 | +---------------- |
| 16 | + |
| 17 | + * Parser inputs ending with a comma are now consistently treated as incomplete. |
| 18 | + Previously they were sometimes parsed as tuples, depending on whitespace ([#28506]). |
| 19 | + * Spaces were accidentally allowed in broadcast call syntax, e.g. `f. (x)`. They are now |
| 20 | + disallowed, consistent with normal function call syntax ([#29781]). |
| 21 | + * Big integer literals and command syntax (backticks) are now parsed with the name of |
| 22 | + the macro (`@int128_str`, `@uint128_str`, `@big_str`, `@cmd`) qualified to refer |
| 23 | + to the `Core` module ([#29968]). |
| 24 | + * Using the same name for both a local variable and a static parameter is now an error instead |
| 25 | + of a warning ([#29429]). |
| 26 | + * `findall(in(b), a)` now returns a `CartesianIndex` when `a` is a matrix or a higher-dimensional array, |
| 27 | + for consistency with other `findall` methods. Use `LinearIndices(a)[findall(in(b), a)]` to get |
| 28 | + the old behavior, or `CartesianIndices(a)[findall(in(b), a)]` to get the new behavior |
| 29 | + on previous Julia versions ([#30226]). |
| 30 | + * `findmin(::BitArray)` and `findmax(::BitArray)` now return a `CartesianIndex` when `a` is a matrix |
| 31 | + or a higher-dimensional array, for consistency with other array types. |
| 32 | + Use `LinearIndices(a)[findmin(a)[2]]` to get the old behavior, or `CartesianIndices(a)[findmin(a)[2]]` |
| 33 | + to get the new behavior on previous Julia versions ([#30102]). |
| 34 | + * Method signatures such as |
| 35 | + `f(::Type{T}, ::T) where {T <: X}` and |
| 36 | + `f(::Type{X}, ::Any)` |
| 37 | + are now considered ambiguous. Previously a bug caused the first one to be considered more specific in |
| 38 | + some cases ([#30160]). |
| 39 | + |
| 40 | +Command-line option changes |
| 41 | +--------------------------- |
| 42 | + |
| 43 | + * When a script run in interactive mode (`-i`) throws an error, the REPL now starts after |
| 44 | + the error is displayed. Previously the REPL only started if the script completed without |
| 45 | + error ([#21233]). |
| 46 | + |
| 47 | +New library functions |
| 48 | +--------------------- |
| 49 | + |
| 50 | + * `splitpath(p::String)` function, which is the opposite of `joinpath(parts...)`: it splits a filepath |
| 51 | + into its components ([#28156]). |
| 52 | + * `isnothing(::Any)` predicate, to check whether the argument is `nothing`. ([#29679]). |
| 53 | + * `getpid(::Process)` method ([#24064]). |
| 54 | + * `eachrow`, `eachcol` and `eachslice` functions provide efficient iterators over slices of arrays ([#29749]). |
| 55 | + * `fieldtypes(T::Type)` which returns the declared types of the field in type T ([#29600]). |
| 56 | + * `uuid5` has been added to the `UUIDs` standard library ([#28761]). |
| 57 | + * Predicates `Sys.isfreebsd`, `Sys.isopenbsd`, `Sys.isnetbsd`, and `Sys.isdragonfly` for |
| 58 | + detecting BSD systems have been added ([#30249]). |
| 59 | + * Internal `Base.disable_library_threading` that sets libraries to use one thread. |
| 60 | + It executes function hooks that have been registered with |
| 61 | + `Base.at_disable_library_threading` ([#30004]). |
| 62 | + |
| 63 | +Standard library changes |
| 64 | +------------------------ |
| 65 | + |
| 66 | + * `CartesianIndices` can now be constructed from two `CartesianIndex`es `I` and `J` with `I:J` ([#29440]). |
| 67 | + * `CartesianIndices` support broadcasting arithmetic (+ and -) with a `CartesianIndex` ([#29890]). |
| 68 | + * `copy!` support for arrays, dicts, and sets has been moved to Base from the Future package ([#29173]). |
| 69 | + * Channels now convert inserted values (like containers) instead of requiring types to match ([#29092]). |
| 70 | + * `range` can accept the stop value as a positional argument, e.g. `range(1,10,step=2)` ([#28708]). |
| 71 | + * `diff` now supports arrays of arbitrary dimensionality and can operate over any dimension ([#29827]). |
| 72 | + * The constructor `BigFloat(::BigFloat)` now respects the global precision setting and always |
| 73 | + returns a `BigFloat` with precision equal to `precision(BigFloat)` ([#29127]). The optional |
| 74 | + `precision` argument to override the global setting is now a keyword instead of positional |
| 75 | + argument ([#29157]). |
| 76 | + * The use of scientific notation when printing `BigFloat` values is now consistent with other floating point |
| 77 | + types ([#29211]). |
| 78 | + * `Regex` now behaves like a scalar when used in broadcasting ([#29913]). |
| 79 | + * `Char` now behaves like a read-only 0-dimensional array ([#29819]). |
| 80 | + * `parse` now allows strings representing integer 0 and 1 for type `Bool` ([#29980]). |
| 81 | + * `Base.tail` now works on named tuples ([#29595]). |
| 82 | + * The process id is appended to malloc log files in order to track memory allocations of |
| 83 | + multiple processes ([#29969]). |
| 84 | + * `Base.julia_cmd` now propagates the `--inline=(yes|no)` flag ([#29858]). |
| 85 | + * `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]). |
| 86 | + * `merge(::NamedTuple, ::NamedTuple...)` can now be used with more than 2 `NamedTuple`s ([#29259]). |
| 87 | + * New `ncodeunits(c::Char)` method as a fast equivalent to `ncodeunits(string(c))` ([#29153]). |
| 88 | + * New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]). |
| 89 | + * `range` now accepts `stop` as a positional argument ([#28708]). |
| 90 | + * `get(A::AbstractArray, (), default)` now returns `A[]` instead of an empty array ([#30270]). |
| 91 | + * `parse(Bool, str)` is now supported ([#29997]). |
| 92 | + * `copyto!(::AbstractMatrix, ::UniformScaling)` now supports rectangular matrices ([#28790]). |
| 93 | + * `current_project()` now searches the parent directories of a Git repository for a `Project.toml` file. |
| 94 | + This also affects the behavior of the `--project` command line option when using the default |
| 95 | + `--project=@.` ([#29108]). |
| 96 | + * The `spawn` API is now more flexible and supports taking IOBuffer directly as an I/O stream, |
| 97 | + converting to a system pipe as needed ([#30278]). |
| 98 | + |
| 99 | +#### Dates |
| 100 | + * New `DateTime(::Date, ::Time)` constructor ([#29754]). |
| 101 | + * `TimeZone` now behaves like a scalar when used in broadcasting ([#30159]). |
| 102 | + |
| 103 | +#### InteractiveUtils |
| 104 | + * `edit` can now be called on a module to edit the file that defines it ([#29636]). |
| 105 | + * All compiler-reflection tools (i.e. the `code_` class of functions and macros) now print accurate |
| 106 | + line number and inlining information in a common style, and take an optional parameter (debuginfo=:default) |
| 107 | + to control the verbosity of the metadata shown ([#29893]). |
| 108 | + |
| 109 | +#### LinearAlgebra |
| 110 | + * `isdiag` and `isposdef` for `Diagonal` and `UniformScaling` ([#29638]). |
| 111 | + * `mul!`, `rmul!` and `lmul!` methods for `UniformScaling` ([#29506]). |
| 112 | + * `Symmetric` and `Hermitian` matrices now preserve the wrapper when scaled with a number ([#29469]). |
| 113 | + * Exponentiation operator `^` now supports raising an `Irrational` to an `AbstractMatrix` power ([#29782]). |
| 114 | + * Added keyword arguments `rtol`, `atol` to `rank` ([#29926]). |
| 115 | + |
| 116 | +#### Random |
| 117 | + * `randperm` and `randcycle` now use the type of their argument to determine the element type of |
| 118 | + the returned array ([#29670]). |
| 119 | + * A new method `rand(::Tuple)` implements sampling from the values of a tuple ([#25278]). |
| 120 | + * `serialize` and `deserialize` now accept a filename argument, like `write` and `read` ([#30151]). |
| 121 | + |
| 122 | +#### SparseArrays |
| 123 | + * `sprandn` now supports specifying the output element type ([#30083]). |
| 124 | + |
| 125 | +#### Statistics |
| 126 | + * `mean` and `var` now handle more kinds of empty inputs ([#29033]). |
| 127 | + |
| 128 | +External dependencies |
| 129 | +--------------------- |
| 130 | + |
| 131 | + * 7zip (bundled with Julia on Windows) has been upgraded from version 16.04 to 18.05 ([#30035]). |
| 132 | + * Busybox is no longer bundled with Julia on Windows ([#30022]). |
| 133 | + * OpenBLAS has been upgraded from 0.3.2 to 0.3.3 ([#29845]). |
| 134 | + * The source code for Pkg is no longer included in JuliaLang/julia. Pkg is instead |
| 135 | + downloaded during the build process ([#29615]). |
| 136 | + * LLVM has been upgraded to 6.0.1 and support for LLVM < 6.0 has been dropped ([#28745], [#28696]). |
| 137 | + * Pkg has been upgraded to version 1.1 ([#30342]). |
| 138 | + |
| 139 | +Deprecated or removed |
| 140 | +--------------------- |
| 141 | + |
| 142 | + * `one(i::CartesianIndex)` should be replaced with `oneunit(i::CartesianIndex)` ([#29442]). |
| 143 | + * The internal array `Base.Grisu.DIGITS` is deprecated; new code should use `Base.Grisu.getbuf()` |
| 144 | + to get an appropriate task-local buffer and pass it to `grisu()` instead ([#29907]). |
| 145 | + * The internal function `Base._default_type(T)` has been removed. Calls to it should be |
| 146 | + replaced with just the argument `T` ([#29739]). |
| 147 | + * `peakflops` has been scheduled to move from `InteractiveUtils` to `LinearAlgebra` |
| 148 | + but is already now available as `LinearAlgebra.peakflops` ([#29978]). |
| 149 | + |
| 150 | +<!--- generated by NEWS-update.jl: --> |
| 151 | +[#21233]: https://github.com/JuliaLang/julia/issues/21233 |
| 152 | +[#24064]: https://github.com/JuliaLang/julia/issues/24064 |
| 153 | +[#25278]: https://github.com/JuliaLang/julia/issues/25278 |
| 154 | +[#28156]: https://github.com/JuliaLang/julia/issues/28156 |
| 155 | +[#28506]: https://github.com/JuliaLang/julia/issues/28506 |
| 156 | +[#28696]: https://github.com/JuliaLang/julia/issues/28696 |
| 157 | +[#28708]: https://github.com/JuliaLang/julia/issues/28708 |
| 158 | +[#28745]: https://github.com/JuliaLang/julia/issues/28745 |
| 159 | +[#28761]: https://github.com/JuliaLang/julia/issues/28761 |
| 160 | +[#28790]: https://github.com/JuliaLang/julia/issues/28790 |
| 161 | +[#28878]: https://github.com/JuliaLang/julia/issues/28878 |
| 162 | +[#28902]: https://github.com/JuliaLang/julia/issues/28902 |
| 163 | +[#29033]: https://github.com/JuliaLang/julia/issues/29033 |
| 164 | +[#29092]: https://github.com/JuliaLang/julia/issues/29092 |
| 165 | +[#29108]: https://github.com/JuliaLang/julia/issues/29108 |
| 166 | +[#29127]: https://github.com/JuliaLang/julia/issues/29127 |
| 167 | +[#29153]: https://github.com/JuliaLang/julia/issues/29153 |
| 168 | +[#29157]: https://github.com/JuliaLang/julia/issues/29157 |
| 169 | +[#29173]: https://github.com/JuliaLang/julia/issues/29173 |
| 170 | +[#29211]: https://github.com/JuliaLang/julia/issues/29211 |
| 171 | +[#29259]: https://github.com/JuliaLang/julia/issues/29259 |
| 172 | +[#29316]: https://github.com/JuliaLang/julia/issues/29316 |
| 173 | +[#29429]: https://github.com/JuliaLang/julia/issues/29429 |
| 174 | +[#29440]: https://github.com/JuliaLang/julia/issues/29440 |
| 175 | +[#29442]: https://github.com/JuliaLang/julia/issues/29442 |
| 176 | +[#29469]: https://github.com/JuliaLang/julia/issues/29469 |
| 177 | +[#29506]: https://github.com/JuliaLang/julia/issues/29506 |
| 178 | +[#29595]: https://github.com/JuliaLang/julia/issues/29595 |
| 179 | +[#29600]: https://github.com/JuliaLang/julia/issues/29600 |
| 180 | +[#29615]: https://github.com/JuliaLang/julia/issues/29615 |
| 181 | +[#29636]: https://github.com/JuliaLang/julia/issues/29636 |
| 182 | +[#29638]: https://github.com/JuliaLang/julia/issues/29638 |
| 183 | +[#29670]: https://github.com/JuliaLang/julia/issues/29670 |
| 184 | +[#29679]: https://github.com/JuliaLang/julia/issues/29679 |
| 185 | +[#29733]: https://github.com/JuliaLang/julia/issues/29733 |
| 186 | +[#29739]: https://github.com/JuliaLang/julia/issues/29739 |
| 187 | +[#29749]: https://github.com/JuliaLang/julia/issues/29749 |
| 188 | +[#29754]: https://github.com/JuliaLang/julia/issues/29754 |
| 189 | +[#29781]: https://github.com/JuliaLang/julia/issues/29781 |
| 190 | +[#29782]: https://github.com/JuliaLang/julia/issues/29782 |
| 191 | +[#29819]: https://github.com/JuliaLang/julia/issues/29819 |
| 192 | +[#29827]: https://github.com/JuliaLang/julia/issues/29827 |
| 193 | +[#29845]: https://github.com/JuliaLang/julia/issues/29845 |
| 194 | +[#29858]: https://github.com/JuliaLang/julia/issues/29858 |
| 195 | +[#29890]: https://github.com/JuliaLang/julia/issues/29890 |
| 196 | +[#29893]: https://github.com/JuliaLang/julia/issues/29893 |
| 197 | +[#29907]: https://github.com/JuliaLang/julia/issues/29907 |
| 198 | +[#29913]: https://github.com/JuliaLang/julia/issues/29913 |
| 199 | +[#29926]: https://github.com/JuliaLang/julia/issues/29926 |
| 200 | +[#29968]: https://github.com/JuliaLang/julia/issues/29968 |
| 201 | +[#29969]: https://github.com/JuliaLang/julia/issues/29969 |
| 202 | +[#29978]: https://github.com/JuliaLang/julia/issues/29978 |
| 203 | +[#29980]: https://github.com/JuliaLang/julia/issues/29980 |
| 204 | +[#29997]: https://github.com/JuliaLang/julia/issues/29997 |
| 205 | +[#30004]: https://github.com/JuliaLang/julia/issues/30004 |
| 206 | +[#30022]: https://github.com/JuliaLang/julia/issues/30022 |
| 207 | +[#30035]: https://github.com/JuliaLang/julia/issues/30035 |
| 208 | +[#30083]: https://github.com/JuliaLang/julia/issues/30083 |
| 209 | +[#30102]: https://github.com/JuliaLang/julia/issues/30102 |
| 210 | +[#30151]: https://github.com/JuliaLang/julia/issues/30151 |
| 211 | +[#30159]: https://github.com/JuliaLang/julia/issues/30159 |
| 212 | +[#30160]: https://github.com/JuliaLang/julia/issues/30160 |
| 213 | +[#30226]: https://github.com/JuliaLang/julia/issues/30226 |
| 214 | +[#30249]: https://github.com/JuliaLang/julia/issues/30249 |
| 215 | +[#30270]: https://github.com/JuliaLang/julia/issues/30270 |
| 216 | +[#30278]: https://github.com/JuliaLang/julia/issues/30278 |
| 217 | +[#30341]: https://github.com/JuliaLang/julia/issues/30341 |
| 218 | +[#30342]: https://github.com/JuliaLang/julia/issues/30342 |
| 219 | + |
1 | 220 | Julia v1.0.0 Release Notes
|
2 | 221 | ==========================
|
3 | 222 |
|
|
0 commit comments