|
1 |
| -"""This submodule contains helper functions to help with quick prototyping |
| 1 | +"""This submodule contains helper functions to help with quick prototyping |
2 | 2 | using pymunk together with matplotlib.
|
3 | 3 |
|
4 | 4 | Intended to help with debugging and prototyping, not for actual production use
|
5 |
| -in a full application. The methods contained in this module is opinionated |
6 |
| -about your coordinate system and not very optimized. |
| 5 | +in a full application. The methods contained in this module is opinionated |
| 6 | +about your coordinate system and not very optimized. |
7 | 7 | """
|
8 | 8 |
|
9 | 9 | __docformat__ = "reStructuredText"
|
10 | 10 |
|
| 11 | +import warnings |
11 | 12 | from typing import TYPE_CHECKING, Any, Sequence
|
12 | 13 |
|
13 | 14 | import matplotlib.pyplot as plt # type: ignore
|
@@ -43,11 +44,26 @@ def __init__(self, ax: Any) -> None:
|
43 | 44 |
|
44 | 45 | See matplotlib_util.demo.py for a full example
|
45 | 46 |
|
| 47 | + .. deprecated:: 7.0.0 |
| 48 | + If you find this class useful, please open an issue on the pymunk |
| 49 | + issue tracker at https://github.com/viblo/pymunk/issues Otherwise |
| 50 | + this is likely to be completely removed in a future Pymunk version. |
| 51 | +
|
| 52 | +
|
46 | 53 | :Param:
|
47 | 54 | ax: matplotlib.Axes
|
48 | 55 | A matplotlib Axes object.
|
49 | 56 |
|
50 | 57 | """
|
| 58 | + warnings.warn( |
| 59 | + "matplotlib_util.DrawOptions is deprecated. If you find it useful, " |
| 60 | + "please open an issue on the pymunk issue tracker at " |
| 61 | + "https://github.com/viblo/pymunk/issues Otherwise this is likely " |
| 62 | + "to be completely removed in a future Pymunk version.", |
| 63 | + category=DeprecationWarning, |
| 64 | + stacklevel=2, |
| 65 | + ) |
| 66 | + |
51 | 67 | super(DrawOptions, self).__init__()
|
52 | 68 |
|
53 | 69 | self.ax = ax
|
|
0 commit comments