-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promote
consents
from 'experimental'
The consents module is moved to `globus_sdk.scopes.consents`, and docs are updated as appropriate. A getattr-based rename module, with deprecation warnings, is added to `experimental`.
- Loading branch information
Showing
13 changed files
with
71 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Changed | ||
~~~~~~~ | ||
|
||
- Consent object models have been moved from | ||
``globus_sdk.experimental.consents`` into ``globus_sdk.scopes.consents``. (:pr:`NUMBER`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ which make learning about and manipulating these data easier. | |
|
||
scopes | ||
mutable_scopes | ||
consents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ Globus SDK Experimental Components | |
|
||
auth_requirements_errors | ||
scope_parser | ||
consents | ||
globus_app | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
import typing as t | ||
|
||
__all__ = ( | ||
"Consent", | ||
"ConsentTree", | ||
"ConsentForest", | ||
"ConsentParseError", | ||
"ConsentTreeConstructionError", | ||
) | ||
|
||
# legacy aliases | ||
# (when accessed, these will emit deprecation warnings in a future release) | ||
if t.TYPE_CHECKING: | ||
from globus_sdk.scopes.consents import ( | ||
Consent, | ||
ConsentForest, | ||
ConsentParseError, | ||
ConsentTree, | ||
ConsentTreeConstructionError, | ||
) | ||
else: | ||
|
||
def __getattr__(name: str) -> t.Any: | ||
import globus_sdk.scopes.consents as consents_module | ||
from globus_sdk.exc import warn_deprecated | ||
|
||
warn_deprecated( | ||
"'globus_sdk.experimental.consents' has been renamed to " | ||
"'globus_sdk.scopes.consents'. " | ||
f"Importing '{name}' from `globus_sdk.experimental` is deprecated." | ||
) | ||
value = getattr(consents_module, name, None) | ||
if value is None: | ||
raise AttributeError(f"module {__name__} has no attribute {name}") | ||
setattr(sys.modules[__name__], name, value) | ||
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...bus_sdk/experimental/consents/__init__.py → src/globus_sdk/scopes/consents/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from ._errors import ConsentParseError, ConsentTreeConstructionError | ||
from ._model import Consent, ConsentForest, ConsentTree | ||
|
||
__all__ = [ | ||
__all__ = ( | ||
"Consent", | ||
"ConsentTree", | ||
"ConsentForest", | ||
"ConsentParseError", | ||
"ConsentTreeConstructionError", | ||
] | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters