diff options
author | John L. Villalovos <john@sodarock.com> | 2021-11-30 08:37:46 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-11-30 08:37:46 -0800 |
commit | c0aa0e1c9f7d7914e3062fe6503da870508b27cf (patch) | |
tree | c141f76fef50bfbefb3d0806ccdf7c24c106f799 /tests/functional/api/test_snippets.py | |
parent | 09a973ee379d82af05a5080decfaec16d2f4eab3 (diff) | |
download | gitlab-c0aa0e1c9f7d7914e3062fe6503da870508b27cf.tar.gz |
refactor: deprecate accessing constants from top-level namespace
We are planning on adding enumerated constants into gitlab/const.py,
but if we do that than they will end up being added to the top-level
gitlab namespace. We really want to get users to start using
`gitlab.const.` to access the constant values in the future.
Add the currently defined constants to a list that should not change.
Use a module level __getattr__ function so that we can deprecate
access to the top-level constants.
Add a unit test which verifies we generate a warning when accessing
the top-level constants.
Diffstat (limited to 'tests/functional/api/test_snippets.py')
0 files changed, 0 insertions, 0 deletions