python-lazy-object-proxy
Port variant py39
Summary Fast and thorough lazy object proxy (3.9)
Package version 1.8.0
Homepage https://github.com/ionelmc/python-lazy-object-proxy
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py310
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 27 OCT 2022, 03:24:26 UTC
Port created 29 NOV 2020, 06:56:42 UTC
Subpackage Descriptions
single ======== Overview ======== A fast and thorough lazy object proxy. * Free software: BSD 2-Clause License Note that this is based on `wrapt`_'s ObjectProxy with one big change: it calls a function the first time the proxy object is used, while `wrapt.ObjectProxy` just forwards the method calls to the target object. In other words, you use `lazy-object-proxy` when you only have the object way later and you use `wrapt.ObjectProxy` when you want to override few methods (by subclassing) and forward everything else to the target object. Example:: import lazy_object_proxy def expensive_func(): from time import sleep print('starting calculation') # just as example for a very slow computation sleep(2) print('finished calculation') # return the result of the calculation return 10 obj = lazy_object_proxy.Proxy(expensive_func) # function is called only when object is actually used print(obj) # now expensive_func is called print(obj) # the result without calling the expensive_func Installation ============ :: pip install lazy-object-proxy Documentation ============= https://python-lazy-object-proxy.readthedocs.io/ Development =========== To run all the tests run:: tox Acknowledgements ================ This project is based on some code from `wrapt`_ as you can see in the git history. .. _wrapt: https://github.com/GrahamDumpleton/wrapt Changelog ========= 1.8.0 (2022-10-26) ------------------ * Cleaned up use of cPickle. Contributed by Sandro Tosi in `#62 `_. * Cleaned up more dead Python 2 code. * Added Python 3.11 wheels. * Dropped support for Python 3.6. 1.7.1 (2021-12-15) ------------------ * Removed most of the Python 2 support code and fixed python_requires to require at least Python 3.6. Note that 1.7.0 has been yanked because it could not install on Python 2.7. Installing lazy-object-proxy on Python 2.7 should automatically fall back to the 1.6.0 release now. 1.7.0 (2021-12-15) ------------------ * Switched CI to GitHub Actions, this has a couple consequences: * Support for Python 2.7 is dropped. You can still install it there but it's not tested anymore and Python 2 specific handling will be removed at some point. * Linux wheels are now provided in `musllinux` and `manylinux2014` variants. * Fixed __index__ to fallback to int if the wrapped object doesn't have an __index__ method.
Configuration Switches (platform-specific settings discarded)
PY310 OFF Build using Python 3.10 PY39 ON Build using Python 3.9
Package Dependencies by Type
Build (only) python-pip:single:py39
python-setuptools:single:py39
autoselect-python:single:standard
Build and Runtime python-setuptools-scm:single:py39
python39:single:standard
Download groups
main mirror://PYPI/l/lazy-object-proxy
Distribution File Information
c219a00245af0f6fa4e95901ed28044544f50152840c5b6a3e7b2568db34d156 41884 lazy-object-proxy-1.8.0.tar.gz
Ports that require python-lazy-object-proxy:py39
python-astroid:py39 Abstract syntax tree with inference support (3.9)