Python 3.7+, PyPy 3.7+, or Pyston 2.2+
setproctitle if you wish to have named processes
uvloop if you wish to use libuv
pip install blackhole
For uvloop support
pip install blackhole[uvloop]
For setproctitle support
pip install blackhole[setproctitle]
For both uvloop and setproctitle
pip install blackhole[uvloop,setproctitle]
python setup.py install
Blackhole is licensed under the MIT license.
(The MIT License)
Copyright (c) 2013-2021 Kura
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If you’re thinking about contributing, it’s really quite simple. There is no need to feel daunted. You can contribute in a variety of ways:
improve performance, and
add additional support i.e. new versions of Python or PyPy.
Please make sure that you read, understand and accept the Code of Conduct.
You can view a list of tasks that need work on the TODO page.
The API section also has a wealth of information on how the server works and how you can modify it or use parts of it.
You’ll need to fork the blackhole repository and checkout the source to your machine, much like any other project.
You’ll need to create a new branch for each piece of work you wish to do.
git checkout -b branch_name
Once this is done, you need to run setup.py with the develop argument instead of install.
python setup.py develop
Now you can hackaway.
Make sure that you’ve written tests for what you have changed, or at least try to.
Add your name to the CONTRIBUTORS list, feel free to add a comment about what you did i.e. Kura added STARTTLS support.
Submit your pull request.
You can find the latest tests against the source code on GitHub.
Running tests manually is pretty simple, there is a Makefile target dedicated to it.
The test suite relies on py.test and is installed via the Makefile target and the setup.py test target.
The test suite takes a while to run, there are a lot of parts that require communication and also use calls
asyncio.sleep, which cause the test suite to pause until the sleep is done.
To use the setup.py test target.
python setup.py test
You can also test using tox, when run through the Makefile tox will be installed automatically and the tests will be parallelised.
The Makefile supplied also has a target for building the documentation.