Skip to content

Commit f6596d5

Browse files
radarherehugovk
authored andcommitted
Added release notes and document deprecation
1 parent f932cb8 commit f6596d5

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

docs/deprecations.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ Deprecated Use instead
9292
:py:data:`sys.version_info`, and ``PIL.__version__``
9393
============================================ ====================================================
9494

95+
ImageMath eval()
96+
^^^^^^^^^^^^^^^^
97+
98+
.. deprecated:: 10.3.0
99+
100+
``ImageMath.eval()`` has been deprecated. Use :py:meth:`~PIL.ImageMath.lambda_eval` or
101+
:py:meth:`~PIL.ImageMath.unsafe_eval` instead.
102+
95103
Removed features
96104
----------------
97105

docs/releasenotes/10.3.0.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
Security
55
========
66

7-
TODO
8-
^^^^
7+
ImageMath eval()
8+
^^^^^^^^^^^^^^^^
99

10-
TODO
10+
.. danger::
11+
``ImageMath.eval()`` uses Python's ``eval()`` function to process the expression
12+
string, and carries the security risks of doing so. A direct replacement for this is
13+
the new :py:meth:`~PIL.ImageMath.unsafe_eval`, but that carries the same risks. It is
14+
not recommended to process expressions without considering this.
15+
:py:meth:`~PIL.ImageMath.lambda_eval` is a more secure alternative.
1116

1217
:cve:`YYYY-XXXXX`: TODO
1318
^^^^^^^^^^^^^^^^^^^^^^^
@@ -58,6 +63,13 @@ Deprecated Use instead
5863
:py:data:`sys.version_info`, and ``PIL.__version__``
5964
============================================ ====================================================
6065

66+
ImageMath.eval()
67+
^^^^^^^^^^^^^^^^
68+
69+
``ImageMath.eval()`` has been deprecated. Use :py:meth:`~PIL.ImageMath.lambda_eval` or
70+
:py:meth:`~PIL.ImageMath.unsafe_eval` instead. See earlier security notes for more
71+
information.
72+
6173
API Changes
6274
===========
6375

0 commit comments

Comments
 (0)