-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pydrake] Deprecate the pydrake.examples.* submodules (#18685)
All of the classes have been available from the pydrake.examples module directly for a while now. It's time to clean out the cruft.
- Loading branch information
1 parent
7411176
commit c0ae8b6
Showing
15 changed files
with
91 additions
and
30 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
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,12 +1,18 @@ | ||
"""Shim module that provides vestigial names for pydrake.examples. | ||
Prefer not to use this import path in new code; all of the code in | ||
this module can be imported from pydrake.examples directly. | ||
This module will be deprecated at some point in the future. | ||
""" | ||
|
||
from pydrake.common.deprecation import _warn_deprecated | ||
|
||
from pydrake.examples import ( | ||
CompassGait, | ||
CompassGaitContinuousState, | ||
CompassGaitGeometry, | ||
CompassGaitParams, | ||
) | ||
|
||
_warn_deprecated( | ||
"Please import from the pydrake.examples module directly, instead of the " | ||
f"deprecated {__name__} submodule.", | ||
date="2023-05-01", stacklevel=3) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
"""Shim module that provides vestigial names for pydrake.examples. | ||
Prefer not to use this import path in new code; all of the code in | ||
this module can be imported from pydrake.examples directly. | ||
This module will be deprecated at some point in the future. | ||
""" | ||
|
||
from pydrake.common.deprecation import _warn_deprecated | ||
|
||
from pydrake.examples import ( | ||
PendulumGeometry, | ||
PendulumInput, | ||
PendulumParams, | ||
PendulumPlant, | ||
PendulumState, | ||
) | ||
|
||
_warn_deprecated( | ||
"Please import from the pydrake.examples module directly, instead of the " | ||
f"deprecated {__name__} submodule.", | ||
date="2023-05-01", stacklevel=3) |
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,11 +1,17 @@ | ||
"""Shim module that provides vestigial names for pydrake.examples. | ||
Prefer not to use this import path in new code; all of the code in | ||
this module can be imported from pydrake.examples directly. | ||
This module will be deprecated at some point in the future. | ||
""" | ||
|
||
from pydrake.common.deprecation import _warn_deprecated | ||
|
||
from pydrake.examples import ( | ||
QuadrotorGeometry, | ||
QuadrotorPlant, | ||
StabilizingLQRController, | ||
) | ||
|
||
_warn_deprecated( | ||
"Please import from the pydrake.examples module directly, instead of the " | ||
f"deprecated {__name__} submodule.", | ||
date="2023-05-01", stacklevel=3) |
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,12 +1,18 @@ | ||
"""Shim module that provides vestigial names for pydrake.examples. | ||
Prefer not to use this import path in new code; all of the code in | ||
this module can be imported from pydrake.examples directly. | ||
This module will be deprecated at some point in the future. | ||
""" | ||
|
||
from pydrake.common.deprecation import _warn_deprecated | ||
|
||
from pydrake.examples import ( | ||
RimlessWheel, | ||
RimlessWheelContinuousState, | ||
RimlessWheelGeometry, | ||
RimlessWheelParams, | ||
) | ||
|
||
_warn_deprecated( | ||
"Please import from the pydrake.examples module directly, instead of the " | ||
f"deprecated {__name__} submodule.", | ||
date="2023-05-01", stacklevel=3) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
"""Shim module that provides vestigial names for pydrake.examples. | ||
Prefer not to use this import path in new code; all of the code in | ||
this module can be imported from pydrake.examples directly. | ||
This module will be deprecated at some point in the future. | ||
""" | ||
|
||
from pydrake.common.deprecation import _warn_deprecated | ||
|
||
from pydrake.examples import ( | ||
VanDerPolOscillator, | ||
) | ||
|
||
_warn_deprecated( | ||
"Please import from the pydrake.examples module directly, instead of the " | ||
f"deprecated {__name__} submodule.", | ||
date="2023-05-01", stacklevel=3) |