From 1cddfe26c713a5f6ca264dc3e6587027b26d1b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Tue, 16 Jul 2024 11:45:48 +0200 Subject: [PATCH] DEP: depricate get_username --- CHANGELOG.md | 1 + src/linkahead/connection/connection.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a4e442..1592ac68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### ### Deprecated ### +- `connection.get_username`. Use `la.Info().user_info.name` instead. ### Removed ### diff --git a/src/linkahead/connection/connection.py b/src/linkahead/connection/connection.py index 294d9457..c95134fe 100644 --- a/src/linkahead/connection/connection.py +++ b/src/linkahead/connection/connection.py @@ -757,6 +757,8 @@ class _Connection(object): # pylint: disable=useless-object-inheritance Shortcut for: get_connection()._authenticator._credentials_provider.username """ + warnings.warn("Deprecated. Please use ``la.Info().user_info.name`` instead.", + DeprecationWarning) if self._authenticator is None: raise ValueError( "No authenticator set. Please call configure_connection() first.") -- GitLab