- Support for Unicode 12.1.0 (#32002).
- Methods can now be added to an abstract type (#31916).
- Support for unicode bold digits and double-struck digits 0 through 9 as valid identifiers (#32838).
- Added the syntax
var"#str#"
for printing and parsing non-standard variable names (#32408).
- New experimental
Threads.@spawn
macro that runs a task on any available thread (#32600). - All system-level I/O operations (e.g. files and sockets) are now thread-safe.
This does not include subtypes of
IO
that are entirely in-memory, such asIOBuffer
, although it specifically does includeBufferStream
. (#32309, #32174, #31981, #32421). - The global random number generator (
GLOBAL_RNG
) is now thread-safe (and thread-local) (#32407). - New
Channel(f::Function, spawn=true)
keyword argument to schedule the created Task on any available thread, matching the behavior ofThreads.@spawn
(#32872). - Simplified the
Channel
constructor, which is now easier to read and more idiomatic julia. Use of the keyword argumentscsize
andctype
is now discouraged (#30855, #32818).
findfirst
,findlast
,findnext
andfindprev
now accept a character as first argument to search for that character in a string passed as the second argument (#31664).- New
findall(pattern, string)
method wherepattern
is a string or regex (#31834). count(pattern, string)
gives the number of thingsfindall
would match (#32849).istaskfailed
is now documented and exported, like its siblingsistaskdone
andistaskstarted
(#32300).RefArray
andRefValue
objects now accept indexCartesianIndex()
ingetindex
andsetindex!
(#32653)- Added
sincosd(x)
to simultaneously compute the sine and cosine ofx
, wherex
is in degrees (#30134). - The function
nonmissingtype
, which removesMissing
from type unions, is now exported (#31562).
Pkg
can now download and install binary artifacts through thePkg.Artifacts
submodule and supporting functions. (#32918)- When
wait
(or@sync
, orfetch
) is called on a failingTask
, the exception is propagated as aTaskFailedException
wrapping the task. This makes it possible to see the location of the original failure inside the task (as well as the location of thewait
call, as before) (#32814). Regex
can now be multiplied (*
) and exponentiated (^
), like strings (#23422).Cmd
interpolation (`$(x::Cmd) a b c`
where) now propagatesx
's process flags (environment, flags, working directory, etc) ifx
is the first interpolant and errors otherwise (#24353).- Zero-dimensional arrays are now consistently preserved in the return values of mathematical
functions that operate on the array(s) as a whole (and are not explicitly broadcasted across their elements).
Previously, the functions
+
,-
,*
,/
,conj
,real
andimag
returned the unwrapped element when operating over zero-dimensional arrays (#32122). IPAddr
subtypes now behave like scalars when used in broadcasting (#32133).Pair
is now treated as a scalar for broadcasting (#32209).clamp
can now handle missing values (#31066).empty
now accepts aNamedTuple
(#32534).mod
now accepts a unit range as the second argument to easily perform offset modular arithmetic to ensure the result is inside the range (#32628).nothing
can now beprint
ed, and interpolated into strings etc. as the string"nothing"
. It is still not permitted to be interpolated into Cmds (i.e.echo `$(nothing)`
will still error without running anything.) (#32148)- When
open
is called with a function, command, and keyword argument (e.g.open(`ls`, read=true) do f ...
) it now correctly throws aProcessFailedException
like other similar calls (#32193). mktemp
andmktempdir
now try, by default, to remove temporary paths they create before the process exits (#32851).- Added argument
keep
tounescape_string
(#27125).
dlopen()
can now be invoked indo
-block syntax, similar toopen()
.
- The BLAS submodule no longer exports
dot
, which conflicts with that in LinearAlgebra (#31838). diagm
andspdiagm
now accept optionalm,n
initial arguments to specify a size (#31654).Hessenberg
factorizationsH
now support efficient shifted solves(H+µI) \ b
and determinants, and use a specialized tridiagonal factorization for Hermitian matrices. There is also a newUpperHessenberg
matrix type (#31853).- Added keyword argument
alg
tosvd
andsvd!
that allows one to switch between different SVD algorithms (#31057). - Five-argument
mul!(C, A, B, α, β)
now implements inplace multiplication fused with addition C = A B α + C β (#23919).
SparseMatrixCSC(m,n,colptr,rowval,nzval)
perform consistency checks for arguments:colptr
must be properly populated and lengths ofcolptr
,rowval
, andnzval
must be compatible withm
,n
, andeltype(colptr)
.sparse(I, J, V, m, n)
verifies lengths ofI
,J
,V
are equal and compatible witheltype(I)
andm
,n
.
DateTime
andTime
formatting/parsing now supports 12-hour clocks with AM/PM viaI
andp
codes, similar tostrftime
(#32308).
mean
now accepts both a function argument and adims
keyword (#31576).
Sockets.recvfrom
now returns both host and port as an InetAddr (#32729).- Added
InetAddr
constructor fromAbstractString
, representing IP address, andInteger
, representing port number (#31459).
foldr
andmapfoldr
now work on any iterator that supportsIterators.reverse
, not just arrays (#31781).
@spawn expr
from theDistributed
standard library should be replaced with@spawnat :any expr
(#32600).Threads.Mutex
andThreads.RecursiveSpinLock
have been removed; useReentrantLock
(preferred) orThreads.SpinLock
instead (#32875).
- The
ClangSA.jl
static analysis package has been imported, which makes use of the clang static analyzer to validate GC invariants in Julia's C code. The analysis may be run usingmake -C src analyzegc
.