Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
458c75b
test
AntonBallmaier Mar 12, 2021
336eeff
revert test changes
AntonBallmaier Mar 13, 2021
240e5aa
Merge upstream to master
AntonBallmaier Mar 14, 2021
bff5654
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Mar 16, 2021
83979a9
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Mar 17, 2021
a772b17
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Mar 31, 2021
a1190d4
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 5, 2021
3b09f51
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 6, 2021
07f01b9
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 11, 2021
6d8fe8f
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 16, 2021
4329ee0
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 20, 2021
0a8bf8a
Merge remote-tracking branch 'upstream/master'
AntonBallmaier Apr 20, 2021
58c3f8c
finish draft implementation
AntonBallmaier Apr 25, 2021
612e96d
use @wrapss to remove docs problems
AntonBallmaier Apr 25, 2021
be51009
reduce complexity and add doc deprecation
AntonBallmaier Apr 25, 2021
7857352
Docs deprecated_params
AntonBallmaier Apr 25, 2021
b42c64e
add decoratos to __init__
AntonBallmaier Apr 25, 2021
3d18352
Add decorators to documentation
AntonBallmaier Apr 25, 2021
11a09d3
Finish detailed docs
AntonBallmaier Apr 25, 2021
8624597
Merge remote-tracking branch 'upstream/master' into decorators
AntonBallmaier Apr 25, 2021
9e6d870
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 25, 2021
a675cc7
Apply suggestions from code review
AntonBallmaier Apr 26, 2021
e3218aa
change since/until/message param docs
AntonBallmaier Apr 26, 2021
02901a8
Mark get_callable_info and deprecation_text_component as private
AntonBallmaier Apr 26, 2021
3a81da4
change how until is included in warning messages
AntonBallmaier Apr 26, 2021
5b6313a
Add The to prameter descriptions
AntonBallmaier Apr 26, 2021
feda9e3
is deprecated => has been deprecated
AntonBallmaier Apr 26, 2021
f87ddae
Fix typo
AntonBallmaier Apr 26, 2021
d01c51a
fix typo
AntonBallmaier Apr 26, 2021
7d06c4d
make params docs more readable
AntonBallmaier Apr 26, 2021
dd42a32
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2021
15f04d0
make redirections docs clearer
AntonBallmaier Apr 26, 2021
1665123
Merge branch 'decorators' of https://github.com/AntonBallmaier/manim …
AntonBallmaier Apr 26, 2021
f7bbbd2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2021
d6b290f
Fix typo
AntonBallmaier Apr 26, 2021
ae4d2b1
Merge branch 'decorators' of https://github.com/AntonBallmaier/manim …
AntonBallmaier Apr 26, 2021
84b06d3
fix typo
AntonBallmaier Apr 26, 2021
42d7580
fix typo
AntonBallmaier Apr 26, 2021
0e51f65
is_are => has_have_been
AntonBallmaier Apr 26, 2021
9860eb6
fix typo
AntonBallmaier Apr 26, 2021
da5115a
update deprendency list
AntonBallmaier Apr 26, 2021
b63d956
order dependencies
AntonBallmaier Apr 26, 2021
ecd07a6
update examples
AntonBallmaier Apr 26, 2021
ae14119
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2021
1bb432b
fix dependeny problem
AntonBallmaier Apr 26, 2021
5ff01b4
Merge branch 'decorators' of https://github.com/AntonBallmaier/manim …
AntonBallmaier Apr 26, 2021
c978213
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2021
118b743
fix duplicate problem
AntonBallmaier Apr 26, 2021
7c56622
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2021
6a62dab
change decorator version
AntonBallmaier Apr 26, 2021
ea496cc
Merge branch 'decorators' of https://github.com/AntonBallmaier/manim …
AntonBallmaier Apr 26, 2021
34da182
updated lock file
AntonBallmaier Apr 26, 2021
8eed529
enhance function / method separation
AntonBallmaier Apr 26, 2021
8fe5a90
fix typo and double underscores
AntonBallmaier Apr 26, 2021
3491339
rename message_ and replacement_
AntonBallmaier Apr 27, 2021
37a50c7
Change warning to custom admonition
AntonBallmaier Apr 27, 2021
db1d9df
remove [] as default parameters
AntonBallmaier Apr 27, 2021
bf5e615
Remove "" around type
AntonBallmaier Apr 27, 2021
01ea73f
fix typo
AntonBallmaier Apr 27, 2021
84fa976
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2021
e4f021b
fix bug and move to inspect
AntonBallmaier Apr 27, 2021
1570c63
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2021
d505748
doc string => docstring
AntonBallmaier Apr 27, 2021
a0d48cd
Merge branch 'decorators' of https://github.com/AntonBallmaier/manim …
AntonBallmaier Apr 27, 2021
7f85e93
Merge branch 'master' into decorators
AntonBallmaier Apr 27, 2021
c4ea71d
Merge branch 'master' into decorators
AntonBallmaier Apr 27, 2021
82d3115
rename to deprecate
AntonBallmaier Apr 27, 2021
c45e3c5
change module docstring
AntonBallmaier Apr 27, 2021
f20791e
change to deprecation.py
AntonBallmaier Apr 27, 2021
7d085bd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2021
1d0df94
Merge branch 'master' into decorators
AntonBallmaier Apr 27, 2021
0dcda49
some sugesstions
AntonBallmaier Apr 27, 2021
d0ed5a8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2021
b36c55d
remove tests again
AntonBallmaier Apr 27, 2021
ea6227a
Merge branch 'master' into decorators
AntonBallmaier Apr 27, 2021
c57f824
Rename decorators.py to deprecate.py
RickyC0626 Apr 27, 2021
c1eb0db
Update poetry.lock
RickyC0626 Apr 27, 2021
b41fd91
Test if deprecated class outputs the correct warning when used
RickyC0626 Apr 27, 2021
4fc3896
Rename deprecate to deprecation
RickyC0626 Apr 27, 2021
a054ae1
Fix typos
RickyC0626 Apr 27, 2021
9f2e5eb
Shorten conditional for msg
RickyC0626 Apr 27, 2021
a067988
Shorten conditional for since
RickyC0626 Apr 27, 2021
17900de
Shorten conditional for until
RickyC0626 Apr 27, 2021
d1df912
Specify decorator arguments in test
RickyC0626 Apr 27, 2021
5700ff1
Add tests for since and until arguments
RickyC0626 Apr 27, 2021
28a1423
Add test for since and until as arguments
RickyC0626 Apr 27, 2021
d053311
Add test for msg argument for class
RickyC0626 Apr 27, 2021
466e017
Add test for replacement argument for class
RickyC0626 Apr 27, 2021
e60ff9a
Remove unneeded docstring in deprecated class
RickyC0626 Apr 27, 2021
56d7889
Add test for deprecate method, no args
RickyC0626 Apr 27, 2021
e77bc47
Update docstring examples, move deprecated method outside class
RickyC0626 Apr 27, 2021
43d56d3
Add test for method in class, since and message args
RickyC0626 Apr 27, 2021
eba1144
Add test for deprecating nested class
RickyC0626 Apr 27, 2021
883bc0f
Add test for deprecated method in nested class
RickyC0626 Apr 27, 2021
8fb2f71
Test deprecation of nested function
RickyC0626 Apr 27, 2021
280a381
Test param deprecation, only params argument
RickyC0626 Apr 27, 2021
5b2c579
Merge pull request #10 from RickyC0626/dev/1372-deprecation-sys
AntonBallmaier Apr 28, 2021
659afb7
Merge branch 'master' into decorators
AntonBallmaier Apr 28, 2021
2367450
Merge branch 'master' into decorators
AntonBallmaier Apr 29, 2021
366a6c2
Test deprecation of single method param
RickyC0626 Apr 29, 2021
42c63de
Rename single param test method name
RickyC0626 Apr 29, 2021
4d15a9c
Fix deprecated_params docstring whitespace
RickyC0626 Apr 29, 2021
c5c1fda
Test parameter redirection using tuple
RickyC0626 Apr 29, 2021
0a24082
Update warning msgs in deprecated_params docstring
RickyC0626 Apr 29, 2021
05fb3b2
Test parameter redirection using lambda function
RickyC0626 Apr 29, 2021
815e597
Test param redirection from many to one
RickyC0626 Apr 29, 2021
07111fc
Test param redirection from one to many
RickyC0626 Apr 29, 2021
cd9e187
Update Top.foo to deprecate with message
RickyC0626 Apr 29, 2021
e9aa667
Merge pull request #11 from RickyC0626/dev/1372-deprecation-sys
AntonBallmaier May 1, 2021
fafedf2
Merge branch 'master' into decorators
AntonBallmaier May 1, 2021
bb55f8b
Merge branch 'master' into decorators
AntonBallmaier May 3, 2021
1d71797
handle empty docstrings
AntonBallmaier May 3, 2021
0e0592a
fix typo
AntonBallmaier May 3, 2021
fc5f9c5
Update poetry.lock
RickyC0626 May 1, 2021
f30e3a7
Update poetry.lock
RickyC0626 May 2, 2021
0c41978
Deprecate ShowCreation using decorator to test the docs
RickyC0626 May 2, 2021
1ebead1
Test docstring for deprecated class
RickyC0626 May 2, 2021
e760abb
Test docstring for Bar and Baz classes
RickyC0626 May 3, 2021
b33c988
Test docstrings for the rest of the classes
RickyC0626 May 3, 2021
edea7b1
Test docstrings for Top methods
RickyC0626 May 3, 2021
327a9f2
Test docstrings for Top.Nested
RickyC0626 May 3, 2021
bb89d92
Test docstring for nested method
RickyC0626 May 3, 2021
56dbae3
Merge pull request #13 from RickyC0626/dev/1372-deprecation-sys
AntonBallmaier May 3, 2021
0e40814
Merge branch 'master' into decorators
AntonBallmaier May 3, 2021
d8b0fb7
Merge branch 'master' into decorators
AntonBallmaier May 3, 2021
e725981
Move deprecations to deprecation system
AntonBallmaier May 3, 2021
d35ded8
Some more deprecations
AntonBallmaier May 3, 2021
c870be3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 3, 2021
c5e786f
fix version numbering inconsistancies
AntonBallmaier May 3, 2021
7735bd0
Fix naming issue and MetaClass handling
AntonBallmaier May 3, 2021
e1ad3af
Merge branch 'master' into decorators
AntonBallmaier May 3, 2021
94018e4
Merge branch 'master' into decorators
AntonBallmaier May 5, 2021
c30ea1b
Merge branch 'master' into decorators
kolibril13 May 6, 2021
aa9f318
Merge branch 'master' into decorators
AntonBallmaier May 6, 2021
aca1d7a
Merge branch 'master' into decorators
AntonBallmaier May 7, 2021
6919ed0
Merge branch 'master' into decorators
AntonBallmaier May 7, 2021
f2e6104
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2021
80abed2
Merge branch 'master' into decorators
AntonBallmaier May 8, 2021
5cbe627
restart CI
AntonBallmaier May 8, 2021
4e6c988
Merge branch 'master' into decorators
AntonBallmaier May 9, 2021
23f6c0d
Merge branch 'master' into decorators
AntonBallmaier May 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Utilities
~utils.bezier
~utils.color
~utils.config_ops
~utils.deprecation
~utils.hashing
~utils.ipython_magic
~utils.images
Expand Down
10 changes: 2 additions & 8 deletions manim/animation/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ..mobject import mobject, opengl_mobject
from ..mobject.mobject import Mobject
from ..mobject.opengl_mobject import OpenGLMobject
from ..utils.deprecation import deprecated
from ..utils.rate_functions import smooth

DEFAULT_ANIMATION_RUN_TIME: float = 1.0
Expand Down Expand Up @@ -138,15 +139,8 @@ def interpolate(self, alpha: float) -> None:
alpha = min(max(alpha, 0), 1)
self.interpolate_mobject(self.rate_func(alpha))

@deprecated(until="v0.6.0", replacement="interpolate")
def update(self, alpha: float) -> None:
"""
This method shouldn't exist, but it's here to
keep many old scenes from breaking
"""
logger.warning(
"animation.update() has been deprecated. "
"Please use animation.interpolate() instead."
)
self.interpolate(alpha)

def interpolate_mobject(self, alpha: float) -> None:
Expand Down
3 changes: 1 addition & 2 deletions manim/animation/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ def construct(self):
import numpy as np
from colour import Color

from .. import logger

if TYPE_CHECKING:
from manim.mobject.svg.text_mobject import Text

Expand All @@ -87,6 +85,7 @@ def construct(self):
from ..mobject.types.opengl_vectorized_mobject import OpenGLVMobject
from ..mobject.types.vectorized_mobject import VMobject
from ..utils.bezier import integer_interpolate
from ..utils.deprecation import deprecated
from ..utils.rate_functions import double_smooth, linear, smooth


Expand Down
56 changes: 14 additions & 42 deletions manim/animation/indication.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def construct(self):
from colour import Color

from .. import config
from .._config import logger
from ..animation.animation import Animation
from ..animation.composition import AnimationGroup, Succession
from ..animation.creation import Create, ShowPartial, Uncreate
Expand All @@ -66,6 +65,7 @@ def construct(self):
from ..mobject.types.vectorized_mobject import VGroup, VMobject
from ..utils.bezier import interpolate, inverse_interpolate
from ..utils.color import GREY, YELLOW
from ..utils.deprecation import deprecated
from ..utils.rate_functions import smooth, there_and_back, wiggle
from ..utils.space_ops import normalize

Expand Down Expand Up @@ -278,9 +278,8 @@ def create_line_anims(self) -> typing.Iterable["ShowPassingFlash"]:
]


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Circumscribe")
class CircleIndicate(Indicate):
"""Deprecated. Use :class:`~.Circumscribe` instead."""

def __init__(
self,
mobject: "Mobject",
Expand All @@ -291,9 +290,6 @@ def __init__(
remover: bool = True,
**kwargs
) -> None:
logger.warning(
"ShowCreationThenDestructionAround has been deprecated in favor of Circumscribe. Please use Circumscribe instead!"
)
self.circle_config = circle_config
circle = self.get_circle(mobject)
super().__init__(circle, rate_func=rate_func, remover=remover, **kwargs)
Expand Down Expand Up @@ -383,15 +379,11 @@ def __init__(self, vmobject, n_segments=10, time_width=0.1, remover=True, **kwar
)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="ShowPassingFlash")
class ShowCreationThenDestruction(ShowPassingFlash):
"""Deprecated. Use :class:`~.ShowPassingFlash` instead."""

def __init__(
self, mobject: "Mobject", time_width: float = 2.0, run_time: float = 1, **kwargs
) -> None:
logger.warning(
"ShowCreationThenDestruction has been deprecated in favor of ShowPassingFlash. Please use ShowPassingFlash instead!"
)
super().__init__(mobject, time_width=time_width, run_time=run_time, **kwargs)


Expand All @@ -404,19 +396,15 @@ def __init__(self, mobject: "Mobject", remover: bool = True, **kwargs) -> None:
super().__init__(Create(mobject), FadeOut(mobject), remover=remover, **kwargs)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Circumscribe")
class AnimationOnSurroundingRectangle(AnimationGroup):
"""Deprecated. Use :class:`~.Circumscribe` instead or build an Animation using :class:`~SurroundingRectangle`."""

def __init__(
self,
mobject: "Mobject",
rect_animation: Animation = Animation,
surrounding_rectangle_config: typing.Dict[str, typing.Any] = {},
**kwargs
) -> None:
logger.warning(
"AnimationOnSurroundingRectangle has been deprecated in favor of Circumscribe. Please use Circumscribe instead!"
)
# Callable which takes in a rectangle, and spits out some animation. Could be
# some animation class, could be something more
self.rect_animation = rect_animation
Expand All @@ -436,45 +424,33 @@ def get_rect(self) -> SurroundingRectangle:
)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Circumscribe")
class ShowPassingFlashAround(AnimationOnSurroundingRectangle):
"""Deprecated. Use :class:`~.Circumscribe` instead."""

def __init__(
self, mobject: "Mobject", rect_animation: Animation = ShowPassingFlash, **kwargs
) -> None:
logger.warning(
"ShowPassingFlashAround has been deprecated in favor of Circumscribe. Please use Circumscribe instead!"
)
super().__init__(mobject, rect_animation=rect_animation, **kwargs)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Circumscribe")
class ShowCreationThenDestructionAround(AnimationOnSurroundingRectangle):
"""Deprecated. Use :class:`~.Circumscribe` instead."""

def __init__(
self,
mobject: "Mobject",
rect_animation: Animation = ShowCreationThenDestruction,
**kwargs
) -> None:
logger.warning(
"ShowCreationThenDestructionAround has been deprecated in favor of Circumscribe. Please use Circumscribe instead!"
)
super().__init__(mobject, rect_animation=rect_animation, **kwargs)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Circumscribe")
class ShowCreationThenFadeAround(AnimationOnSurroundingRectangle):
"""Deprecated. Use :class:`~.Circumscribe` instead."""

def __init__(
self,
mobject: "Mobject",
rect_animation: Animation = ShowCreationThenFadeOut,
**kwargs
) -> None:
logger.warning(
"ShowCreationThenFadeAround has been deprecated in favor of Circumscribe. Please use Circumscribe instead!"
)
super().__init__(mobject, rect_animation=rect_animation, **kwargs)


Expand Down Expand Up @@ -677,23 +653,19 @@ def interpolate_submobject(
)


@deprecated(since="v0.5.0", until="v0.7.0", replacement="Wiggle")
class WiggleOutThenIn(Wiggle):
"""Deprecated. Use :class:`~.Wiggle` instead."""

def __init__(*args, **kwargs):
logger.warning(
"WiggleOutThenIn has been deprecated in favor of Wiggle. Please use Wiggle instead!"
)
super().__init__(*args, **kwargs)
super().__init(*args, **kwargs)


@deprecated(
since="v0.5.0",
until="v0.7.0",
message="Use :code:`mobject.animate.become(mobject.copy().reverse_points())` instead if you have to.",
)
class TurnInsideOut(Transform):
"""Deprecated. Use :code:`mobject.animate.become(mobject.copy().reverse_points())` instead if you have to."""

def __init__(self, mobject: "Mobject", path_arc: float = TAU / 4, **kwargs) -> None:
logger.warning(
"TurnInsideOut has been deprecated. Please stop using TurnInsideOut!"
)
super().__init__(mobject, path_arc=path_arc, **kwargs)

def create_target(self) -> "Mobject":
Expand Down
21 changes: 6 additions & 15 deletions manim/animation/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
from ..animation.animation import Animation
from ..mobject.numbers import DecimalNumber
from ..utils.bezier import interpolate
from ..utils.deprecation import deprecated_params


class ChangingDecimal(Animation):
@deprecated_params(
"tracked_mobject position_update_func",
until="v0.6.0",
message="Use a mobject updater instead.",
)
def __init__(
self,
decimal_mob: DecimalNumber,
Expand All @@ -20,7 +26,6 @@ def __init__(
**kwargs,
) -> None:
self.check_validity_of_input(decimal_mob)
self.yell_about_deprecated_configuration(**kwargs)
self.number_update_func = number_update_func
super().__init__(
decimal_mob, suspend_mobject_updating=suspend_mobject_updating, **kwargs
Expand All @@ -30,20 +35,6 @@ def check_validity_of_input(self, decimal_mob: DecimalNumber) -> None:
if not isinstance(decimal_mob, DecimalNumber):
raise TypeError("ChangingDecimal can only take in a DecimalNumber")

def yell_about_deprecated_configuration(self, **kwargs) -> None:
# Obviously this would optimally be removed at
# some point.
for attr in ["tracked_mobject", "position_update_func"]:
if attr in kwargs:
warnings.warn(
f"""
Don't use {attr} for ChangingDecimal,
that functionality has been deprecated
and you should use a mobject updater
instead
"""
)

def interpolate_mobject(self, alpha: float) -> None:
self.mobject.set_value(self.number_update_func(alpha))

Expand Down
9 changes: 3 additions & 6 deletions manim/mobject/opengl_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
OpenGLVMobject,
)
from ..utils.color import *
from ..utils.deprecation import deprecated
from ..utils.iterables import adjacent_n_tuples, adjacent_pairs
from ..utils.simple_functions import clip, fdiv
from ..utils.space_ops import (
Expand Down Expand Up @@ -340,14 +341,10 @@ def __init__(
)


@deprecated(until="v0.6.0", replacement="OpenGLDot")
class OpenGLSmallDot(OpenGLDot):
"""Deprecated"""

def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
logger.warning(
"OpenGLSmallDot has been deprecated and will be removed in a future release."
"Use OpenGLDot instead."
)

super().__init__(radius=radius, **kwargs)


Expand Down
14 changes: 5 additions & 9 deletions manim/mobject/svg/opengl_tex_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,18 @@ def construct(self):
import operator as op
from functools import reduce

from ... import config, logger
from ... import config
from ...constants import *
from ...mobject.opengl_geometry import OpenGLLine
from ...mobject.svg.opengl_svg_mobject import OpenGLSVGMobject
from ...mobject.svg.opengl_svg_path import OpenGLSVGPathMobject
from ...mobject.svg.tex_mobject import MathTex, Tex
from ...mobject.types.opengl_vectorized_mobject import (
OpenGLVectorizedPoint,
OpenGLVGroup,
)
from ...utils.color import BLACK
from ...utils.deprecation import deprecated
from ...utils.strings import split_string_list_to_isolate_substrings
from ...utils.tex_file_writing import tex_to_svg_file
from .style_utils import parse_style
Expand Down Expand Up @@ -597,19 +599,13 @@ def __init__(
self.underline = underline


@deprecated(until="v0.7.0", replacement="MathTex")
class OpenGLTexMobject(OpenGLMathTex):
def __init__(self, *tex_strings, **kwargs):
logger.warning(
"TexMobject has been deprecated (due to its confusing name) "
"in favour of MathTex. Please use MathTex instead!"
)
MathTex.__init__(self, *tex_strings, **kwargs)


@deprecated(until="v0.7.0", replacement="Tex")
class OpenGLTextMobject(OpenGLTex):
def __init__(self, *text_parts, **kwargs):
logger.warning(
"TextMobject has been deprecated (due to its confusing name) "
"in favour of Tex. Please use Tex instead!"
)
Tex.__init__(self, *text_parts, **kwargs)
12 changes: 3 additions & 9 deletions manim/mobject/svg/svg_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

import numpy as np

from manim import logger

from ... import config
from ...constants import *
from ...mobject.types.vectorized_mobject import VMobject
from ...utils.deprecation import deprecated


def correct_out_of_range_radii(rx, ry, x1p, y1p):
Expand Down Expand Up @@ -444,12 +443,7 @@ def start_new_path(self, point):
return self


@deprecated(until="v0.7.0", replacement="SVGPathMobject")
class VMobjectFromSVGPathstring(SVGPathMobject):
"""Pure alias of SVGPathMobject, retained for backwards compatibility"""

def __init__(self, *args, **kwargs):
logger.warning(
"VMobjectFromSVGPathstring has been deprecated in favour "
"of SVGPathMobject. Please use SVGPathMobject instead."
)
SVGPathMobject.__init__(self, *args, **kwargs)
super().__init__(self, *args, **kwargs)
8 changes: 3 additions & 5 deletions manim/utils/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
__all__ = ["print_family", "index_labels", "get_submobject_index_labels"]


import logging
from os import replace

from ..mobject.numbers import Integer
from ..mobject.types.vectorized_mobject import VGroup
from .color import BLACK
from .deprecation import deprecated


def print_family(mobject, n_tabs=0):
Expand All @@ -29,9 +30,6 @@ def index_labels(mobject, label_height=0.15):
return labels


@deprecated(until="v0.6.0", replacement="index_labels")
def get_submobject_index_labels(mobject, label_height=0.15):
logging.getLogger("manim").warning(
"get_submobject_index_labels has been deprecated and has been replaced by index_labels, which does the same thing, and will thus be removed in a future release."
)

return index_labels(mobject, label_height)
Loading