[2.7] adds deprecation notices.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

this should be refactored by creating a private method already with the actual logic, so that internal usages don't trigger the warning. The deprecated method would then call this private method