<commit_before>{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, six
, html5lib
, setuptools
, packaging
, pythonOlder
}:

buildPythonPackage rec {
  pname = "bleach";
  version = "5.0.1";
  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-DQMlXEfrm9Lyaqm7fyEHcy5+j+GVyi9kcJ/POwpKCFw=";
  };

  propagatedBuildInputs = [
    packaging
    six
    html5lib
    setuptools
  ];

  checkInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # Disable network tests
    "protocols"
  ];

  pythonImportsCheck = [ "bleach" ];

  meta = with lib; {
    description = "An easy, HTML5, whitelisting HTML sanitizer";
    longDescription = ''
      Bleach is an HTML sanitizing library that escapes or strips markup and
      attributes based on a white list. Bleach can also linkify text safely,
      applying filters that Django's urlize filter cannot, and optionally<commit_msg>python310Packages.bleach: add optional-dependencies<commit_after>{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, six
, html5lib
, setuptools
, tinycss2
, packaging
, pythonOlder
, webencodings
}:

buildPythonPackage rec {
  pname = "bleach";
  version = "5.0.1";
  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-DQMlXEfrm9Lyaqm7fyEHcy5+j+GVyi9kcJ/POwpKCFw=";
  };

  propagatedBuildInputs = [
    html5lib
    packaging
    setuptools
    six
    webencodings
  ];

  passthru.optional-dependencies = {
    css = [
      tinycss2
    ];
  };

  checkInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # Disable network tests
    "protocols"
  ];

  pythonImportsCheck = [
    "bleach"
  ];

  meta = with lib; {
    description = "An easy, HTML5, whitelisting HTML sanitizer";
    longDescription = ''
      Bleach is an HTML sanitizing library that escapes or strips markup and
      attributes based on a white list. Bleach can also linkify text safely,
      applying filters that Django's urlize filter cannot, and optionally
{'fraction_non_alphanumeric': 0.0869351669941061, 'fraction_numerical': 0.01719056974459725, 'mean_word_length': 3.1741803278688523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4549222', 'n_tokens_mistral': 724, 'n_tokens_neox': 680, 'n_words': 177}