- Notifications
You must be signed in to change notification settings - Fork673
refactor: explicitly import gitlab.const values into top-level namespace#1694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fd04824
toba3b38a
Compareba3b38a
tocf92904
Comparecodecov-commenter commentedNov 17, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #1694 +/- ##==========================================+ Coverage 92.01% 92.02% +0.01%========================================== Files 75 75 Lines 4670 4676 +6 ==========================================+ Hits 4297 4303 +6 Misses 373 373
Flags with carried forward coverage won't be shown.Click here to find out more.
|
Uh oh!
There was an error while loading.Please reload this page.
7295a13
toffc535f
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ffc535f
tof83738f
Comparef83738f
toee25bcd
CompareWe 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-levelgitlab 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 deprecateaccess to the top-level constants.Add a unit test which verifies we generate a warning when accessingthe top-level constants.
Have code use constants from the gitlab.const module instead of fromthe top-level gitlab module.
Update the docs to use gitlab.const to access constants.
ee25bcd
tob3b0b5f
Compare
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.Explicitly add the current values defined in gitlab.const into the
top-level namespace and stop using the previous
'from gitlab.const import *' method.