1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-lazy-object-proxy
7 SDESC[py310]= Fast and thorough lazy object proxy (3.10)
8 SDESC[py39]= Fast and thorough lazy object proxy (3.9)
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.7.1.tar.gz:main
19 OPTIONS_AVAILABLE= PY39 PY310
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY39=OFF PY310=ON
22 VOPTS[py39]= PY39=ON PY310=OFF
24 BUILD_DEPENDS= python-pip:single:python_used
26 DISTNAME= lazy-object-proxy-1.7.1
30 [PY39].BUILDRUN_DEPENDS_ON= python-setuptools-scm:single:py39
31 [PY39].USES_ON= python:py39,sutools
33 [PY310].BUILDRUN_DEPENDS_ON= python-setuptools-scm:single:py310
34 [PY310].USES_ON= python:py310,sutools
36 [FILE:2518: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 * Removed most of the Python 2 support code and fixed python_requires to
108 require at least Python 3.6.
110 Note that 1.7.0 has been yanked because it could not install on Python
112 Installing lazy-object-proxy on Python 2.7 should automatically fall back
113 to the 1.6.0 release now.
118 * Switched CI to GitHub Actions, this has a couple consequences:
120 * Support for Python 2.7 is dropped. You can still install it there but
121 it's not tested anymore and
122 Python 2 specific handling will be removed at some point.
123 * Linux wheels are now provided in `musllinux` and `manylinux2014`
126 * Fixed __index__ to fallback to int if the wrapped object doesn't have an
128 This prevents situations where code using a proxy would otherwise likely
129 just call int had the object
130 not have an __index__ method.
135 * Added support for async special methods (__aiter__, __anext__,
136 __await__, __aenter__, __aexit__).
140 d609c75b986def706743cdebe5e47553f4a5a1da9c5ff66d76013ef396b5a8a4 41995 lazy-object-proxy-1.7.1.tar.gz