adding deprecation warnings the right way for attributes and setter