{ "info": { "author": "Karellen, Inc.", "author_email": "supervisor@karellen.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==================================================\n Multiprocessing extension for Gevent_ (geventmp_)\n==================================================\n\n.. warning::\n HIC SUNT DRACONES!!!\n\n This code is extremely experimental (pre-pre-alpha). There is very little testing, lots of things are in flux,\n some platforms don't work at all.\n\n DO NOT use in production. This code may crash your server, bankrupt your company, burn your house down and be mean\n to your puppy. You've been warned.\n\nProblem\n=======\n\nDue to internal implementation, `multiprocessing` (`MP`) is unsafe to use with Gevent_ even when `monkey-patched`__.\nNamely, the use of OS semaphore primitives and inter-process IO in `MP` will cause the main\nloop to stall/deadlock/block (specific issue depends on the version of CPython).\n\n__ monkey_\n\nSolution\n========\nGeventmp_ (`Gee-vent Em-Pee`, not `Gee-ven Tee-Em-Pee`) is an extension plugin for `monkey patch`__ subsystem\nof Gevent_. As with the rest of the monkey patch subsystem the process is fairly clear:\n\n__ monkey_\n\n1. Identify all places where blocking occurs and where it may stall the loop.\n2. If blocking occurs on a file descriptor (`FD`), try to convert the file descriptor from blocking to non-blocking\n (sockets/pipes/fifos, sometimes even files where, rarely, appropriate) and replace blocking IO functions with their\n gevent_ non-blocking equivalents.\n3. If blocking occurs in a Python/OS primitive that does not support non-blocking access and thus cannot be geventized,\n wrap all blocking access to that primitive with native thread-pool-based wrappers and call it a day (while fully\n understanding that primitive access latency will increase and raw performance may suffer as a result).\n4. If you are really brave and have lots of free time on your hands, completely replace a standard blocking Python\n non-`FD`-based primitive with implementation based on an `FD`-based OS primitive (e.g. POSIX semaphore =>\n Linux `eventfd-based semaphore for kernels > 2.6.30`__).\n5. Due to launching of separate processes in `MP`, figure out how, when, and whether to `monkey patch`__ spawned/forked\n children and grandchildren.\n\n__ eventfd_\n\n__ monkey_\n\nInstallation\n============\nThe package is hosted on PyPi_.\n\nFor stable version:\n\n.. code-block:: bash\n\n pip install geventmp\n\nFor unstable version:\n\n.. code-block:: bash\n\n pip install --pre geventmp\n\n\nOnce installed, `geventmp`_ will activate by default in the below stanza.\n\n.. code-block:: python\n\n from gevent.monkey import patch_all\n patch_all()\n\nIf you would like `geventmp`_ to not activate by default, either do not install it or explicitly disable it:\n\n.. code-block:: python\n\n from gevent.monkey import patch_all\n patch_all(geventmp=False)\n\nThat's it - there are no other flags, settings, properties or config values so far.\n\nSupported Platforms\n===================\n\n.. note::\n All claims of support may not be real at all. You're welcome to experiment. See warnings on top.\n\n* Linux, possibly Darwin.\n* CPython 2.7, 3.5, 3.6, 3.7... maybe.\n\nTODO\n====\n1. Implement CI/CD once we figure out how `Gevent Issue #1448 `_ is going\n to go.\n2. Test on CPython 2.7, 3.5, 3.6, 3.7, 3.8, PyPys etc.\n3. Monkey patch Windows to the extent possible.\n4. Test and fix Darwin if required.\n5. Lots of applications use `Billiard `_ for multiprocessing instead of stock Python\n package. Consider monkey patching Billiard if detected.\n\nContact Us\n==========\n\nPost feedback and issues on the `Bug Tracker`_, `Gitter`_,\nand `Twitter (@karelleninc)`_.\n\n.. _Gevent: https://github.com/gevent/gevent/\n.. _geventmp: https://github.com/karellen/geventmp\n.. _bug tracker: https://github.com/karellen/geventmp/issues\n.. _gitter: https://gitter.im/karellen/Lobby\n.. _twitter (@karelleninc): https://twitter.com/karelleninc\n.. _monkey: https://en.wikipedia.org/wiki/Monkey_patch\n.. _eventfd: https://linux.die.net/man/2/eventfd\n.. _pypi: https://pypi.org/project/geventmp/\n\n\n", "description_content_type": "text/x-rst; charset=UTF-8", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/karellen/geventmp", "keywords": "gevent multiprocessing mp monkey", "license": "Apache License, Version 2.0", "maintainer": "Arcadiy Ivanov", "maintainer_email": "arcadiy@ivanov.biz", "name": "geventmp", "package_url": "https://pypi.org/project/geventmp/", "platform": "", "project_url": "https://pypi.org/project/geventmp/", "project_urls": { "Bug Tracker": "https://github.com/karellen/geventmp/issues", "Documentation": "https://github.com/karellen/geventmp/", "Homepage": "https://github.com/karellen/geventmp", "Source Code": "https://github.com/karellen/geventmp/" }, "release_url": "https://pypi.org/project/geventmp/0.0.1.dev3/", "requires_dist": [ "gevent (>=1.3.0)" ], "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "summary": "Multiprocessing Gevent Extension", "version": "0.0.1.dev3" }, "last_serial": 5867655, "releases": { "0.0.1.dev1": [ { "comment_text": "", "digests": { "md5": "442e1289faae738c8d7db7ea92d2ad1a", "sha256": "40cdfc313472e41d23875c0dc5b3c904a2cfe8632d58c869280bd6550561dcd3" }, "downloads": -1, "filename": "geventmp-0.0.1.dev1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "442e1289faae738c8d7db7ea92d2ad1a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 15321, "upload_time": "2019-08-15T20:41:45", "url": "https://files.pythonhosted.org/packages/03/41/82e2e43527bbbaaabcfbb208dfdfb6e4f8e7b9dada2b3f98bf2e7150b94f/geventmp-0.0.1.dev1-py2.py3-none-any.whl" } ], "0.0.1.dev2": [ { "comment_text": "", "digests": { "md5": "2327d7cec4cfc2229b9dabd42656d8c5", "sha256": "7767265bc3291aa33f0b2f49f7083fe273c9db9c56ff14d924f530174cd7acf7" }, "downloads": -1, "filename": "geventmp-0.0.1.dev2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2327d7cec4cfc2229b9dabd42656d8c5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 15315, "upload_time": "2019-08-15T22:16:14", "url": "https://files.pythonhosted.org/packages/10/86/0b4ea035cb90d7b286104e6db4c16a3fb243c8f4660c6d02d726fc5595e4/geventmp-0.0.1.dev2-py2.py3-none-any.whl" } ], "0.0.1.dev3": [ { "comment_text": "", "digests": { "md5": "b1c1813fa3a789b503a0b7b345e6f4a5", "sha256": "b4898b1c51e4d95a28c64d3a370818ccc2ed7ea790f5956b521568d4e41ea99c" }, "downloads": -1, "filename": "geventmp-0.0.1.dev3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b1c1813fa3a789b503a0b7b345e6f4a5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 15415, "upload_time": "2019-09-22T02:17:39", "url": "https://files.pythonhosted.org/packages/16/07/9c67c80dd37422192b1a91cb512ca5e6872a43d47ed61901f937c37cae1c/geventmp-0.0.1.dev3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1c1813fa3a789b503a0b7b345e6f4a5", "sha256": "b4898b1c51e4d95a28c64d3a370818ccc2ed7ea790f5956b521568d4e41ea99c" }, "downloads": -1, "filename": "geventmp-0.0.1.dev3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b1c1813fa3a789b503a0b7b345e6f4a5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 15415, "upload_time": "2019-09-22T02:17:39", "url": "https://files.pythonhosted.org/packages/16/07/9c67c80dd37422192b1a91cb512ca5e6872a43d47ed61901f937c37cae1c/geventmp-0.0.1.dev3-py2.py3-none-any.whl" } ] }