Remove convert method to OrderedDict#139
Remove convert method to OrderedDict#139fingolfin wants to merge 2 commits intoJuliaCollections:masterfrom
Conversation
|
I'm guessing it's because the user is making that conversion because they care about the order in the resulting object, but if you're converting from an unordered container the resulting order is unpredictable? But honestly I don't know. |
The generic one in Julia stdlib does the job, except for the deprecation
warning shown when converting from an unordered dict (such as `Base.Dict`)
to an `OrderedDict{K,V}` type.
This avoids potential invalidations in packages. There also is no explanation
as to why it makes sense to forbids such conversions.
68349aa to
9d6aed0
Compare
|
I am fine with this. It's not always sensible to convert an Unordered And given there is already a fallback that does the same thing (minus the warning messages) we do not have worry about breaking this. |
The generic one in Julia stdlib does the job, except for the deprecation warning shown when converting from an unordered dict (such as
Base.Dict) to anOrderedDict{K,V}type.This avoids potential invalidations in packages. There also is no explanation as to why it makes sense to forbids such conversions.
The
depwarnwas introduced in bea4031 but I don't know why. I certainly don't want to hastily merge this without understanding this better. I am also happy to close this PR and instead open one which adds a comment with an explanation of why this conversion is deprecated, as soon as somebody explains it to me :-). Or just open a PR with that explanation and we merge that and close this PR.CC @timholy @oxinabox who perhaps might have an idea?
Also I figure one should perhaps use nanosoldier to test a PR like this given how critical this package is in the ecosystem? but I have no idea how to do that (and maybe also not the access rights? I know too little about it)