Skip to content

Commit d620a28

Browse files
authored
Merge branch 'master' into jb/importas
2 parents d0a75ca + 5a86131 commit d620a28

File tree

419 files changed

+4701
-3539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+4701
-3539
lines changed

Diff for: Make.inc

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ USE_SYSTEM_LIBUV:=0
4949
USE_SYSTEM_UTF8PROC:=0
5050
USE_SYSTEM_MBEDTLS:=0
5151
USE_SYSTEM_LIBSSH2:=0
52+
USE_SYSTEM_NGHTTP2:=0
5253
USE_SYSTEM_CURL:=0
5354
USE_SYSTEM_LIBGIT2:=0
5455
USE_SYSTEM_PATCHELF:=0
@@ -1099,7 +1100,7 @@ USE_BINARYBUILDER ?= 0
10991100
endif
11001101

11011102
# This is the set of projects that BinaryBuilder dependencies are hooked up for.
1102-
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP
1103+
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP
11031104
define SET_BB_DEFAULT
11041105
# First, check to see if BB is disabled on a global setting
11051106
ifeq ($$(USE_BINARYBUILDER),0)

Diff for: Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ JL_PRIVATE_LIBS-$(USE_SYSTEM_DSFMT) += libdSFMT
170170
JL_PRIVATE_LIBS-$(USE_SYSTEM_GMP) += libgmp
171171
JL_PRIVATE_LIBS-$(USE_SYSTEM_MPFR) += libmpfr
172172
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBSSH2) += libssh2
173+
JL_PRIVATE_LIBS-$(USE_SYSTEM_NGHTTP2) += libnghttp2
173174
JL_PRIVATE_LIBS-$(USE_SYSTEM_MBEDTLS) += libmbedtls libmbedcrypto libmbedx509
174175
JL_PRIVATE_LIBS-$(USE_SYSTEM_CURL) += libcurl
175176
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBGIT2) += libgit2

Diff for: NEWS.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ New language features
1313
* The library name passed to `ccall` or `@ccall` can now be an expression involving
1414
global variables and function calls. The expression will be evaluated the first
1515
time the `ccall` executes ([#36458]).
16+
* `` (U+A71B), `` (U+A71C) and `` (U+A71D) can now also be used as operator
17+
suffixes. They can be tab-completed from `\^uparrow`, `\^downarrow` and `\^!` in the REPL
18+
([#37542]).
1619
* The syntax `import A as B` (plus `import A: x as y`, etc.) can now be used to
1720
rename imported modules and identifiers ([#1255]).
1821

@@ -60,8 +63,9 @@ Build system changes
6063

6164
Library functions
6265
-----------------
63-
* The `Base.Grisu` code has been officially removed (float printing was switched to the ryu algorithm code in 1.4)
6466

67+
* The `Base.download` function has been deprecated (silently, by default) in favor of the new `Downloads.download` standard library function ([#37340]).
68+
* The `Base.Grisu` code has been officially removed (float printing was switched to the ryu algorithm code in 1.4)
6569

6670
New library functions
6771
---------------------
@@ -73,14 +77,17 @@ New library functions
7377
for writing `(f(args...) for args in zip(iterators...))`, i.e. a lazy `map` ([#34352]).
7478
* New function `sincospi` for simultaneously computing `sinpi(x)` and `cospi(x)` more
7579
efficiently ([#35816]).
80+
* New function `addenv` for adding environment mappings into a `Cmd` object, returning the new `Cmd` object.
7681

7782
New library features
7883
--------------------
7984

8085
* The `redirect_*` functions can now be called on `IOContext` objects.
86+
* New constructor `NamedTuple(iterator)` that constructs a named tuple from a key-value pair iterator.
8187

8288
Standard library changes
8389
------------------------
90+
8491
* The `nextprod` function now accepts tuples and other array types for its first argument ([#35791]).
8592
* The `reverse(A; dims)` function for multidimensional `A` can now reverse multiple dimensions at once
8693
by passing a tuple for `dims`, and defaults to reversing all dimensions; there is also a multidimensional
@@ -99,8 +106,16 @@ Standard library changes
99106
* `RegexMatch` objects can now be probed for whether a named capture group exists within it through `haskey()` ([#36717]).
100107
* For consistency `haskey(r::RegexMatch, i::Integer)` has also been added and returns if the capture group for `i` exists ([#37300]).
101108
* A new standard library `TOML` has been added for parsing and printing [TOML files](https://toml.io) ([#37034]).
109+
* A new standard library `Downloads` has been added, which replaces the old `Base.download` function with `Downloads.download`, providing cross-platform, multi-protocol, in-process download functionality implemented with [libcurl](https://curl.haxx.se/libcurl/) ([#37340]).
110+
* The `Pkg.BinaryPlatforms` module has been moved into `Base` as `Base.BinaryPlatforms` and heavily reworked.
111+
Applications that want to be compatible with the old API should continue to import `Pkg.BinaryPlatforms`,
112+
however new users should use `Base.BinaryPlatforms` directly. ([#37320])
113+
* The `Pkg.Artifacts` module has been imported as a separate standard library. It is still available as
114+
`Pkg.Artifacts`, however starting from Julia v1.6+, packages may import simply `Artifacts` without importing
115+
all of `Pkg` alongside. ([#37320])
102116

103117
#### LinearAlgebra
118+
104119
* New method `LinearAlgebra.issuccess(::CholeskyPivoted)` for checking whether pivoted Cholesky factorization was successful ([#36002]).
105120
* `UniformScaling` can now be indexed into using ranges to return dense matrices and vectors ([#24359]).
106121
* New function `LinearAlgebra.BLAS.get_num_threads()` for getting the number of BLAS threads. ([#36360])
@@ -151,6 +166,8 @@ Standard library changes
151166

152167
#### Dates
153168
* `Quarter` period is defined ([#35519]).
169+
* Zero-valued `FixedPeriod`s and `OtherPeriod`s now compare equal, e.g.,
170+
`Year(0) == Day(0)`. The behavior of non-zero `Period`s is not changed. ([#37486])
154171

155172
#### Statistics
156173

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<a name="logo"/>
22
<div align="center">
33
<a href="https://julialang.org/" target="_blank">
4-
<img src="https://julialang.org/images/logo_hires.png" alt="Julia Logo" width="210" height="142"></img>
4+
<img src="doc/src/assets/logo.svg" alt="Julia Logo" width="210" height="142"></img>
55
</a>
66
</div>
77

Diff for: base/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/features_h.jl
12
/pcre_h.jl
23
/errno_h.jl
34
/build_h.jl

Diff for: base/Base.jl

+7
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ include("weakkeydict.jl")
236236
include("logging.jl")
237237
using .CoreLogging
238238

239+
# BinaryPlatforms, used by Artifacts
240+
include("binaryplatforms.jl")
241+
239242
# functions defined in Random
240243
function rand end
241244
function randn end
@@ -378,6 +381,9 @@ include(mapexpr::Function, mod::Module, _path::AbstractString) = _include(mapexp
378381

379382
end_base_include = time_ns()
380383

384+
const _sysimage_modules = PkgId[]
385+
in_sysimage(pkgid::PkgId) = pkgid in _sysimage_modules
386+
381387
if is_primary_base_module
382388
function __init__()
383389
# try to ensuremake sure OpenBLAS does not set CPU affinity (#1070, #9639)
@@ -402,6 +408,7 @@ function __init__()
402408
init_depot_path()
403409
init_load_path()
404410
init_active_project()
411+
append!(empty!(_sysimage_modules), keys(loaded_modules))
405412
nothing
406413
end
407414

Diff for: base/Makefile

+15-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ else
1212
CPP_STDOUT := $(CPP) -E
1313
endif
1414

15-
all: $(addprefix $(BUILDDIR)/,pcre_h.jl errno_h.jl build_h.jl.phony file_constants.jl uv_constants.jl version_git.jl.phony)
15+
all: $(addprefix $(BUILDDIR)/,pcre_h.jl errno_h.jl build_h.jl.phony features_h.jl file_constants.jl uv_constants.jl version_git.jl.phony)
1616

1717
PCRE_CONST := 0x[0-9a-fA-F]+|[0-9]+|\([\-0-9]+\)
1818
ifeq ($(USE_SYSTEM_PCRE), 1)
@@ -21,6 +21,18 @@ else
2121
PCRE_INCL_PATH := $(build_includedir)/pcre2.h
2222
endif
2323

24+
define parse_features
25+
@echo "# $(2) features" >> $@
26+
@$(call PRINT_PERL, cat ../src/features_$(1).h | perl -lne 'print "const JL_$(2)_$$1 = UInt32($$2)" if /^\s*JL_FEATURE_DEF(?:_NAME)?\(\s*(\w+)\s*,\s*([^,]+)\s*,.*\)\s*(?:\/\/.*)?$$/' >> $@)
27+
@echo >> $@
28+
endef
29+
30+
$(BUILDDIR)/features_h.jl: ../src/features_x86.h ../src/features_aarch32.h ../src/features_aarch64.h
31+
@-rm -f $@
32+
@$(call parse_features,x86,X86)
33+
@$(call parse_features,aarch32,AArch32)
34+
@$(call parse_features,aarch64,AArch64)
35+
2436
$(BUILDDIR)/pcre_h.jl: $(PCRE_INCL_PATH)
2537
@$(call PRINT_PERL, $(CPP) -D PCRE2_CODE_UNIT_WIDTH=8 -dM $< | perl -nle '/^\s*#define\s+PCRE2_(\w*)\s*\(?($(PCRE_CONST))\)?u?\s*$$/ and print index($$1, "ERROR_") == 0 ? "const $$1 = Cint($$2)" : "const $$1 = UInt32($$2)"' | LC_ALL=C sort > $@)
2638

@@ -192,6 +204,7 @@ $(eval $(call symlink_system_library,libmbedtls,MBEDTLS))
192204
$(eval $(call symlink_system_library,libmbedcrypto,MBEDTLS))
193205
$(eval $(call symlink_system_library,libmbedx509,MBEDTLS))
194206
$(eval $(call symlink_system_library,libssh2,LIBSSH2))
207+
$(eval $(call symlink_system_library,libnghttp2,NGHTTP2))
195208
$(eval $(call symlink_system_library,libcurl,CURL))
196209
$(eval $(call symlink_system_library,libgit2,LIBGIT2))
197210
$(eval $(call symlink_system_library,libamd,SUITESPARSE))
@@ -236,6 +249,7 @@ clean:
236249
-rm -f $(BUILDDIR)/errno_h.jl
237250
-rm -f $(BUILDDIR)/build_h.jl
238251
-rm -f $(BUILDDIR)/build_h.jl.phony
252+
-rm -f $(BUILDDIR)/features_h.jl
239253
-rm -f $(BUILDDIR)/uv_constants.jl
240254
-rm -f $(BUILDDIR)/file_constants.jl
241255
-rm -f $(BUILDDIR)/version_git.jl

Diff for: base/array.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,7 @@ function findfirst(A)
17881788
end
17891789

17901790
# Needed for bootstrap, and allows defining only an optimized findnext method
1791-
findfirst(A::Union{AbstractArray, AbstractString}) = findnext(A, first(keys(A)))
1791+
findfirst(A::AbstractArray) = findnext(A, first(keys(A)))
17921792

17931793
"""
17941794
findnext(predicate::Function, A, i)
@@ -1976,7 +1976,7 @@ function findlast(A)
19761976
end
19771977

19781978
# Needed for bootstrap, and allows defining only an optimized findprev method
1979-
findlast(A::Union{AbstractArray, AbstractString}) = findprev(A, last(keys(A)))
1979+
findlast(A::AbstractArray) = findprev(A, last(keys(A)))
19801980

19811981
"""
19821982
findprev(predicate::Function, A, i)

0 commit comments

Comments
 (0)