Well, after going through the code, I don't consider this behaviour as a bug. Xarray makes coordinates a pandas index. which is immutable. A shift operation as in my example makes sense only for numeric indices, so deep copy makes little sense. IMHO the code works as intended, may be the documentation should be updated to say that deep argument has no effect on coordinates.
I find semantics of
dy['time'] += int(...)
confusing. It is sort of operation in place, but not quite. It updates shared (between dx and dy) data, but does return a new index, so technically id does not violate index immutability.
The *true* modification in place:.
dy['time'].loc[:] += int(...)
is (rightly) not allowed. Finally,
dy['time'] = dy['time'] + int(...)
works as expected.
What is the rationale for this behaviour?
Sorry if I am stating the obvious, I am new to xarray and I want to find out what might bite me somewhere in a larger chunk of code.