1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-lazy-object-proxy
7 SDESC[py38]= Fast and thorough lazy object proxy (PY38)
8 SDESC[py39]= Fast and thorough lazy object proxy (PY39)
9 HOMEPAGE= https://github.com/ionelmc/python-lazy-object-proxy
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPI/l/lazy-object-proxy
14 DISTFILE[1]= lazy-object-proxy-1.6.0.tar.gz:main
19 OPTIONS_AVAILABLE= PY38 PY39
20 OPTIONS_STANDARD= none
21 VOPTS[py38]= PY38=ON PY39=OFF
22 VOPTS[py39]= PY38=OFF PY39=ON
24 BUILD_DEPENDS= python-pip:single:python_used
26 DISTNAME= lazy-object-proxy-1.6.0
30 [PY38].BUILDRUN_DEPENDS_ON= python-setuptools-scm:single:py38
31 [PY38].USES_ON= python:py38,sutools
33 [PY39].BUILDRUN_DEPENDS_ON= python-setuptools-scm:single:py39
34 [PY39].USES_ON= python:py39,sutools
36 [FILE:2294:descriptions/desc.single]
41 A fast and thorough lazy object proxy.
43 * Free software: BSD 2-Clause License
45 Note that this is based on `wrapt`_'s ObjectProxy with one big change: it
46 calls a function the first time the proxy object is
47 used, while `wrapt.ObjectProxy` just forwards the method calls to the
50 In other words, you use `lazy-object-proxy` when you only have the object
51 way later and you use `wrapt.ObjectProxy` when you
52 want to override few methods (by subclassing) and forward everything else
57 import lazy_object_proxy
60 from time import sleep
61 print('starting calculation')
62 # just as example for a very slow computation
64 print('finished calculation')
65 # return the result of the calculation
68 obj = lazy_object_proxy.Proxy(expensive_func)
69 # function is called only when object is actually used
70 print(obj) # now expensive_func is called
72 print(obj) # the result without calling the expensive_func
79 pip install lazy-object-proxy
84 https://python-lazy-object-proxy.readthedocs.io/
89 To run all the tests run::
96 This project is based on some code from `wrapt`_ as you can see in the git
99 .. _wrapt: https://github.com/GrahamDumpleton/wrapt
107 * Added support for async special methods (__aiter__, __anext__,
108 __await__, __aenter__, __aexit__).
109 These are used in the async for, ``await` and async with statements.
111 Note that __await__ returns a wrapper that tries to emulate the crazy
112 stuff going on in the ceval loop, so there will be a small performance
114 * Added the __resolved__ property. You can use it to check if the factory
121 * Added Python 3.9 wheels.
122 * Removed Python 2.7 Windows wheels
123 (not supported on newest image with Python 3.9).
128 * Added ARM64 wheels (manylinux2014).
133 * Added support for __fspath__.
134 * Dropped support for Python 3.4.
140 489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726 44494 lazy-object-proxy-1.6.0.tar.gz