A community-maintained Python framework for creating mathematical animations.
Removed deprecations up to `v0.13.0` (#2390)
Laith Bahodid66d2b646e11
diff --git a/manim/animation/growing.py b/manim/animation/growing.pyindex 35aa51701..f99b72470 100644--- a/manim/animation/growing.py+++ b/manim/animation/growing.py@@ -35,7 +35,6 @@ import numpy as npfrom ..animation.transform import Transformfrom ..constants import PI-from ..utils.deprecation import deprecated_paramsfrom ..utils.paths import spiral_pathif typing.TYPE_CHECKING:@@ -221,10 +220,6 @@ class SpinInFromNothing(GrowFromCenter):"""- @deprecated_params(- params="path_arc",- message="Parameter angle is more robust, supporting angles greater than PI.",- )def __init__(self,mobject: "Mobject",@@ -232,10 +227,7 @@ class SpinInFromNothing(GrowFromCenter):point_color: str = None,**kwargs) -> None:- if "path_arc" in kwargs:- super().__init__(mobject, point_color=point_color, **kwargs)- else:- self.angle = angle- super().__init__(- mobject, path_func=spiral_path(angle), point_color=point_color, **kwargs- )+ self.angle = angle+ super().__init__(+ mobject, path_func=spiral_path(angle), point_color=point_color, **kwargs+ )diff --git a/manim/mobject/coordinate_systems.py b/manim/mobject/coordinate_systems.pyindex 18b4c0995..aafb718fc 100644--- a/manim/mobject/coordinate_systems.py+++ b/manim/mobject/coordinate_systems.py@@ -54,7 +54,6 @@ from ..utils.color import (invert_color,)from ..utils.config_ops import merge_dicts_recursively, update_dict_recursively-from ..utils.deprecation import deprecated, deprecated_paramsfrom ..utils.simple_functions import binary_searchfrom ..utils.space_ops import angle_of_vector@@ -754,19 +753,6 @@ class CoordinateSystem:graph.underlying_function = functionreturn graph- @deprecated(- since="v0.11.0",- until="v0.13.0",- replacement="plot",- )- def get_graph(- self,- function: Callable[[float], float],- x_range: Optional[Sequence[float]] = None,- **kwargs,- ) -> ParametricFunction:- return self.plot(function, x_range, **kwargs)-def plot_implicit_curve(self,func: Callable,@@ -815,20 +801,6 @@ class CoordinateSystem:)return graph- @deprecated(- since="v0.11.0",- until="v0.13.0",- replacement="plot_implicit_curve",- )- def get_implicit_curve(- self,- func: Callable,- min_depth: int = 5,- max_quads: int = 1500,- **kwargs,- ) -> ImplicitFunction:- return self.plot_implicit_curve(func, min_depth, max_quads, **kwargs)-def plot_parametric_curve(self, function, **kwargs):dim = self.dimensiongraph = ParametricFunction(@@ -837,14 +809,6 @@ class CoordinateSystem:graph.underlying_function = functionreturn graph- @deprecated(- since="v0.11.0",- until="v0.13.0",- replacement="plot_parametric_curve",- )- def get_parametric_curve(self, function, **kwargs):- return self.plot_parametric_curve(function, **kwargs)-def plot_polar_graph(self,r_func: Callable[[float], float],@@ -1437,16 +1401,6 @@ class CoordinateSystem:return self.plot(deriv, color=color, **kwargs)- @deprecated(- since="v0.11.0",- until="v0.13.0",- replacement="plot_derivative_graph",- )- def get_derivative_graph(- self, graph: "ParametricFunction", color: Color = GREEN, **kwargs- ) -> ParametricFunction:- return self.plot_derivative_graph(graph, color, **kwargs)-def plot_antiderivative_graph(self,graph: ParametricFunction,@@ -2106,33 +2060,6 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):return line_graph- @deprecated(- since="v0.11.0",- until="v0.13.0",- replacement="plot_line_graph",- )- def get_line_graph(- self,- x_values: Iterable[float],- y_values: Iterable[float],- z_values: Optional[Iterable[float]] = None,- line_color: Color = YELLOW,- add_vertex_dots: bool = True,- vertex_dot_radius: float = DEFAULT_DOT_RADIUS,- vertex_dot_style: Optional[dict] = None,- **kwargs,- ) -> VDict:- return self.plot_line_graph(- x_values,- y_values,- z_values,- line_color,- add_vertex_dots,- vertex_dot_radius,- vertex_dot_style,- **kwargs,- )-@staticmethoddef _origin_shift(axis_range: Sequence[float]) -> float:"""Determines how to shift graph mobjects to compensate when 0 is not on the axis.diff --git a/manim/mobject/frame.py b/manim/mobject/frame.pyindex 1654088e5..bdc794bbe 100644--- a/manim/mobject/frame.py+++ b/manim/mobject/frame.py@@ -3,17 +3,12 @@__all__ = ["ScreenRectangle","FullScreenRectangle",- "FullScreenFadeRectangle",- "PictureInPictureFrame",]-from manim.utils.deprecation import deprecated-from .. import configfrom ..constants import *from ..mobject.geometry import Rectangle-from ..utils.color import BLACKclass ScreenRectangle(Rectangle):@@ -39,43 +34,3 @@ class FullScreenRectangle(ScreenRectangle):def __init__(self, **kwargs):super().__init__(**kwargs)self.height = config["frame_height"]---@deprecated(- since="v0.12.0",- until="v0.13.0",- message="This method is deprecated due to decluttering purpose.",- replacement="FullScreenRectangle(stroke_width=0, fill_color=BLACK, fill_opacity=0.7)",-)-class FullScreenFadeRectangle(FullScreenRectangle):- def __init__(self, stroke_width=0, fill_color=BLACK, fill_opacity=0.7, **kwargs):- super().__init__(- stroke_width=stroke_width,- fill_color=fill_color,- fill_opacity=fill_opacity,- **kwargs- )---@deprecated(- since="v0.12.0",- until="v0.13.0",- message="This method is deprecated due to decluttering purpose.",-)-class PictureInPictureFrame(Rectangle):- def __init__(self, height=3, aspect_ratio=16.0 / 9.0, **kwargs):- super().__init__(width=aspect_ratio * height, height=height, **kwargs)-- @property- def aspect_ratio(self):- """The aspect ratio.-- When set, the width is stretched to accommodate- the new aspect ratio.- """-- return self.width / self.height-- @aspect_ratio.setter- def aspect_ratio(self, value):- self.stretch_to_fit_width(value * self.height)diff --git a/manim/mobject/number_line.py b/manim/mobject/number_line.pyindex 7e144ea1b..17c4dddf9 100644--- a/manim/mobject/number_line.py+++ b/manim/mobject/number_line.py@@ -17,7 +17,6 @@ from ..mobject.numbers import DecimalNumberfrom ..mobject.types.vectorized_mobject import VGroupfrom ..utils.bezier import interpolatefrom ..utils.config_ops import merge_dicts_recursively-from ..utils.deprecation import deprecated_paramsfrom ..utils.simple_functions import fdivfrom ..utils.space_ops import normalizediff --git a/manim/mobject/opengl_mobject.py b/manim/mobject/opengl_mobject.pyindex 175554612..cfc305857 100644--- a/manim/mobject/opengl_mobject.py+++ b/manim/mobject/opengl_mobject.py@@ -16,7 +16,6 @@ from ..utils.bezier import integer_interpolate, interpolatefrom ..utils.color import *from ..utils.color import Colorsfrom ..utils.config_ops import _Data, _Uniforms-from ..utils.deprecation import deprecated# from ..utils.iterables import batch_by_propertyfrom ..utils.iterables import (@@ -822,17 +821,6 @@ class OpenGLMobject:self.assemble_family()return self- @deprecated(- since="v0.12.0",- until="v0.13.0",- replacement="self.submobjects",- message="Switching to using properties for submobjects",- )- def set_submobjects(self, submobject_list):- self.remove(*self.submobjects)- self.add(*submobject_list)- return self-def invert(self, recursive=False):"""Inverts the list of :attr:`submobjects`.diff --git a/manim/mobject/svg/brace.py b/manim/mobject/svg/brace.pyindex e378fc9df..a68dd909a 100644--- a/manim/mobject/svg/brace.py+++ b/manim/mobject/svg/brace.py@@ -18,7 +18,6 @@ from ...mobject.svg.svg_path import SVGPathMobjectfrom ...mobject.svg.tex_mobject import MathTex, Texfrom ...mobject.types.vectorized_mobject import VMobjectfrom ...utils.color import BLACK-from ...utils.deprecation import deprecated_paramsclass Brace(SVGPathMobject):diff --git a/manim/mobject/svg/code_mobject.py b/manim/mobject/svg/code_mobject.pyindex 41d946737..3986c1f7d 100644--- a/manim/mobject/svg/code_mobject.py+++ b/manim/mobject/svg/code_mobject.py@@ -20,7 +20,6 @@ from ...mobject.shape_matchers import SurroundingRectanglefrom ...mobject.svg.text_mobject import Paragraphfrom ...mobject.types.vectorized_mobject import VGroupfrom ...utils.color import WHITE-from ...utils.deprecation import deprecated_paramsclass Code(VGroup):diff --git a/manim/mobject/svg/tex_mobject.py b/manim/mobject/svg/tex_mobject.pyindex acabada05..07017ad1c 100644--- a/manim/mobject/svg/tex_mobject.py+++ b/manim/mobject/svg/tex_mobject.py@@ -35,7 +35,6 @@ from ...mobject.svg.svg_mobject import SVGMobjectfrom ...mobject.svg.svg_path import SVGPathMobjectfrom ...mobject.types.vectorized_mobject import VectorizedPoint, VGroupfrom ...utils.color import BLACK, WHITE-from ...utils.deprecation import deprecated_paramsfrom ...utils.tex_file_writing import tex_to_svg_filefrom .style_utils import parse_stylediff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.pyindex 373cf6451..e8c362d04 100644--- a/manim/mobject/svg/text_mobject.py+++ b/manim/mobject/svg/text_mobject.py@@ -69,7 +69,6 @@ from ...mobject.geometry import Dotfrom ...mobject.svg.svg_mobject import SVGMobjectfrom ...mobject.types.vectorized_mobject import VGroupfrom ...utils.color import WHITE, Colors-from ...utils.deprecation import deprecated_paramsTEXT_MOB_SCALE_FACTOR = 0.05DEFAULT_LINE_SPACING_SCALE = 0.3diff --git a/manim/mobject/three_dimensions.py b/manim/mobject/three_dimensions.pyindex c1f52fd5f..5b2679963 100644--- a/manim/mobject/three_dimensions.py+++ b/manim/mobject/three_dimensions.py@@ -30,7 +30,7 @@ from ..mobject.mobject import *from ..mobject.opengl_mobject import OpenGLMobjectfrom ..mobject.types.vectorized_mobject import VGroup, VMobjectfrom ..utils.color import *-from ..utils.deprecation import deprecated, deprecated_params+from ..utils.deprecation import deprecatedfrom ..utils.iterables import tuplifyfrom ..utils.space_ops import normalize, perpendicular_bisector, z_to_vectordiff --git a/manim/mobject/vector_field.py b/manim/mobject/vector_field.pyindex b92be50c9..f8d511b93 100644--- a/manim/mobject/vector_field.py+++ b/manim/mobject/vector_field.py@@ -26,7 +26,6 @@ from ..mobject.mobject import Mobjectfrom ..mobject.types.vectorized_mobject import VGroup, VMobjectfrom ..utils.bezier import interpolate, inverse_interpolatefrom ..utils.color import BLUE_E, GREEN, RED, YELLOW, color_to_rgb, rgb_to_color-from ..utils.deprecation import deprecated_paramsfrom ..utils.rate_functions import ease_out_sine, linearfrom ..utils.simple_functions import sigmoidfrom .types.opengl_vectorized_mobject import OpenGLVMobject