Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit b05462a

Browse files
authored
1 parent d9787a2 commit b05462a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/persistence/common.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ The default graph name assigned to `gname` may change in the future.
7070
function savegraph(fn::AbstractString, g::AbstractGraph, gname::AbstractString,
7171
format::AbstractGraphFormat; compress=nothing
7272
)
73-
compress === nothing ||
74-
Base.depwarn("Saving compressed graphs is no longer supported in LightGraphs. Use `LGCompressedFormat()` from the `GraphIO.jl` package instead. Saving uncompressed.", :savegraph)
73+
if compress !== nothing
74+
if !compress
75+
@info("Note: the `compress` keyword is no longer supported in LightGraphs. Saving uncompressed.")
76+
else
77+
Base.depwarn("Saving compressed graphs is no longer supported in LightGraphs. Use `LGCompressedFormat()` from the `GraphIO.jl` package instead. Saving uncompressed.", :savegraph)
78+
end
79+
end
7580
io = open(fn, "w")
7681
try
7782
return savegraph(io, g, gname, format)

test/persistence/persistence.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@test_deprecated r"Saving compressed graphs is no longer supported" savegraph(f, p1; compress=true)
1212
@test savegraph(f, p1) == 1
1313
@test_deprecated r"Saving compressed graphs is no longer supported" savegraph(f, p1, LGFormat(); compress=true)
14+
@test_logs (:info,r"Note: the `compress` keyword is no longer supported in LightGraphs") savegraph(f, p1; compress=false)
1415
@test savegraph(f, p1, LGFormat()) == 1
1516
@test savegraph(f, p2) == 1
1617
@test (ne(p2), nv(p2)) == (9, 10)

0 commit comments

Comments
 (0)