Skip to content

Commit 211af7c

Browse files
authored
Merge pull request #592 from JuliaRobotics/3Q20/544_deprecation_cleanup
Deleting v0.10 deprecations
2 parents afd4e41 + df89836 commit 211af7c

File tree

5 files changed

+2
-89
lines changed

5 files changed

+2
-89
lines changed

src/Deprecated.jl

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,6 @@
22
# deprecation staging area
33
##==============================================================================
44

5-
6-
##==============================================================================
7-
## Remove in 0.10
8-
##==============================================================================
9-
10-
# temporary promote with warning
11-
Base.promote_rule(::Type{DateTime}, ::Type{ZonedDateTime}) = DateTime
12-
function Base.convert(::Type{DateTime}, ts::ZonedDateTime)
13-
@warn "DFG now uses ZonedDateTime, temporary promoting and converting to DateTime local time"
14-
return DateTime(ts, Local)
15-
end
16-
17-
export listSolvekeys
18-
19-
@deprecate listSolvekeys(x...) listSolveKeys(x...)
20-
21-
export InferenceType
22-
export FunctorSingleton, FunctorPairwise, FunctorPairwiseMinimize
23-
24-
abstract type InferenceType end
25-
26-
# These will become AbstractPrior, AbstractRelativeFactor, and AbstractRelativeFactorMinimize in 0.9.
27-
abstract type FunctorSingleton <: FunctorInferenceType end
28-
abstract type FunctorPairwise <: FunctorInferenceType end
29-
abstract type FunctorPairwiseMinimize <: FunctorInferenceType end
30-
31-
# I don't know how to deprecate this, any suggestions?
32-
const AbstractBigDataEntry = AbstractDataEntry
33-
34-
@deprecate GeneralBigDataEntry(args...; kwargs...) GeneralDataEntry(args...; kwargs...)
35-
@deprecate MongodbBigDataEntry(args...) MongodbDataEntry(args...)
36-
@deprecate FileBigDataEntry(args...) FileDataEntry(args...)
37-
38-
# TODO entities/DFGVariable.jl DFGVariableSummary.bigData getproperty and setproperty!
39-
# TODO entities/DFGVariable.jl DFGVariable.bigData getproperty and setproperty!
40-
@deprecate getBigData(args...) getDataBlob(args...)
41-
@deprecate addBigData!(args...) addDataBlob!(args...)
42-
@deprecate updateBigData!(args...) updateDataBlob!(args...)
43-
@deprecate deleteBigData!(args...) deleteDataBlob!(args...)
44-
@deprecate listStoreEntries(args...) listDataBlobs(args...)
45-
@deprecate hasBigDataEntry(args...) hasDataEntry(args...)
46-
47-
48-
@deprecate getBigDataEntry(args...) getDataEntry(args...)
49-
@deprecate addBigDataEntry!(args...) addDataEntry!(args...)
50-
@deprecate updateBigDataEntry!(args...) updateDataEntry!(args...)
51-
@deprecate deleteBigDataEntry!(args...) deleteDataEntry!(args...)
52-
@deprecate getBigDataKeys(args...) listDataEntries(args...)
53-
@deprecate getBigDataEntries(args...) getDataEntries(args...)
54-
@deprecate getDataEntryElement(args...) getDataEntryBlob(args...)
55-
56-
575
##==============================================================================
586
## Remove in 0.11
597
##==============================================================================

src/entities/DFGFactor.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ end
185185
Base.setproperty!(x::DFGFactor,f::Symbol, val) = begin
186186
if f == :solvable || f == :solverData
187187
getfield(x,f)[] = val
188-
elseif f == :timestamp && val isa DateTime
189-
# #TODO Deprecation - Remove in v0.10
190-
Base.depwarn("DFGFactor timestamp field is now a ZonedTimestamp", :setproperty!)
191-
setfield!(x,:timestamp, ZonedDateTime(val, localzone()))
192188
else
193189
setfield!(x,f,val)
194190
end

src/entities/DFGVariable.jl

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,6 @@ end
292292
Base.getproperty(x::DFGVariable,f::Symbol) = begin
293293
if f == :solvable
294294
getfield(x,f)[]
295-
#TODO Deprecation - Remove in v0.10
296-
elseif f == :bigData
297-
Base.depwarn("DFGVariable field bigData is deprecated, use `dataDict` instead",:getproperty)
298-
getfield(x,:dataDict)
299295
else
300296
getfield(x,f)
301297
end
@@ -304,14 +300,6 @@ end
304300
Base.setproperty!(x::DFGVariable,f::Symbol, val) = begin
305301
if f == :solvable
306302
getfield(x,f)[] = val
307-
elseif f == :bigData
308-
#TODO Deprecation - Remove in v0.10
309-
Base.depwarn("DFGVariable field bigData is deprecated, use `dataDict` instead", :setproperty!)
310-
setfield(x, :dataDict, val)
311-
elseif f == :timestamp && val isa DateTime
312-
# #TODO Deprecation - Remove in v0.10
313-
Base.depwarn("DFGVariable timestamp field is now a ZonedTimestamp", :setproperty!)
314-
setfield!(x,:timestamp, ZonedDateTime(val, localzone()))
315303
else
316304
setfield!(x,f,val)
317305
end
@@ -359,25 +347,6 @@ struct DFGVariableSummary <: AbstractDFGVariable
359347
dataDict::Dict{Symbol, AbstractDataEntry}
360348
end
361349

362-
#TODO Deprecation - Remove in v0.10
363-
Base.getproperty(x::DFGVariableSummary,f::Symbol) = begin
364-
if f == :bigData
365-
Base.depwarn("DFGVariableSummary field bigData is deprecated, use `dataDict` instead",:getproperty)
366-
getfield(x,:dataDict)
367-
else
368-
getfield(x,f)
369-
end
370-
end
371-
372-
#TODO Deprecation - Remove in v0.10
373-
Base.setproperty!(x::DFGVariableSummary,f::Symbol, val) = begin
374-
if f == :bigData
375-
Base.depwarn("DFGVariableSummary field bigData is deprecated, use `dataDict` instead",:setproperty!)
376-
setfield(x, :dataDict)
377-
else
378-
setfield!(x,f,val)
379-
end
380-
end
381350
##------------------------------------------------------------------------------
382351
## SkeletonDFGVariable.jl
383352
##------------------------------------------------------------------------------

src/services/DFGFactor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Return `::Bool` on whether given factor `fc::Symbol` is a prior in factor graph
136136
"""
137137
function isPrior(dfg::G, fc::Symbol)::Bool where G <: AbstractDFG
138138
fco = getFactor(dfg, fc)
139-
getFactorType(fco) isa AbstractPrior || getFactorType(fco) isa FunctorSingleton
139+
getFactorType(fco) isa AbstractPrior
140140
end
141141

142142

test/testBlocks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ end
512512
@test lsf(fg) == listFactors(fg)
513513

514514
if getVariable(fg, ls(fg)[1]) isa DFGVariable
515-
@test :default in listSolvekeys(fg)
515+
@test :default in listSolveKeys(fg)
516516
@test :default in listSupersolves(fg)
517517
end
518518

0 commit comments

Comments
 (0)