File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 22Options to change pillow_heif's runtime behaviour.
33"""
44from typing import Union
5+ from warnings import warn
56
67
78class 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
You can’t perform that action at this time.
0 commit comments