From acc0005480f7047deaa32e6df2a2d2e2070fb435 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 1 Aug 2016 00:39:49 -0700 Subject: [PATCH 1/7] Remove deprecated AsyncStream from docs and contrib rephrase redundant "setup up" fix mismatched backticks fix typo run genstdlib fix sphinx warning grammar fix add a missing the rephrase "as many workers as cores" double backticks for rst remove a few unnecessary parens when calling at-test comment grammar tweaks --- base/clusterserialize.jl | 2 +- base/managers.jl | 2 +- base/math.jl | 4 ++-- base/multi.jl | 2 +- base/serialize.jl | 2 +- contrib/Julia_Notepad++.xml | 2 +- contrib/julia.lang | 1 - contrib/julia.xml | 1 - doc/devdocs/init.rst | 4 ++-- doc/devdocs/stdio.rst | 2 +- doc/manual/parallel-computing.rst | 2 +- doc/stdlib/parallel.rst | 2 +- src/signal-handling.c | 2 +- src/signals-mach.c | 2 +- test/math.jl | 18 +++++++++--------- test/random.jl | 4 ++-- test/spawn.jl | 3 +-- 17 files changed, 26 insertions(+), 29 deletions(-) diff --git a/base/clusterserialize.jl b/base/clusterserialize.jl index 4f42a862c3ba9..d8bdc25e5151f 100644 --- a/base/clusterserialize.jl +++ b/base/clusterserialize.jl @@ -21,7 +21,7 @@ function deserialize(s::ClusterSerializer, ::Type{TypeName}) if !full_body_sent tn = get(known_object_data, number, nothing)::TypeName if !haskey(object_numbers, tn) - # setup reverse mapping for serialize + # set up reverse mapping for serialize object_numbers[tn] = number end deserialize_cycle(s, tn) diff --git a/base/managers.jl b/base/managers.jl index 76ee09ef8631f..313127598fda1 100644 --- a/base/managers.jl +++ b/base/managers.jl @@ -93,7 +93,7 @@ Keyword arguments: + `topology=:master_slave` : Only the driver process, i.e. `pid` 1 connects to the workers. The workers do not connect to each other. - + `topology=:custom` : The `launch` method of the cluster manager specifes the + + `topology=:custom` : The `launch` method of the cluster manager specifies the connection topology via fields `ident` and `connect_idents` in `WorkerConfig`. A worker with a cluster manager identity `ident` will connect to all workers specified in `connect_idents`. diff --git a/base/math.jl b/base/math.jl index 3d062532243bb..69012f7201236 100644 --- a/base/math.jl +++ b/base/math.jl @@ -135,8 +135,8 @@ end Inf64 elseif x <= -1023 # if -1073 < x <= -1023 then Result will be a subnormal number - # Hex literal with padding must be use to work on 32bit machine - reinterpret(Float64, 0x0000_0000_0000_0001 << ((x + 1074)) % UInt) + # Hex literal with padding must be used to work on 32bit machine + reinterpret(Float64, 0x0000_0000_0000_0001 << ((x + 1074)) % UInt) else # We will cast everything to Int64 to avoid errors in case of Int128 # If x is a Int128, and is outside the range of Int64, then it is not -1023 true false C_NULL Inf NaN Inf32 NaN32 nothing - AbstractArray AbstractMatrix AbstractRemoteRef AbstractSparseMatrix AbstractString AbstractVector Any ArgumentError Array Associative AsyncStream BigFloat BigInt BitArray BitMatrix BitVector Bool BunchKaufman Cchar Cdouble Cfloat Char CharString CholeskyDense CholeskyPivotedDense Cint Cintmax_t Clong Clonglong Colon Complex Complex128 Complex64 ComplexPair Cptrdiff_t Cshort Csize_t Cuchar Cuint Cuintmax_t Culong Culonglong Cushort DArray Dict Dims DisconnectException EOFError EachLine EnvHash ErrorException Exception Expr Factorization Filter Float Float32 Float64 Function GSVDDense IO IOBuffer IOStream ImaginaryUnit InsertionSort Int Int128 Int16 Int32 Int64 Int8 IntSet Integer KeyError LDLTTridiagonal LUDense LUTridiagonal LoadError LocalProcess Matrix MergeSort MethodError NTuple Number ObjectIdDict ObjectIdDict OrdinalRange ParseError PipeBuffer ProcessGroup Ptr QRDense QRPivotedDense QuickSort Range Range1 RangeIndex Ranges Rational Real Regex RegexMatch RegexMatchIterator RepString RevString Reverse SVDDense Set Signed SparseMatrixCSC SpawnNullStream Stat StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubDArray SubOrDArray SubString SymTridiagonal Symbol SystemError Task TCPSocket TimSort Tridiagonal Tuple Type TypeError UInt UInt128 UInt16 UInt32 UInt64 UInt8 UVError Union Unsigned VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef Zip + AbstractArray AbstractMatrix AbstractRemoteRef AbstractSparseMatrix AbstractString AbstractVector Any ArgumentError Array Associative BigFloat BigInt BitArray BitMatrix BitVector Bool BunchKaufman Cchar Cdouble Cfloat Char CharString CholeskyDense CholeskyPivotedDense Cint Cintmax_t Clong Clonglong Colon Complex Complex128 Complex64 ComplexPair Cptrdiff_t Cshort Csize_t Cuchar Cuint Cuintmax_t Culong Culonglong Cushort DArray Dict Dims DisconnectException EOFError EachLine EnvHash ErrorException Exception Expr Factorization Filter Float Float32 Float64 Function GSVDDense IO IOBuffer IOStream ImaginaryUnit InsertionSort Int Int128 Int16 Int32 Int64 Int8 IntSet Integer KeyError LDLTTridiagonal LUDense LUTridiagonal LoadError LocalProcess Matrix MergeSort MethodError NTuple Number ObjectIdDict ObjectIdDict OrdinalRange ParseError PipeBuffer ProcessGroup Ptr QRDense QRPivotedDense QuickSort Range Range1 RangeIndex Ranges Rational Real Regex RegexMatch RegexMatchIterator RepString RevString Reverse SVDDense Set Signed SparseMatrixCSC SpawnNullStream Stat StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubDArray SubOrDArray SubString SymTridiagonal Symbol SystemError Task TCPSocket TimSort Tridiagonal Tuple Type TypeError UInt UInt128 UInt16 UInt32 UInt64 UInt8 UVError Union Unsigned VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef Zip abstract begin baremodule bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while close enumerate error info open print println read write warn print println diff --git a/contrib/julia.lang b/contrib/julia.lang index e7fef8da4b51c..15761f75efef3 100644 --- a/contrib/julia.lang +++ b/contrib/julia.lang @@ -255,7 +255,6 @@ (Error|Interrupt|Disconnect)?Exception Algorithm Associative - AsyncStream Box BunchKaufman CPUinfo diff --git a/contrib/julia.xml b/contrib/julia.xml index 9eae8f34ab56d..578d6e4650ba5 100644 --- a/contrib/julia.xml +++ b/contrib/julia.xml @@ -83,7 +83,6 @@ Any Array Associative - AsyncStream Bidiagonal BitArray BigFloat diff --git a/doc/devdocs/init.rst b/doc/devdocs/init.rst index d6aca3002337b..6603053a0a2c1 100644 --- a/doc/devdocs/init.rst +++ b/doc/devdocs/init.rst @@ -183,7 +183,7 @@ Base.eval `jl_toplevel_eval_in() `_ calls `jl_toplevel_eval_flex() `_ which calls `eval() in interpreter.c `_. -The stack dump below shows how the interpreter works its way through various methods of :func:`Base.println` and :func:`Base.print` before arriving at `write{T}(s::AsyncStream, a::Array{T}) `_ which does :code:`ccall(jl_uv_write())`. +The stack dump below shows how the interpreter works its way through various methods of :func:`Base.println` and :func:`Base.print` before arriving at `write{T}(s::IO, a::Array{T}) `_ which does :code:`ccall(jl_uv_write())`. `jl_uv_write() `_ calls :c:func:`uv_write` to write "Hello World!" to :c:macro:`JL_STDOUT`. See :ref:`dev-libuv`.:: @@ -195,7 +195,7 @@ calls :c:func:`uv_write` to write "Hello World!" to :c:macro:`JL_STDOUT`. See :r Stack frame Source code Notes ============================ ================= =============================================== jl_uv_write() jl_uv.c called though :func:`Base.ccall` -julia_write_282942 stream.jl function write!{T}(s::AsyncStream, a::Array{T}) +julia_write_282942 stream.jl function write!{T}(s::IO, a::Array{T}) julia_print_284639 ascii.jl print(io::IO, s::String) = (write(io, s);nothing) jlcall_print_284639 jl_apply() julia.h diff --git a/doc/devdocs/stdio.rst b/doc/devdocs/stdio.rst index 0bb6f6c242bbe..cf26a42030e48 100644 --- a/doc/devdocs/stdio.rst +++ b/doc/devdocs/stdio.rst @@ -66,7 +66,7 @@ stream, e.g.: The :func:`Base.read` and :func:`Base.write` methods for these streams use :func:`ccall` to call ``libuv`` wrappers in :code:`src/jl_uv.c`, e.g.:: - stream.jl: function write(s::AsyncStream, p::Ptr, nb::Integer) + stream.jl: function write(s::IO, p::Ptr, nb::Integer) -> ccall(:jl_uv_write, ...) jl_uv.c: -> int jl_uv_write(uv_stream_t *stream, ...) -> uv_write(uvw, stream, buf, ...) diff --git a/doc/manual/parallel-computing.rst b/doc/manual/parallel-computing.rst index ea37e09dc8f7d..ca78dd0f6c4f6 100644 --- a/doc/manual/parallel-computing.rst +++ b/doc/manual/parallel-computing.rst @@ -860,7 +860,7 @@ Custom cluster managers would typically specify only ``io`` or ``host`` / ``port additional workers. - ``count`` with an integer value ``n`` will launch a total of ``n`` workers. - - ``count`` with a value of ``:auto`` will launch as many workers as cores on that machine. + - ``count`` with a value of ``:auto`` will launch as many workers as the number of cores on that machine. - ``exename`` is the name of the ``julia`` executable including the full path. - ``exeflags`` should be set to the required command line arguments for new workers. diff --git a/doc/stdlib/parallel.rst b/doc/stdlib/parallel.rst index a5cb95f819c03..b66add28b7dbe 100644 --- a/doc/stdlib/parallel.rst +++ b/doc/stdlib/parallel.rst @@ -195,7 +195,7 @@ General Parallel Computing Support Launches worker processes via the specified cluster manager. - For example Beowulf clusters are supported via a custom cluster manager implemented in package ``ClusterManagers.jl``\ . + For example Beowulf clusters are supported via a custom cluster manager implemented in the package ``ClusterManagers.jl``\ . The number of seconds a newly launched worker waits for connection establishment from the master can be specified via variable ``JULIA_WORKER_TIMEOUT`` in the worker process's environment. Relevant only when using TCP/IP as transport. diff --git a/src/signal-handling.c b/src/signal-handling.c index adc91f7a70a03..5838edb6a584d 100644 --- a/src/signal-handling.c +++ b/src/signal-handling.c @@ -56,7 +56,7 @@ static int jl_check_force_sigint(void) // Force sigint requires pressing `Ctrl-C` repeatedly. // Ignore sigint for a short time after that to avoid rethrowing sigint too // quickly again. (Code that has this issue is inherently racy but this is -// a interactive feature anyway.) +// an interactive feature anyway.) static int jl_ignore_sigint(void) { return jl_disable_sigint_time && jl_disable_sigint_time > uv_hrtime(); diff --git a/src/signals-mach.c b/src/signals-mach.c index dd44d67f527fe..b168f6cd70a11 100644 --- a/src/signals-mach.c +++ b/src/signals-mach.c @@ -283,7 +283,7 @@ static void jl_try_deliver_sigint(void) kern_return_t ret = thread_suspend(thread); HANDLE_MACH_ERROR("thread_suspend", ret); - // This abort `sleep` and other syscall. + // This aborts `sleep` and other syscall. ret = thread_abort(thread); HANDLE_MACH_ERROR("thread_abort", ret); diff --git a/test/math.jl b/test/math.jl index a46c31702d078..2394bd460e4ea 100644 --- a/test/math.jl +++ b/test/math.jl @@ -192,18 +192,18 @@ end @test exp2(Float16(2.)) ≈ exp2(2.) @test log(e) == 1 -# check exp2(::Integer) matches exp2(::Float)" +# check exp2(::Integer) matches exp2(::Float) for ii in -2048:2048 expected = exp2(float(ii)) - @test(exp2(Int16(ii)) == expected) - @test(exp2(Int32(ii)) == expected) - @test(exp2(Int64(ii)) == expected) - @test(exp2(Int128(ii)) == expected) + @test exp2(Int16(ii)) == expected + @test exp2(Int32(ii)) == expected + @test exp2(Int64(ii)) == expected + @test exp2(Int128(ii)) == expected if ii >= 0 - @test(exp2(UInt16(ii)) == expected) - @test(exp2(UInt32(ii)) == expected) - @test(exp2(UInt64(ii)) == expected) - @test(exp2(UInt128(ii)) == expected) + @test exp2(UInt16(ii)) == expected + @test exp2(UInt32(ii)) == expected + @test exp2(UInt64(ii)) == expected + @test exp2(UInt128(ii)) == expected end end diff --git a/test/random.jl b/test/random.jl index 75a2a871d8a58..1ebffa03c6e29 100644 --- a/test/random.jl +++ b/test/random.jl @@ -10,8 +10,8 @@ srand(0); rand(); x = rand(384) @test -10 <= rand(-10:-5) <= -5 @test -10 <= rand(-10:5) <= 5 @test minimum([rand(Int32(1):Int32(7^7)) for i = 1:100000]) > 0 -@test(typeof(rand(false:true)) === Bool) -@test(typeof(rand(Char)) === Char) +@test typeof(rand(false:true)) === Bool +@test typeof(rand(Char)) === Char @test length(randn(4, 5)) == 20 @test length(bitrand(4, 5)) == 20 diff --git a/test/spawn.jl b/test/spawn.jl index 4aec691783a67..18433a6f83148 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -154,8 +154,7 @@ yield() put!(r,11) yield() -# Test marking of AsyncStream - +# Test marking of IO r = Channel(1) @async begin port, server = listenany(2327) From 90d0c98fd8c82ee2b2d6f6f82b381921d1b5682e Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 1 Aug 2016 13:24:48 -0700 Subject: [PATCH 2/7] remove call() from special operators table --- doc/manual/functions.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/manual/functions.rst b/doc/manual/functions.rst index 87414c31fc169..1b6b6883e8f14 100644 --- a/doc/manual/functions.rst +++ b/doc/manual/functions.rst @@ -183,7 +183,6 @@ Expression Calls ``1:n`` :func:`colon` ``A[i]`` :func:`getindex` ``A[i]=x`` :func:`setindex!` -``A(x)`` :func:`call` =================== ================== These functions are included in the ``Base.Operators`` module even From 1e91a1fa305728c6bf24183f548b0f75c36ac0f9 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Wed, 3 Aug 2016 03:36:50 -0700 Subject: [PATCH 3/7] NEWS: move breaking changes to before library improvements --- NEWS.md | 98 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/NEWS.md b/NEWS.md index 520d7cf5f0522..1a855dc87c94f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -102,6 +102,55 @@ Language changes * Parentheses are no longer allowed around iteration specifications, e.g. `for (i = 1:n)` ([#17668]). +Breaking changes +---------------- + +This section lists changes that do not have deprecation warnings. + + * The assignment operations `.+=`, `.*=` and so on now generate calls + to `broadcast!` on the left-hand side (or call to `view(a, ...)` on the left-hand side + if the latter is an indexing expression, e.g. `a[...]`). This means that they will fail + if the left-hand side is immutable (or does not support `view`), and will otherwise + change the left-hand side in-place ([#17510], [#17546]). + + * Method ambiguities no longer generate warnings when files are loaded, + nor do they dispatch to an arbitrarily-chosen method; instead, a call that + cannot be resolved to a single method results in a `MethodError` at run time, + rather than the previous definition-time warning. ([#6190]) + + * Array comprehensions preserve the dimensions of the input ranges. For example, + `[2x for x in A]` will have the same dimensions as `A` ([#16622]). + + * The result type of an array comprehension depends only on the types of elements + computed, instead of using type inference ([#7258]). If the result is empty, then + type inference is still used to determine the element type. + + * `reshape` is now defined to always share data with the original array. + If a reshaped copy is needed, use `copy(reshape(a))` or `copy!` to a new array of + the desired shape ([#4211]). + + * `mapslices` now re-uses temporary storage. Recipient functions that expect + input slices to be persistent should copy data to other storage ([#17266]). + All usages of `mapslices` should be carefully audited since this change can cause + silent, incorrect behavior, rather than failing noisily. + + * Local variables and arguments are represented in lowered code as numbered `Slot` + objects instead of as symbols ([#15609]). + + * The information that used to be in the `ast` field of the `LambdaStaticData` type + is now divided among the fields `code`, `slotnames`, `slottypes`, `slotflags`, + `gensymtypes`, `rettype`, `nargs`, and `isva` in the `LambdaInfo` type ([#15609]). + + * `A <: B` is parsed as `Expr(:(<:), :A, :B)` in all cases ([#9503]). + This also applies to the `>:` operator. + + * Simple 2-argument comparisons like `A < B` are parsed as calls instead of using the + `:comparison` expression type ([#15524]). The `:comparison` expression type is still + produced in ASTs when comparisons are chained (e.g. `A < B ≤ C`). + + * `map` on a dictionary now expects a function that expects and returns a `Pair`. + The result is now another dictionary instead of an array ([#16622]). + Library improvements -------------------- @@ -300,55 +349,6 @@ New architectures * [Power](https://github.com/JuliaLang/julia/issues?utf8=%E2%9C%93&q=label%3Apower): [#16455], [#16404] -Breaking changes ----------------- - -This section lists changes that do not have deprecation warnings. - - * The assignment operations `.+=`, `.*=` and so on now generate calls - to `broadcast!` on the left-hand side (or call to `view(a, ...)` on the left-hand side - if the latter is an indexing expression, e.g. `a[...]`). This means that they will fail - if the left-hand side is immutable (or does not support `view`), and will otherwise - change the left-hand side in-place ([#17510], [#17546]). - - * Method ambiguities no longer generate warnings when files are loaded, - nor do they dispatch to an arbitrarily-chosen method; instead, a call that - cannot be resolved to a single method results in a `MethodError` at run time, - rather than the previous definition-time warning. ([#6190]) - - * Array comprehensions preserve the dimensions of the input ranges. For example, - `[2x for x in A]` will have the same dimensions as `A` ([#16622]). - - * The result type of an array comprehension depends only on the types of elements - computed, instead of using type inference ([#7258]). If the result is empty, then - type inference is still used to determine the element type. - - * `reshape` is now defined to always share data with the original array. - If a reshaped copy is needed, use `copy(reshape(a))` or `copy!` to a new array of - the desired shape ([#4211]). - - * `mapslices` now re-uses temporary storage. Recipient functions that expect - input slices to be persistent should copy data to other storage ([#17266]). - All usages of `mapslices` should be carefully audited since this change can cause - silent, incorrect behavior, rather than failing noisily. - - * Local variables and arguments are represented in lowered code as numbered `Slot` - objects instead of as symbols ([#15609]). - - * The information that used to be in the `ast` field of the `LambdaStaticData` type - is now divided among the fields `code`, `slotnames`, `slottypes`, `slotflags`, - `gensymtypes`, `rettype`, `nargs`, and `isva` in the `LambdaInfo` type ([#15609]). - - * `A <: B` is parsed as `Expr(:(<:), :A, :B)` in all cases ([#9503]). - This also applies to the `>:` operator. - - * Simple 2-argument comparisons like `A < B` are parsed as calls instead of using the - `:comparison` expression type ([#15524]). The `:comparison` expression type is still - produced in ASTs when comparisons are chained (e.g. `A < B ≤ C`). - - * `map` on a dictionary now expects a function that expects and returns a `Pair`. - The result is now another dictionary instead of an array ([#16622]). - Deprecated or removed --------------------- From 16141132848393eb53cee1a1ebf56d0e617d87ba Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Wed, 3 Aug 2016 04:03:18 -0700 Subject: [PATCH 4/7] NEWS: mention command-line flag deprecations fixes #17740 --- NEWS.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1a855dc87c94f..696c696a0ac1d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -230,7 +230,7 @@ Library improvements * The `open` function now respects `umask` on UNIX when creating files ([#16466], [#16502]). - * A new function `walkdir()` returns an iterator that walks the directory tree of a directory. ([#1765]) + * A new function `walkdir()` returns an iterator that walks the directory tree of a directory. ([#8814], [#13707]) ``` for (root, dirs, files) in walkdir(expanduser("~/.julia/v0.5/Plots/src")) @@ -366,7 +366,7 @@ Deprecated or removed in favor of versions that require the matrix to be in factored form ([#13496]). - * Deprecate `chol(A,Val{:U/:L})` in favor of `chol(A)` ([#13680]). + * `chol(A,Val{:U/:L})` has been deprecated in favor of `chol(A)` ([#13680]). * `issym` is deprecated in favor of `issymmetric` to match similar functions (`ishermitian`, ...) ([#15192]) @@ -384,6 +384,21 @@ Deprecated or removed * `writemime` is deprecated, and output methods specifying a MIME type are now methods of `show` ([#14052]). +Command-line option changes +--------------------------- + + * The `-F` flag to load `~/.juliarc` has been deprecated in favor of + `--startup-file=yes` ([#9482]). + + * The `-f` and `--no-startup` flags to disable loading of `~/.juliarc` have + been deprecated in favor of `--startup-file=no` ([#9482]). + + * The `-P` and `--post-boot` flags for evaluating an expression in "interactive mode" + have been deprecated in favor of `-i -e` ([#16854]). + + * The `--no-history-file` flag to disable loading of `~/.julia_history` has been + deprecated in favor of `--history-file=no` ([#9482]). + Language tooling improvements ----------------------------- @@ -404,7 +419,6 @@ Language tooling improvements [#550]: https://github.com/JuliaLang/julia/issues/550 [#964]: https://github.com/JuliaLang/julia/issues/964 [#1090]: https://github.com/JuliaLang/julia/issues/1090 -[#1765]: https://github.com/JuliaLang/julia/issues/1765 [#2488]: https://github.com/JuliaLang/julia/issues/2488 [#3737]: https://github.com/JuliaLang/julia/issues/3737 [#4163]: https://github.com/JuliaLang/julia/issues/4163 @@ -415,7 +429,9 @@ Language tooling improvements [#7258]: https://github.com/JuliaLang/julia/issues/7258 [#8036]: https://github.com/JuliaLang/julia/issues/8036 [#8599]: https://github.com/JuliaLang/julia/issues/8599 +[#8814]: https://github.com/JuliaLang/julia/issues/8814 [#8846]: https://github.com/JuliaLang/julia/issues/8846 +[#9482]: https://github.com/JuliaLang/julia/issues/9482 [#9503]: https://github.com/JuliaLang/julia/issues/9503 [#9627]: https://github.com/JuliaLang/julia/issues/9627 [#11196]: https://github.com/JuliaLang/julia/issues/11196 @@ -434,6 +450,7 @@ Language tooling improvements [#13612]: https://github.com/JuliaLang/julia/issues/13612 [#13680]: https://github.com/JuliaLang/julia/issues/13680 [#13681]: https://github.com/JuliaLang/julia/issues/13681 +[#13707]: https://github.com/JuliaLang/julia/issues/13707 [#13774]: https://github.com/JuliaLang/julia/issues/13774 [#13780]: https://github.com/JuliaLang/julia/issues/13780 [#13824]: https://github.com/JuliaLang/julia/issues/13824 @@ -485,6 +502,7 @@ Language tooling improvements [#16645]: https://github.com/JuliaLang/julia/issues/16645 [#16663]: https://github.com/JuliaLang/julia/issues/16663 [#16731]: https://github.com/JuliaLang/julia/issues/16731 +[#16854]: https://github.com/JuliaLang/julia/issues/16854 [#16953]: https://github.com/JuliaLang/julia/issues/16953 [#16972]: https://github.com/JuliaLang/julia/issues/16972 [#17037]: https://github.com/JuliaLang/julia/issues/17037 @@ -499,3 +517,4 @@ Language tooling improvements [#17404]: https://github.com/JuliaLang/julia/issues/17404 [#17510]: https://github.com/JuliaLang/julia/issues/17510 [#17546]: https://github.com/JuliaLang/julia/issues/17546 +[#17668]: https://github.com/JuliaLang/julia/issues/17668 From 282c3e88b7322def5125335d32e6793838c73619 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Wed, 3 Aug 2016 04:05:04 -0700 Subject: [PATCH 5/7] NEWS: Move scalar index dropping to breaking changes ref https://github.com/JuliaLang/julia/pull/13612#issuecomment-236778544 --- NEWS.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 696c696a0ac1d..1f964f74bc429 100644 --- a/NEWS.md +++ b/NEWS.md @@ -107,6 +107,11 @@ Breaking changes This section lists changes that do not have deprecation warnings. + * All dimensions indexed by scalars are now dropped, whereas previously only + trailing scalar dimensions would be omitted from the result ([#13612]). This + is a very major behavioral change, but should cause obvious failures. To retain + a dimension sliced with a scalar `i` slice with `i:i` instead. + * The assignment operations `.+=`, `.*=` and so on now generate calls to `broadcast!` on the left-hand side (or call to `view(a, ...)` on the left-hand side if the latter is an indexing expression, e.g. `a[...]`). This means that they will fail @@ -192,11 +197,6 @@ Library improvements * Arrays and linear algebra: - * All dimensions indexed by scalars are now dropped, whereas previously only - trailing scalar dimensions would be omitted from the result ([#13612]). This - is a very major behavioral change, but should cause obvious failures. To retain - a dimension sliced with a scalar `i` slice with `i:i` instead. - * Dimensions indexed by multidimensional arrays add dimensions. More generally, the dimensionality of the result is the sum of the dimensionalities of the indices ([#15431]). From 75ac326518c9fe97651a443a7a9b72a0619ed130 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Wed, 3 Aug 2016 06:10:36 -0700 Subject: [PATCH 6/7] NEWS: mention nearly all of the deprecations department of redundancy department [ci skip] --- NEWS.md | 119 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 95 insertions(+), 24 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1f964f74bc429..46ada23e5ccd3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -121,7 +121,7 @@ This section lists changes that do not have deprecation warnings. * Method ambiguities no longer generate warnings when files are loaded, nor do they dispatch to an arbitrarily-chosen method; instead, a call that cannot be resolved to a single method results in a `MethodError` at run time, - rather than the previous definition-time warning. ([#6190]) + rather than the previous definition-time warning ([#6190]). * Array comprehensions preserve the dimensions of the input ranges. For example, `[2x for x in A]` will have the same dimensions as `A` ([#16622]). @@ -170,12 +170,12 @@ Library improvements * The `UTF16String` and `UTF32String` types and corresponding `utf16` and `utf32` converter functions have been removed from the standard library. If you need these types, they have been moved to the - [`LegacyStrings`](https://github.com/JuliaArchive/LegacyStrings.jl) - package. In the future, more robust Unicode string support will be provided - by the [`StringEncodings`](https://github.com/nalimilan/StringEncodings.jl) - package. If you only need these types to call wide string APIs (UTF-16 on - Windows, UTF-32 on UNIX), consider using the new `transcode` function (see - below) or the `Cwstring` type as a `ccall` argument type, which also ensures + [LegacyStrings.jl package](https://github.com/JuliaArchive/LegacyStrings.jl). + In the future, more robust Unicode string support will be provided by the + [StringEncodings.jl package](https://github.com/nalimilan/StringEncodings.jl). + If you only need these types to call wide string APIs (UTF-16 on Windows, + UTF-32 on UNIX), consider using the new `transcode` function (see below) + or the `Cwstring` type as a `ccall` argument type, which also ensures correct NUL termination of string data. * A `transcode(T, src)` function is now exported for converting data @@ -212,10 +212,11 @@ Library improvements * A new `SparseVector` type allows for one-dimensional sparse arrays. Slicing and reshaping sparse matrices now return vectors when appropriate. The `sparsevec` function returns a one-dimensional sparse - vector instead of a one-column sparse matrix. ([#13440]) + vector instead of a one-column sparse matrix. The `SparseMatrix` module + has been renamed to `SparseArrays` ([#13440]). * Rank one update and downdate functions, `lowrankupdate`, `lowrankupdate!`, `lowrankdowndate`, - and `lowrankdowndate!`, for dense Cholesky factorizations ([#14243], [#14424]) + and `lowrankdowndate!`, have been introduced for dense Cholesky factorizations ([#14243], [#14424]). * All `sparse` methods now retain provided numerical zeros as structural nonzeros; to drop numerical zeros, use `dropzeros!` ([#14798], [#15242]). @@ -230,7 +231,7 @@ Library improvements * The `open` function now respects `umask` on UNIX when creating files ([#16466], [#16502]). - * A new function `walkdir()` returns an iterator that walks the directory tree of a directory. ([#8814], [#13707]) + * A new function `walkdir()` returns an iterator that walks the tree of a directory ([#8814], [#13707]). ``` for (root, dirs, files) in walkdir(expanduser("~/.julia/v0.5/Plots/src")) @@ -241,7 +242,7 @@ Library improvements 4 files in /Users/me/.julia/v0.5/Plots/src/deprecated ``` - * A new function `chown()` changes the ownership of files. ([#15007]) + * A new function `chown()` changes the ownership of files ([#15007]). * Display properties can now be passed among output functions (e.g. `show`) using an `IOContext` object ([#13825]). @@ -269,17 +270,21 @@ Library improvements * `cov` and `cor` don't use keyword arguments anymore and are therefore now type stable ([#13465]). + * Histogram functionality has been deprecated in `Base`. Use the + [StatsBase.jl package](https://github.com/JuliaStats/StatsBase.jl) + instead ([#6842], [#16450]). + * Testing: * The `Base.Test` module now has a `@testset` feature to bundle tests together and delay throwing an error until the end ([#13062]). * The new features are mirrored in the - [BaseTestNext](https://github.com/IainNZ/BaseTestNext.jl) - package for users who would like to use the new functionality on Julia v0.4. + [BaseTestNext.jl package](https://github.com/IainNZ/BaseTestNext.jl) + for users who would like to use the new functionality on Julia v0.4. - * The [BaseTestDeprecated](https://github.com/IainNZ/BaseTestDeprecated.jl) - package provides the old-style `handler` functionality, for compatibility + * The [BaseTestDeprecated.jl package](https://github.com/IainNZ/BaseTestDeprecated.jl) + provides the old-style `handler` functionality, for compatibility with code that needs to support both Julia v0.4 and v0.5. * Package management: @@ -292,7 +297,7 @@ Library improvements have been moved to an external [PkgDev] package ([#13387]). * Updating only a subset of the packages is now supported, - e.g. `Pkg.update("Example")` ([#17132]) + e.g. `Pkg.update("Example")` ([#17132]). * Miscellanous: @@ -312,9 +317,10 @@ Library improvements * The `libjulia` library is now properly versioned and installed to the public `/lib` directory, instead of the private `/lib/julia` directory ([#16362]). - * System reflection is now more consistently exposed from Sys and not Base. - `OS_NAME` has been replaced by `Sys.KERNEL` and always reports the name of the - kernel (as reported by `uname`). The `@windows_only` and `@osx` family of macros + * System reflection is now more consistently exposed from `Sys` and not `Base` + (e.g. constants such as `WORD_SIZE` and `CPU_CORES`). `OS_NAME` has been + replaced by `Sys.KERNEL` and always reports the name of the kernel (as + reported by `uname`). The `@windows_only` and `@osx` family of macros have been replaced with functions such as `is_windows()` and `is_apple()`. There is now also a `@static` macro that will evaluate the condition of an if-statement at compile time, for when a static branch is required ([#16219]). @@ -368,22 +374,65 @@ Deprecated or removed * `chol(A,Val{:U/:L})` has been deprecated in favor of `chol(A)` ([#13680]). + * `rem1(x,y)` is discontinued due to inconsistency for `x==0`. Use `mod1` instead ([#14140]). + + * The `FS` module has been renamed to `Filesystem`. Calling the functions `isreadable`, + `iswritable`, and `isexecutable` on filesystem paths has been deprecated ([#12819]). + + * `RemoteRef` has been deprecated in favor of `RemoteChannel` ([#14458]). + + * `super` has been renamed to `supertype` ([#14335]). + + * `parseip(str)` has been deprecated in favor of `parse(IPAddr, str)` ([#14676]). + + * `readall` has been renamed to `readstring`, and `readbytes` has been renamed to `read` ([#14608], [#14660]). + + * `fieldoffsets(x)` has been deprecated in favor of calling `fieldoffset(x, i)` on each field ([#14777]). + * `issym` is deprecated in favor of `issymmetric` to match similar functions - (`ishermitian`, ...) ([#15192]) + (`ishermitian`, ...) ([#15192]). + + * `scale` is deprecated in favor of either `α*A`, `Diagonal(x)*A`, or `A*Diagonal(x)` ([#15258]). + + * `istext` has been renamed to `istextmime` ([#12872], [#15708]). + + * "Functor" types are no longer necessary and have been deprecated ([#15804]). To maintain + performance on older versions of Julia the [Compat.jl package](https://github.com/JuliaLang/Compat.jl/pull/184) + provides a `@functorize` macro. - * `scale` is deprecated in favor of either `α*A`, `Diagonal(x)*A`, or `A*Diagonal(x)`. ([#15258]) + * `bitunpack(B)` and `bitpack(A)` have been deprecated in favor of + Array(B)` and `BitArray(A)`, respectively ([#16010]). * `xdump` is removed, and `dump` now simply shows the full representation of a value. `dump` should not be overloaded, since it is for examining concrete structure ([#4163]). - * `sub` and `slice` have been deprecated in favor of `view` ([#16972]) + * `sprandbool` has been deprecated in favor of `sprand(Bool, ...)` or + `sprand(rng, Bool, ...)` ([#11688], [#16098]). - * The no-op `transpose` fallback has been deprecated. Consider introducing suitable - `transpose` methods or calling `permutedims(x, [2,1])` ([#13171], [#17075], [#17374]). + * The lowercase `symbol` function has been deprecated in favor of the `Symbol` + constructor ([#16154]). * `writemime` is deprecated, and output methods specifying a MIME type are now methods of `show` ([#14052]). + * BLAS utility functions `blas_set_num_threads`, `blas_vendor`, and `check_blas` + have been moved to the BLAS module as `BLAS.set_num_threads`, `BLAS.vendor`, + and `BLAS.check` ([#10548], [#16600]). + + * `print_escaped` has been renamed to `escape_string`, `print_unescaped` has been + renamed to `unescape_string`, and `print_joined` has been renamed to `join` ([#16603]). + + * `pointer_to_string` has been renamed to `unsafe_wrap(String, ...)`, and + `pointer_to_array` has been renamed to `unsafe_wrap(Array, ...)` ([#16731]). + + * `sub` and `slice` have been deprecated in favor of `view` ([#16972]). + + * Sparse matrix functions `etree`, `ereach`, `csc_permute`, and `symperm` have been moved + to the [SuiteSparse.jl package](https://github.com/JuliaSparse/SuiteSparse.jl) ([#12231], [#17033]). + + * The no-op `transpose` fallback has been deprecated. Consider introducing suitable + `transpose` methods or calling `permutedims(x, [2,1])` ([#13171], [#17075], [#17374]). + Command-line option changes --------------------------- @@ -426,6 +475,7 @@ Language tooling improvements [#4470]: https://github.com/JuliaLang/julia/issues/4470 [#4867]: https://github.com/JuliaLang/julia/issues/4867 [#6190]: https://github.com/JuliaLang/julia/issues/6190 +[#6842]: https://github.com/JuliaLang/julia/issues/6842 [#7258]: https://github.com/JuliaLang/julia/issues/7258 [#8036]: https://github.com/JuliaLang/julia/issues/8036 [#8599]: https://github.com/JuliaLang/julia/issues/8599 @@ -434,8 +484,13 @@ Language tooling improvements [#9482]: https://github.com/JuliaLang/julia/issues/9482 [#9503]: https://github.com/JuliaLang/julia/issues/9503 [#9627]: https://github.com/JuliaLang/julia/issues/9627 +[#10548]: https://github.com/JuliaLang/julia/issues/10548 [#11196]: https://github.com/JuliaLang/julia/issues/11196 [#11242]: https://github.com/JuliaLang/julia/issues/11242 +[#11688]: https://github.com/JuliaLang/julia/issues/11688 +[#12231]: https://github.com/JuliaLang/julia/issues/12231 +[#12819]: https://github.com/JuliaLang/julia/issues/12819 +[#12872]: https://github.com/JuliaLang/julia/issues/12872 [#13062]: https://github.com/JuliaLang/julia/issues/13062 [#13171]: https://github.com/JuliaLang/julia/issues/13171 [#13232]: https://github.com/JuliaLang/julia/issues/13232 @@ -458,14 +513,21 @@ Language tooling improvements [#13897]: https://github.com/JuliaLang/julia/issues/13897 [#14052]: https://github.com/JuliaLang/julia/issues/14052 [#14114]: https://github.com/JuliaLang/julia/issues/14114 +[#14140]: https://github.com/JuliaLang/julia/issues/14140 [#14194]: https://github.com/JuliaLang/julia/issues/14194 [#14243]: https://github.com/JuliaLang/julia/issues/14243 +[#14335]: https://github.com/JuliaLang/julia/issues/14335 [#14413]: https://github.com/JuliaLang/julia/issues/14413 [#14424]: https://github.com/JuliaLang/julia/issues/14424 +[#14458]: https://github.com/JuliaLang/julia/issues/14458 [#14469]: https://github.com/JuliaLang/julia/issues/14469 [#14519]: https://github.com/JuliaLang/julia/issues/14519 +[#14608]: https://github.com/JuliaLang/julia/issues/14608 [#14623]: https://github.com/JuliaLang/julia/issues/14623 +[#14660]: https://github.com/JuliaLang/julia/issues/14660 +[#14676]: https://github.com/JuliaLang/julia/issues/14676 [#14759]: https://github.com/JuliaLang/julia/issues/14759 +[#14777]: https://github.com/JuliaLang/julia/issues/14777 [#14798]: https://github.com/JuliaLang/julia/issues/14798 [#15007]: https://github.com/JuliaLang/julia/issues/15007 [#15032]: https://github.com/JuliaLang/julia/issues/15032 @@ -479,24 +541,32 @@ Language tooling improvements [#15524]: https://github.com/JuliaLang/julia/issues/15524 [#15550]: https://github.com/JuliaLang/julia/issues/15550 [#15609]: https://github.com/JuliaLang/julia/issues/15609 +[#15708]: https://github.com/JuliaLang/julia/issues/15708 [#15731]: https://github.com/JuliaLang/julia/issues/15731 [#15763]: https://github.com/JuliaLang/julia/issues/15763 +[#15804]: https://github.com/JuliaLang/julia/issues/15804 [#15975]: https://github.com/JuliaLang/julia/issues/15975 +[#16010]: https://github.com/JuliaLang/julia/issues/16010 [#16024]: https://github.com/JuliaLang/julia/issues/16024 [#16058]: https://github.com/JuliaLang/julia/issues/16058 [#16071]: https://github.com/JuliaLang/julia/issues/16071 +[#16098]: https://github.com/JuliaLang/julia/issues/16098 [#16107]: https://github.com/JuliaLang/julia/issues/16107 +[#16154]: https://github.com/JuliaLang/julia/issues/16154 [#16219]: https://github.com/JuliaLang/julia/issues/16219 [#16260]: https://github.com/JuliaLang/julia/issues/16260 [#16285]: https://github.com/JuliaLang/julia/issues/16285 [#16362]: https://github.com/JuliaLang/julia/issues/16362 [#16403]: https://github.com/JuliaLang/julia/issues/16403 [#16404]: https://github.com/JuliaLang/julia/issues/16404 +[#16450]: https://github.com/JuliaLang/julia/issues/16450 [#16455]: https://github.com/JuliaLang/julia/issues/16455 [#16466]: https://github.com/JuliaLang/julia/issues/16466 [#16481]: https://github.com/JuliaLang/julia/issues/16481 [#16502]: https://github.com/JuliaLang/julia/issues/16502 [#16510]: https://github.com/JuliaLang/julia/issues/16510 +[#16600]: https://github.com/JuliaLang/julia/issues/16600 +[#16603]: https://github.com/JuliaLang/julia/issues/16603 [#16621]: https://github.com/JuliaLang/julia/issues/16621 [#16622]: https://github.com/JuliaLang/julia/issues/16622 [#16645]: https://github.com/JuliaLang/julia/issues/16645 @@ -505,6 +575,7 @@ Language tooling improvements [#16854]: https://github.com/JuliaLang/julia/issues/16854 [#16953]: https://github.com/JuliaLang/julia/issues/16953 [#16972]: https://github.com/JuliaLang/julia/issues/16972 +[#17033]: https://github.com/JuliaLang/julia/issues/17033 [#17037]: https://github.com/JuliaLang/julia/issues/17037 [#17075]: https://github.com/JuliaLang/julia/issues/17075 [#17132]: https://github.com/JuliaLang/julia/issues/17132 From 491f51ff4e06f7b16efbdaabe490047ac2f33a23 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Wed, 3 Aug 2016 08:55:41 -0700 Subject: [PATCH 7/7] run genstdlib [ci skip] --- doc/stdlib/arrays.rst | 1 + doc/stdlib/parallel.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/stdlib/arrays.rst b/doc/stdlib/arrays.rst index 8d6bb1b0ad45e..448dd55c0caa9 100644 --- a/doc/stdlib/arrays.rst +++ b/doc/stdlib/arrays.rst @@ -1086,3 +1086,4 @@ dense counterparts. The following functions are specific to sparse arrays. For additional (algorithmic) information, and for versions of these methods that forgo argument checking, see (unexported) parent methods :func:`Base.SparseArrays.unchecked_noalias_permute!` and :func:`Base.SparseArrays.unchecked_aliasing_permute!`\ . See also: :func:`Base.SparseArrays.permute` + diff --git a/doc/stdlib/parallel.rst b/doc/stdlib/parallel.rst index b66add28b7dbe..7d89a0ec3a1b6 100644 --- a/doc/stdlib/parallel.rst +++ b/doc/stdlib/parallel.rst @@ -183,7 +183,7 @@ General Parallel Computing Support * ``topology=:all_to_all`` : All processes are connected to each other. This is the default. * ``topology=:master_slave`` : Only the driver process, i.e. ``pid`` 1 connects to the workers. The workers do not connect to each other. - * ``topology=:custom`` : The ``launch`` method of the cluster manager specifes the connection topology via fields ``ident`` and ``connect_idents`` in ``WorkerConfig``\ . A worker with a cluster manager identity ``ident`` will connect to all workers specified in ``connect_idents``\ . + * ``topology=:custom`` : The ``launch`` method of the cluster manager specifies the connection topology via fields ``ident`` and ``connect_idents`` in ``WorkerConfig``\ . A worker with a cluster manager identity ``ident`` will connect to all workers specified in ``connect_idents``\ . Environment variables :