From 4d8ad93e9f24bb8bb39519a47d32457a165d1e5c Mon Sep 17 00:00:00 2001 From: t-bltg Date: Tue, 15 Nov 2022 10:53:40 +0100 Subject: [PATCH 1/4] do not trigger deprecation warnings --- src/exports.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/exports.jl b/src/exports.jl index 8095b6e2..b1d9509f 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1,7 +1,8 @@ function walkmodules(f, x::Module) f(x) - for n in names(x; all=true) - if isdefined(x, n) + for n in names(x; all = true) + # `getproperty` triggers deprecation warnings + if !Base.isdeprecated(x, n) && isdefined(x, n) y = getproperty(x, n) if y isa Module && y !== x && parentmodule(y) === x walkmodules(f, y) From 497e208e3fc48a21e3aebf49e01824e884a3ead4 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Wed, 23 Nov 2022 12:12:18 +0100 Subject: [PATCH 2/4] update --- src/exports.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/exports.jl b/src/exports.jl index b1d9509f..1b27d20b 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1,8 +1,9 @@ function walkmodules(f, x::Module) f(x) - for n in names(x; all = true) - # `getproperty` triggers deprecation warnings - if !Base.isdeprecated(x, n) && isdefined(x, n) + for n in names(x; all = true, imported = true) + # `isdefined` and `getproperty` can trigger deprecation warnings + if Base.isbindingresolved(x, n) && !Base.isdeprecated(x, n) + isdefined(x, n) || continue y = getproperty(x, n) if y isa Module && y !== x && parentmodule(y) === x walkmodules(f, y) From 12ab353f4a3db8e4cbdc6bb251b8531ffe98b716 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 21 Dec 2022 01:25:59 +0900 Subject: [PATCH 3/4] Remove `imported = true` --- src/exports.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exports.jl b/src/exports.jl index 1b27d20b..8cfbef3b 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1,6 +1,6 @@ function walkmodules(f, x::Module) f(x) - for n in names(x; all = true, imported = true) + for n in names(x; all=true) # `isdefined` and `getproperty` can trigger deprecation warnings if Base.isbindingresolved(x, n) && !Base.isdeprecated(x, n) isdefined(x, n) || continue From 95950fd535c05968426dfacbadefdc52706fa2bd Mon Sep 17 00:00:00 2001 From: t-bltg Date: Tue, 20 Dec 2022 17:30:10 +0100 Subject: [PATCH 4/4] format --- src/exports.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exports.jl b/src/exports.jl index 8cfbef3b..d8f3d690 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1,6 +1,6 @@ function walkmodules(f, x::Module) f(x) - for n in names(x; all=true) + for n in names(x; all = true) # `isdefined` and `getproperty` can trigger deprecation warnings if Base.isbindingresolved(x, n) && !Base.isdeprecated(x, n) isdefined(x, n) || continue