-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge topic 'remove-deprecated-python-functions'
255d41d Release note for python deprecated API removal e608328 Remove deprecated parameter simple.SaveAnimation(DisconnectAndSave) 72dc93d Remove deprecated parameter simple.SaveScreenshot(ImageQuality) 8a00e5a Remove deprecated paramater simple.CreateView(detachedFromLayout) 4fb6a52 Improve deprecated tags and message in python files 4740814 Remove float comparison support for paraview.compatibility 48253f7 Remove deprecated paraview.simple.ImportCinema 90a2594 Remove deprecated paraview.simple.WriteImage ... Acked-by: Kitware Robot <[email protected]> Acked-by: Nicolas Vuaille <[email protected]> Merge-request: !6053
- Loading branch information
Showing
22 changed files
with
272 additions
and
401 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
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
17 changes: 17 additions & 0 deletions
17
Documentation/release/dev/deprecated-python-API-removal.md
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,17 @@ | ||
## Deprecated python API removal | ||
|
||
Several deprecated python API that have been around for a few years are now gone. | ||
This include : | ||
|
||
- `paraview.simple.CreateScalarBar()`, replaced by `paraview.simple.GetScalarBar()`. | ||
- `paraview.simple.WriteAnimation()`, replaced by `paraview.simple.SaveAnimation()`. | ||
- `paraview.simple.WriteImage()`, replaced by `paraview.simple.SaveScreenshot()`. | ||
- `paraview.simple.ImportCinema()`, no longer supported since 5.9. | ||
- `paraview.compatibility.GetVersion().GetVersion()`, because of float comparison issue. | ||
|
||
Other deprecated behaviors have been removed : | ||
|
||
- `paraview.compatibility.GetVersion()` cannot be compared with float values anymore. | ||
- In `paraview.simple.CreateView()`, removed support for positional argument `detachedFromLayout`. | ||
- In `paraview.simple.SaveScreenshot()`, removed support for optional argument `ImageQuality`. | ||
- In `paraview.simple.SaveAnimation()`, removed support for optional argument `DisconnectAndSave` and `ImageQuality`. |
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,42 +1,58 @@ | ||
# ensures paraview._version() works as expected. | ||
|
||
from paraview import _version, compatibility | ||
from paraview import compatibility | ||
|
||
assert (compatibility.GetVersion().GetVersion() == None),\ | ||
assert (bool(compatibility.GetVersion()) == False),\ | ||
"ParaView modules should never force backwards compatibility to any version" | ||
assert ((compatibility.GetVersion() < 4.1) == False),\ | ||
assert ((compatibility.GetVersion() < (4, 1)) == False),\ | ||
"less-than test should always fail when version is not specified." | ||
assert ((compatibility.GetVersion() <= 4.1) == False),\ | ||
assert ((compatibility.GetVersion() <= (4, 1)) == False),\ | ||
"less-equal test should always fail when version is not specified." | ||
assert ((compatibility.GetVersion() > 4.1) == True),\ | ||
assert ((compatibility.GetVersion() > (4, 1)) == True),\ | ||
"greater-than test should always pass when version is not specified." | ||
assert ((compatibility.GetVersion() >= 4.1) == True),\ | ||
assert ((compatibility.GetVersion() >= (4, 1)) == True),\ | ||
"greater-equal test should always pass when version is not specified." | ||
|
||
|
||
# Now switch backwards compatibility to 4.1 | ||
# Now switch backwards compatibility to (4, 1) | ||
compatibility.major = 4 | ||
compatibility.minor = 1 | ||
|
||
assert ((compatibility.GetVersion() < 4.1) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= 4.1) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > 4.1) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= 4.1) == True), "version comparison failed" | ||
try: | ||
compatibility.GetVersion() < 4.1 | ||
assert (False), "version comparison with floating value should fail" | ||
except TypeError: | ||
assert (True) | ||
|
||
assert ((compatibility.GetVersion() < (4, 10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4,10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4,10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4,10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() < (4, 1)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4, 1)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4, 1)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4, 1)) == True), "version comparison failed" | ||
|
||
assert ((compatibility.GetVersion() < (4, 10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4, 10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4, 10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4, 10)) == False), "version comparison failed" | ||
|
||
compatibility.major = 4 | ||
compatibility.major = 11 | ||
assert ((compatibility.GetVersion() < 4.1) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= 4.1) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() > 4.1) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= 4.1) == True), "version comparison failed" | ||
compatibility.minor = 11 | ||
|
||
assert ((compatibility.GetVersion() < (4, 1)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4, 1)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4, 1)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4, 1)) == True), "version comparison failed" | ||
|
||
assert ((compatibility.GetVersion() < (4, 10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4,10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4,10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4,10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4, 10)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4, 10)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4, 10)) == True), "version comparison failed" | ||
|
||
assert ((compatibility.GetVersion() < (4, 11)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() <= (4, 11)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (4, 11)) == False), "version comparison failed" | ||
assert ((compatibility.GetVersion() >= (4, 11)) == True), "version comparison failed" | ||
|
||
assert ((compatibility.GetVersion() < (5, 0)) == True), "version comparison failed" | ||
assert ((compatibility.GetVersion() > (3, 12)) == True), "version comparison failed" | ||
|
||
assert ((compatibility.GetVersion() < 5) == True), "major version comparison failed" | ||
assert ((compatibility.GetVersion() > 3) == True), "major version comparison failed" |
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
Oops, something went wrong.