{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Assorted debugging facilities.\n\n* Lock, RLock, Thread: wrappers for threading facilties; simply import from here instead of there\n\n* thread_dump, stack_dump: dump thread and stack state\n\n* @DEBUG: decorator to wrap functions in timing and value debuggers\n\n* @trace: decorator to report call and return from functions\n\n* @trace_caller: decorator to report caller of function\n\n* TracingObject: subclass of cs.obj.Proxy that reports attribute use\n\n## Function `DEBUG(f, force=False)`\n\nDecorator to wrap functions in timing and value debuggers.\n\n## Function `debug_object_shell(o, prompt=None)`\n\nInteractive prompt for inspecting variables.\n\n## Class `DebuggingLock`\n\nMRO: `DebugWrapper`, `cs.obj.O` \nWrapper class for threading.Lock to trace creation and use.\ncs.threads.Lock() returns on of these in debug mode or a raw\nthreading.Lock otherwise.\n\n## Class `DebuggingRLock`\n\nMRO: `DebugWrapper`, `cs.obj.O` \nWrapper class for threading.RLock to trace creation and use.\ncs.threads.RLock() returns on of these in debug mode or a raw\nthreading.RLock otherwise.\n\n## Class `DebugShell`\n\nMRO: `cmd.Cmd` \nAn interactive prompt for python statements, attached to /dev/tty by default.\n\n## Class `DebugWrapper`\n\nMRO: `cs.obj.O` \nBase class for classes presenting debugging wrappers.\n\n## Function `DF(func, *a, **kw)`\n\nWrapper for a function call to debug its use.\nRequires rewriting the call from f(*a, *kw) to DF(f, *a, **kw).\nAlternatively one could rewrite as DEBUG(f)(*a, **kw).\n\n## Function `Lock()`\n\nFactory function: if cs.logutils.logging_level <= logging.DEBUG\nthen return a DebuggingLock, otherwise a threading.Lock.\n\n## Function `openfiles(substr=None, pid=None)`\n\nRun lsof(8) against process `pid` returning paths of open files whose paths contain `substr`.\n`substr`: default substring to select by; default returns all paths.\n`pid`: process to examine; default from os.getpid().\n\n## Function `RLock()`\n\nFactory function: if cs.logutils.logging_level <= logging.DEBUG\nthen return a DebuggingRLock, otherwise a threading.RLock.\n\n## Function `selftest(module_name, defaultTest=None, argv=None)`\n\nCalled by my unit tests.\n\n## Function `stack_dump(stack=None, limit=None, logger=None, log_level=None)`\n\nDump a stack trace to a logger.\n`stack`: a stack list as returned by traceback.extract_stack.\n If missing or None, use the result of traceback.extract_stack().\n`limit`: a limit to the number of stack entries to dump.\n If missing or None, dump all entries.\n`logger`: a logger.Logger ducktype or the name of a logger.\n If missing or None, obtain a logger from logging.getLogger().\n`log_level`: the logging level for the dump.\n If missing or None, use cs.logutils.logging_level.\n\n## Function `thread_dump(Ts=None, fp=None)`\n\nWrite thread identifiers and stack traces to the file `fp`.\n`Ts`: the Threads to dump; if unspecified use threading.enumerate().\n`fp`: the file to which to write; if unspecified use sys.stderr.\n\n## Class `TimingOutLock`\n\nA Lock replacement which times out, used for locating deadlock points.\n\n## Function `trace(func)`\n\nDecorator to report the call and return of a function.\n\n## Function `trace_caller(func)`\n\nDecorator to report the caller of a function when called.\n\n## Class `TraceSuite`\n\nContext manager to trace start and end of a code suite.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python2,python3", "license": "", "maintainer": "", "maintainer_email": "", "name": "cs.debug", "package_url": "https://pypi.org/project/cs.debug/", "platform": "", "project_url": "https://pypi.org/project/cs.debug/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.debug/20181231/", "requires_dist": null, "requires_python": "", "summary": "Assorted debugging facilities.", "version": "20181231" }, "last_serial": 4647906, "releases": { "20150116": [ { "comment_text": "", "digests": { "md5": "1ac8c4d2385c25c83b94e7622cde8156", "sha256": "ee593c108e73d2a4b7726f64b082141493e0fa65a2cc3ec370865f7cbb0b29a2" }, "downloads": -1, "filename": "cs.debug-20150116.tar.gz", "has_sig": false, "md5_digest": "1ac8c4d2385c25c83b94e7622cde8156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4672, "upload_time": "2015-01-18T06:09:36", "url": "https://files.pythonhosted.org/packages/9f/58/cb5fd66d3cb33cb8d7a193368623c9a8811e98004c5adca6d30259691857/cs.debug-20150116.tar.gz" } ], "20160827": [ { "comment_text": "", "digests": { "md5": "cd053e4a6a8721e463fd6b5fc4d39292", "sha256": "6e62d982bcfad595bf1235c286024f51f06a05e10c41ec8046ec58c1a10f751d" }, "downloads": -1, "filename": "cs.debug-20160827.tar.gz", "has_sig": false, "md5_digest": "cd053e4a6a8721e463fd6b5fc4d39292", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5212, "upload_time": "2016-08-27T03:34:31", "url": "https://files.pythonhosted.org/packages/4e/c8/29db77b63d881babe18d5571cd241ed5259289a4c63097ef13443f878b30/cs.debug-20160827.tar.gz" } ], "20160828": [ { "comment_text": "", "digests": { "md5": "ea8fc7a546a0fa89dd911f1aa60fcb79", "sha256": "76b4cb9a9ca493e7396d1fc94bc06230bdd3179f3661b3b0e271f62769ab7824" }, "downloads": -1, "filename": "cs.debug-20160828.tar.gz", "has_sig": false, "md5_digest": "ea8fc7a546a0fa89dd911f1aa60fcb79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5564, "upload_time": "2016-08-28T06:04:27", "url": "https://files.pythonhosted.org/packages/c6/c0/aba5ebaecfec1b763d8be4e698dd60fbd37cd7119d9af00bc70caaeaf13f/cs.debug-20160828.tar.gz" } ], "20160918": [ { "comment_text": "", "digests": { "md5": "ae47c6dfbaa1c8a2afd99b5568717f77", "sha256": "b6f034165b05c41a13b115b79bce8ae31c998f927a142eff753ee943a1504d0c" }, "downloads": -1, "filename": "cs.debug-20160918.tar.gz", "has_sig": false, "md5_digest": "ae47c6dfbaa1c8a2afd99b5568717f77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5555, "upload_time": "2016-09-18T05:03:10", "url": "https://files.pythonhosted.org/packages/36/0d/07b8ff6847e07ec5a8e2dd9e5bd5178f19f499034b61950a29ada60fd40d/cs.debug-20160918.tar.gz" } ], "20171231": [ { "comment_text": "", "digests": { "md5": "fa2d85f6a66bef464ef25cb9ed05528f", "sha256": "7c048c849a8137c004beb7229ab94f0733564388ba7ee66d4e5a26274da2d863" }, "downloads": -1, "filename": "cs.debug-20171231.tar.gz", "has_sig": false, "md5_digest": "fa2d85f6a66bef464ef25cb9ed05528f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5809, "upload_time": "2017-12-31T02:21:11", "url": "https://files.pythonhosted.org/packages/3c/04/0d961eef200cb9e4c41a352c87683b66708c947cc009deb320b52ce0eb8a/cs.debug-20171231.tar.gz" } ], "20181231": [ { "comment_text": "", "digests": { "md5": "46f419ddc0977d5280dd6b33730b759e", "sha256": "c537c9755d51263c6b1d081a0ef23ccc11b9c3c6ec3d412a062fe09bd88dd031" }, "downloads": -1, "filename": "cs.debug-20181231.tar.gz", "has_sig": false, "md5_digest": "46f419ddc0977d5280dd6b33730b759e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7024, "upload_time": "2018-12-31T10:21:25", "url": "https://files.pythonhosted.org/packages/8a/4c/3657078cb8ace139896e6e48accbc71c49c85bb08311d234ad69990b56a6/cs.debug-20181231.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46f419ddc0977d5280dd6b33730b759e", "sha256": "c537c9755d51263c6b1d081a0ef23ccc11b9c3c6ec3d412a062fe09bd88dd031" }, "downloads": -1, "filename": "cs.debug-20181231.tar.gz", "has_sig": false, "md5_digest": "46f419ddc0977d5280dd6b33730b759e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7024, "upload_time": "2018-12-31T10:21:25", "url": "https://files.pythonhosted.org/packages/8a/4c/3657078cb8ace139896e6e48accbc71c49c85bb08311d234ad69990b56a6/cs.debug-20181231.tar.gz" } ] }