File: python3.14-compatibility.patch

package info (click to toggle)
python-pyvista 0.46.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176,968 kB
  • sloc: python: 94,346; sh: 216; makefile: 70
file content (113 lines) | stat: -rw-r--r-- 4,969 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Description: Fix Python 3.14 compatibility by removing __doc__ assignments to type aliases
 Python 3.14 made typing.Union and TypeVar objects' __doc__ attributes read-only,
 preventing assignment of custom documentation strings. This patch removes all
 __doc__ assignments from type aliases to make pyvista importable in Python 3.14.
 .
 This is based on upstream PR #8102:
 https://github.com/pyvista/pyvista/pull/8102
Author: Rene Luria <rene.luria@infomaniak.com>
Bug-Debian: https://bugs.debian.org/1122096
Origin: upstream, https://github.com/pyvista/pyvista/pull/8102
Last-Update: 2025-12-08

Index: python-pyvista/pyvista/core/_typing_core/_aliases.py
===================================================================
--- python-pyvista.orig/pyvista/core/_typing_core/_aliases.py
+++ python-pyvista/pyvista/core/_typing_core/_aliases.py
@@ -37,35 +37,16 @@ else:
 Number = Union[int, float]
 
 VectorLike = _ArrayLike1D[NumberType]
-VectorLike.__doc__ = """One-dimensional array-like object with numerical values.
-
-Includes sequences and numpy arrays.
-"""
 
 MatrixLike = _ArrayLike2D[NumberType]
-MatrixLike.__doc__ = """Two-dimensional array-like object with numerical values.
-
-Includes singly-nested sequences and numpy arrays.
-"""
 
 ArrayLike = _ArrayLike[NumberType]
-ArrayLike.__doc__ = """Any-dimensional array-like object with numerical values.
-
-Includes sequences, nested sequences, and numpy arrays. Scalar values are not included.
-"""
 if Rotation is not None:
     RotationLike = Union[MatrixLike[float], _vtk.vtkMatrix3x3, Rotation]
 else:
     RotationLike = Union[MatrixLike[float], _vtk.vtkMatrix3x3]  # type: ignore[misc]
-RotationLike.__doc__ = """Array or object representing a spatial rotation.
-
-Includes 3x3 arrays and SciPy Rotation objects.
-"""
 
 TransformLike = Union[RotationLike, _vtk.vtkMatrix4x4, _vtk.vtkTransform]
-TransformLike.__doc__ = """Array or object representing a spatial transformation.
-
-Includes 3x3 and 4x4 arrays as well as SciPy Rotation objects."""
 
 
 class BoundsTuple(NamedTuple):
@@ -119,7 +100,3 @@ CellArrayLike = Union[CellsLike, _vtk.vt
 _ArrayLikeOrScalar = Union[NumberType, ArrayLike[NumberType]]
 
 InteractionEventType = Union[Literal['end', 'start', 'always'], _vtk.vtkCommand.EventIds]
-InteractionEventType.__doc__ = """Interaction event mostly used for widgets.
-
-Includes both strings such as `end`, 'start' and `always` and `_vtk.vtkCommand.EventIds`.
-"""
Index: python-pyvista/pyvista/core/_typing_core/_array_like.py
===================================================================
--- python-pyvista.orig/pyvista/core/_typing_core/_array_like.py
+++ python-pyvista/pyvista/core/_typing_core/_array_like.py
@@ -35,7 +35,6 @@ NumberType = TypeVar(
     'NumberType',
     bound=Union[np.floating, np.integer, np.bool_, float, int, bool],
 )
-NumberType.__doc__ = """Type variable for numeric data types."""
 
 # Create a copy of the typevar which can be used for annotating a second variable.
 # Its definition should be identical to `NumberType`
Index: python-pyvista/pyvista/core/_typing_core/_dataset_types.py
===================================================================
--- python-pyvista.orig/pyvista/core/_typing_core/_dataset_types.py
+++ python-pyvista/pyvista/core/_typing_core/_dataset_types.py
@@ -15,24 +15,16 @@ from pyvista.core.pointset import Unstru
 from pyvista.core.pointset import _PointSet
 
 _GridType = TypeVar('_GridType', bound=Grid)
-_GridType.__doc__ = """Type variable for PyVista ``Grid`` classes."""
 
 _PointGridType = TypeVar('_PointGridType', bound=PointGrid)
-_PointGridType.__doc__ = """Type variable for PyVista ``PointGrid`` classes."""
 
 _PointSetType = TypeVar('_PointSetType', bound=_PointSet)
-_PointSetType.__doc__ = """Type variable for PyVista ``PointSet`` classes."""
 
 _DataSetType = TypeVar('_DataSetType', bound=DataSet)
-_DataSetType.__doc__ = """Type variable for :class:`~pyvista.DataSet` classes."""
 
 _DataSetOrMultiBlockType = TypeVar('_DataSetOrMultiBlockType', bound=Union[DataSet, MultiBlock])
-_DataSetOrMultiBlockType.__doc__ = (
-    """Type variable for :class:`~pyvista.DataSet` or :class:`~pyvista.MultiBlock` classes."""
-)
 
 _DataObjectType = TypeVar('_DataObjectType', bound=DataObject)
-_DataObjectType.__doc__ = """Type variable for :class:`~pyvista.DataObject` classes."""
 
 
 # Undocumented
Index: python-pyvista/pyvista/plotting/_typing.py
===================================================================
--- python-pyvista.orig/pyvista/plotting/_typing.py
+++ python-pyvista/pyvista/plotting/_typing.py
@@ -56,7 +56,6 @@ ColorLike = Union[
 ]
 # Overwrite default docstring, as sphinx is not able to capture the docstring
 # when it is put beneath the definition somehow?
-ColorLike.__doc__ = 'Any object convertible to a :class:`Color`.'
 Chart = Union['Chart2D', 'ChartBox', 'ChartPie', 'ChartMPL']
 FontFamilyOptions = Literal['courier', 'times', 'arial']
 OpacityOptions = Literal[