{ "info": { "author": "Mikko Ohtamaa", "author_email": "mikko.ohtamaa@twinapex.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Zope2", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Automatically reload changed Python files - putting agility back to Plone development.\n\ncollective.autorestart monitors Python .py files for changes and triggers a reload when you edit the files. \nThis way you don't need to restart Plone server between your code edit runs.\ncollective.autorestart uses `plone.reload `_ package to perform the actual code replacement.\n\nFile system is monitored using inotify interface which is only available for Linux. \nThe future versions will support other operating systems as long as somebody contributes the file system monitoring \ncode or gives the author a new computer running operating system X.\n\nFeatures\n--------\n\n* Recursively detect changes in ZCML and Python files which are known to Zope\n\n* Automatically trigger reload when files are changed (saved)\n\n* Audio playback depending on whether the restart succeed or failed - you can go back to your files and you don't need to watch the terminal\n\nDependencies\n------------\n\n* plone.reload\n\n* pyinotify for monitoring files (tested with version 0.8.6)\n\n* pygame for audio playback (optional)\n\n* `threadframe `_ (optional)\n\npyinotify relies on Linux kernel feature called inotify and thus\nthis application only works on Linux currently. However, it should be\ntrivial to port it for other platforms. \n\n\nInstallation \n-------------\n\npyinotify depends on ctypes package and currently (04/2009) ctypes package is broken in PyPi. Manual installation needed::\n\n\twget http://kent.dl.sourceforge.net/sourceforge/ctypes/ctypes-1.0.2.tar.gz\n\ttar -xzf ctypes-1.0.2.tar.gz \n\tcd ctypes-1.0.2/\n\tpython2.4 setup.py build\n\tsudo python2.4 setup.py install\n\t\n\t\nBuildout setup\n==============\n\nAdd the following egg to your buildout.cfg. \n\n\teggs =\n\t\tcollective.autorestart\n\t\t\n\t...\n\t\n\tzcml = \n\t\tcollective.autorstart\n\t\t\nRerun buildout. \n\nAdding sound effect support\n===========================\n\nOptionally `pygame `_ egg is needed for sound support. Pygame depends on SDL development library::\n\n\tsudo apt-get install libsdl1.2-dev libsdl-mixer1.2-dev \n\t\nAdd the following egg to your buildout.cfg::\n\n\teggs =\n\t\tpygame\n\t\t\nRerun buildout. Answer yes when pygame barks about missing libraries.\n\nUsage\n-----\n\nStart Plone normally in the foreground using command::\n\n\tbin/instance fg \n\t\nZope must be in debug mode to collective.autorestart to function. collective.autorestart is not \nloaded for production mode or unit testing.\n\t\t\ncollective.autorestart might not be effective immediately, since its sets the monitor on files on background.\nWhen it starts, you'll see a message in your terminal::\n\n\tcollective.autorestart Monitoring 3477 paths 12591 files for changes\n\nEdit any Python files. When you press save you should output in your terminal::\n\n\t2009-04-15 04:11:37 INFO collective.autorestart Detected file system change:/home/moo/workspace/y-trunk/x/browser/views.py/\n\t2009-04-15 04:11:37 INFO collective.autorestart Reloading Plone\n\t2009-04-15 04:12:06 INFO collective.autorestart Reloaded done, report:Code reloaded:\n\n\t\t...x/browser/views.py\t\n\t\t\t\t\nIf you have pygame installed you will also hear a sound effect depending on whether code reload succeeded or failed.\n\nLogging\n=======\n\nIf you are experiencing problems with collective.autorestart you can adjust log levels in logger.py.\n\nSet level to logging.DEBUG to get verbose output from the product to see whether your Python modules are correctly marked as reloadable.\n\nIDE compatiblity\n----------------\n\nAt least Eclispe/PyDev does not like the idea of signal handlers and pyinotify running in the same application, causing deadlocks on SIGTERM. I have\nupdated `idelauncher.py `_\nto reflect this changes. This forces to Zope shutdown hard when stopped from IDE - Data.fs is not flushed.\n\n\nThread debugger\n---------------\n\nStarting collective.autorestart 0.2 there is an internal thread dead lock debugger. Deadlock debugger is enabled\nalways (even if the file change monitor is not running). You need to install threadframe egg::\n\n\teggs =\n\t\tthreadframe\n\t\t\n\t\t\nThread debugger is mostly useful when Zope refuses to shutdown when collective.autorestart is running (see known issues).\nYou might find it also handy to debug other Zope deadlock problems.\nIn this case you can take a thread dump to your working folder *zope-threaddump.txt* file using the command::\n\n\tkillall -SIGUSR1 python2.4\n\t\nIf the application does not respond to SIGUSR1 it is totally foobared and killing Python interpreter with SIGKILL is \nthe only way to handle the situation.\n\n \nKnown issues\n-------------\n\n- Sometimes Zope process seem to fall into Zombie state (kind of dead, but blocks the HTTP port or Data.fs access). In this case, manually\n kill Zope::\n \n \tkillall -SIGKILL python2.4\n \t\n It appears to stuck in atexit.py / Py_Finalize() / Thread.join() - possible pyinotify bug. It happens both with Notifier and ThreadedNotifier::\n \n\t\t#0 0xb7f10430 in __kernel_vsyscall ()\n\t\t#1 0xb7ecf405 in sem_wait@@GLIBC_2.1 () from /lib/tls/i686/cmov/libpthread.so.0\n\t\t#2 0x080eadc0 in PyThread_acquire_lock (lock=0x95f5070, waitflag=1) at ../Python/thread_pthread.h:313\n\t\t#3 0x080eee7c in lock_PyThread_acquire_lock (self=0xb7d31f20, args=0xb7cf502c) at ../Modules/threadmodule.c:63\n\t\t#4 0x080c01d2 in PyEval_EvalFrame (f=0xfcf23f4) at ../Python/ceval.c:3568\n\t\t#5 0x080c0d1e in PyEval_EvalCodeEx (co=0xb79f16a0, globals=0xb79d468c, locals=0x0, args=0xfbe0050, argcount=1, kws=0xfbe0054, kwcount=0, defs=0xb79f9258, \n\t\t defcount=1, closure=0x0) at ../Python/ceval.c:2741\n\t\t#6 0x080bffae in PyEval_EvalFrame (f=0xfbdfef4) at ../Python/ceval.c:3661\n\t\t#7 0x080c0d1e in PyEval_EvalCodeEx (co=0xb79f6220, globals=0xb79d468c, locals=0x0, args=0xfb5dc30, argcount=1, kws=0xfb5dc34, kwcount=0, defs=0xb79f93b8, \n\t\t defcount=1, closure=0x0) at ../Python/ceval.c:2741\n\t\t#8 0x080bffae in PyEval_EvalFrame (f=0xfb5dadc) at ../Python/ceval.c:3661\n\t\t#9 0x080c0d1e in PyEval_EvalCodeEx (co=0xb79f6720, globals=0xb79d468c, locals=0x0, args=0xb79d71f8, argcount=1, kws=0xe433218, kwcount=0, defs=0x0, defcount=0, \n\t\t closure=0x0) at ../Python/ceval.c:2741\n\t\t#10 0x0810c00e in function_call (func=0xb79faa74, arg=0xb79d71ec, kw=0xb7bc2bdc) at ../Objects/funcobject.c:548\n\t\t#11 0x0805b417 in PyObject_Call (func=0x80, arg=0xb79d71ec, kw=0xb7bc2bdc) at ../Objects/abstract.c:1795\n\t\t#12 0x080bd8b6 in PyEval_EvalFrame (f=0xfbd092c) at ../Python/ceval.c:3845\n\t\t#13 0x080c0d1e in PyEval_EvalCodeEx (co=0xb79f6d60, globals=0xb79d40b4, locals=0x0, args=0xb7cf5038, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, \n\t\t closure=0x0) at ../Python/ceval.c:2741\n\t\t#14 0x0810bf21 in function_call (func=0xb79fad84, arg=0xb7cf502c, kw=0x0) at ../Objects/funcobject.c:548\n\t\t#15 0x0805b417 in PyObject_Call (func=0x80, arg=0xb7cf502c, kw=0x0) at ../Objects/abstract.c:1795\n\t\t#16 0x080b941c in PyEval_CallObjectWithKeywords (func=0xb79fad84, arg=0xb7cf502c, kw=0x0) at ../Python/ceval.c:3435\n\t\t#17 0x080e5cd9 in Py_Finalize () at ../Python/pythonrun.c:1568\n\t\t#18 0x08057569 in Py_Main (argc=1, argv=0xbfc11ae4) at ../Modules/main.c:513\n\t\t#19 0x08056d62 in main (argc=Cannot access memory at address 0x80\n\t\t) at ../Modules/python.c:23\n\t\t\n `Debugging help `_ \n \n \n- Newly created files are not automatically picked up\n\n- If you quickly edit and save several files some changes might go unnoticed\n\n- ZCML reload seems to invalidate some zope.component utility classes (vocabularies) - do hard restart if you get ComponentErrors after reload\n\n\nAuthor\n------\n\nMikko Ohtamaa \n\n`Twinapex Research, Oulu, Finland `_ - High quality Python hackers for hire\n\n\n\nChangelog\n=========\n\n0.1.1 - 0.2\n-----------\n\n* Fixed deadlock problems (I think). pyinotify 0.8.x was using timeoutless blocking calls by default and they prevented\n singnals propagade properly. Wrapped Zope signal handlers so that they close pyinotify before trying exit the system.\n \n* Added deadlock debugger to address the issue above\n\n* Thread/reload logic should be smarted and the reload is always in the background thread \n\n* Use __init__.py file to detect Python modules instead of scanning all folders\n\n* Added signal handler and threaddump support\n\n* Detech whether to reload just Python modules or all ZCML code\n\n* Disable collective.autorestart for production mode and unit testing\n\n* Smarter logger\n\n* Clarified that we are developing against pyinotify 0.8.6\n\n0.1 - 0.1.1\n------------\n\n* plone.org release\n\n* README graemmar\n\n0.1\n----------------\n\n* Revamped old plonemon codebase", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/collective.autorestart", "keywords": "plone reload development server hotstart", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.autorestart", "package_url": "https://pypi.org/project/collective.autorestart/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.autorestart/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/collective.autorestart" }, "release_url": "https://pypi.org/project/collective.autorestart/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Automatically reloads changed code into Plone when you edit Python files", "version": "0.2.0" }, "last_serial": 787649, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5f90951449bb9084824279d63526e805", "sha256": "be74cf7106f78a578bfeebd99d051250bb198c659ae32fb6200772eb0e775890" }, "downloads": -1, "filename": "collective.autorestart-0.1.tar.gz", "has_sig": false, "md5_digest": "5f90951449bb9084824279d63526e805", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133123, "upload_time": "2009-04-15T03:25:17", "url": "https://files.pythonhosted.org/packages/72/7b/101b73c2a5c137177ccc5929839d303517afca7b1b6aa217d37709b73b28/collective.autorestart-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "16f22b7ca09656d27060631ad36772d0", "sha256": "07ba304524a0ef23df043ebb1d50edba9c97e786d38084994714a7754d988deb" }, "downloads": -1, "filename": "collective.autorestart-0.1.1.tar.gz", "has_sig": false, "md5_digest": "16f22b7ca09656d27060631ad36772d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133287, "upload_time": "2009-04-15T03:37:25", "url": "https://files.pythonhosted.org/packages/e6/a6/9087a2587dc5cf730eeeb70b1b99219520412d78116670fde56c7329eb2d/collective.autorestart-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "940a9100b04d852c45be038d63a06634", "sha256": "d030faea6da8b213aa8fb67ad1e92360fdd38f2f36bbe9e200cefe9c3dfa3487" }, "downloads": -1, "filename": "collective.autorestart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "940a9100b04d852c45be038d63a06634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137614, "upload_time": "2009-04-28T01:51:22", "url": "https://files.pythonhosted.org/packages/84/8a/69e056c41a3203077ab669f228cacabb6f0af36dee60fff8a02940cc0c29/collective.autorestart-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "940a9100b04d852c45be038d63a06634", "sha256": "d030faea6da8b213aa8fb67ad1e92360fdd38f2f36bbe9e200cefe9c3dfa3487" }, "downloads": -1, "filename": "collective.autorestart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "940a9100b04d852c45be038d63a06634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137614, "upload_time": "2009-04-28T01:51:22", "url": "https://files.pythonhosted.org/packages/84/8a/69e056c41a3203077ab669f228cacabb6f0af36dee60fff8a02940cc0c29/collective.autorestart-0.2.0.tar.gz" } ] }