Bleach development

Install for development

To install Bleach to make changes to it:

  1. Clone the repo from GitHub:

    $ git clone git://github.com/mozilla/bleach.git
    
  2. Create a virtual environment using whatever method you want.

  3. Install Bleach into the virtual environment such that you can see changes:

    $ pip install -e .
    

Reporting Bugs

For regular bugs, please report them in our issue tracker.

If you believe that you’ve found a security vulnerability, please file a secure bug report in our bug tracker or send an email to security AT mozilla DOT org.

For more information on security-related bug disclosure and the PGP key to use for sending encrypted mail or to verify responses received from that address, please read our wiki page at https://www.mozilla.org/en-US/security/#For_Developers.

Code of conduct

This project and repository is governed by Mozilla’s code of conduct and etiquette guidelines. For more details please see the Mozilla Community Participation Guidelines and Developer Etiquette Guidelines.

Docs

Docs are in docs/. We use Sphinx. Docs are pushed to ReadTheDocs via a GitHub webhook.

Testing

Run:

$ tox

That’ll run Bleach tests in all the supported Python environments. Note that you need the necessary Python binaries for them all to be tested.

Tests are run in Travis CI via a GitHub webhook.

Release process

  1. Checkout master tip.

  2. Check to make sure setup.py and requirements.txt are correct and match requirements-wise.

  3. Update version numbers in bleach/__init__.py.

    1. Set __version__ to something like 2.0.
    2. Set __releasedate__ to something like 20120731.
  4. Update CONTRIBUTORS, CHANGES and MANIFEST.in.

  5. Verify correctness.

    1. Run tests with tox:

      $ tox
      
    2. Build the docs:

      $ cd docs
      $ make html
      
    3. Run the doctests:

      $ cd docs/
      $ make doctests
      
    4. Verify everything works

  6. Commit the changes.

  7. Push the changes to GitHub. This will cause Travis to run the tests.

  8. After Travis is happy, create a signed tag for the release:

    $ git tag -s v0.4
    

    Copy the details from CHANGES into the tag comment.

  9. Push the new tag:

    $ git push --tags official master
    

    That will push the release to PyPI.

  10. Blog posts, twitter, update topic in #bleach, etc.