Skip to content

Commit 409162a

Browse files
committed
mark ctx_in_memory options as deprecated
1 parent b274110 commit 409162a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pillow_heif/_options.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Options to change pillow_heif's runtime behaviour.
33
"""
44
from typing import Union
5+
from warnings import warn
56

67

78
class PyLibHeifOptions:
@@ -61,14 +62,19 @@ def ctx_in_memory(self) -> bool:
6162
6263
As Python is much slower than ``C++``, we read a file to memory and let ``libheif`` manage reads.
6364
You can look at source of class ``LibHeifCtx`` in ``_libheif_ctx.py`` file.
64-
This will be the default behaviour, until maybe someday written on ``C`` reader module will appear.
65+
Deprecated, will be removed in ``0.8.0`` version.
6566
6667
Default = ``True``"""
6768

6869
return self._cfg["ctx_in_memory"]
6970

7071
@ctx_in_memory.setter
7172
def ctx_in_memory(self, value):
73+
warn(
74+
"`ctx_in_memory` is marked as deprecated and will be removed in a future."
75+
" There is no particular reason to read the file partially, as tests show",
76+
DeprecationWarning,
77+
)
7278
self._cfg["ctx_in_memory"] = value
7379

7480
@property

0 commit comments

Comments
 (0)