<commit_before>{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytest
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pytest-socket";
  version = "0.4.0";
  disabled = pythonOlder "3.6";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "miketheman";
    repo = pname;
    rev = version;
    sha256 = "sha256-cFYtJqZ/RjFbn9XlEy6ffxZ2djisajQAwjV/YR2f59Q=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    pytest
  ];

  checkInputs = [
    pytest
  ];

  patches = [
    # Switch to poetry-core, https://github.com/miketheman/pytest-socket/pull/74
    (fetchpatch {
      name = "switch-to-poetry-core.patch";
      url = "https://github.com/miketheman/pytest-socket/commit/32519170e656e731d24b81770a170333d3efa6a8.patch";
      sha256 = "19ksgx77rsa6ijcbml74alwc5052mdqr4rmvqhlzvfcvv3676ig2";
    })
  ];

  # pytest-socket require network for majority of tests
  doCheck = false;

  pythonImportsCheck = [ "pytest_socket" ];

  meta = with lib; {
    description = "Pytest Plugin to disable socket calls during tests";
    homepage = "https://github.com/miketheman/pytest-socket";
    license = licenses.mit;
    maintainers = with maintainers; [ costrouc ];
  };
}<commit_msg>python3Packages.pytest-socket: 0.4.0 -> 0.5.0<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest
, pythonOlder
, setuptoolsBuildHook
}:

buildPythonPackage rec {
  pname = "pytest-socket";
  version = "0.5.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "miketheman";
    repo = pname;
    rev = version;
    hash = "sha256-HdGkpIHFsoAG2+8UyL9jSb3Dm8bWkYzREdY3i15ls/Q=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    pytest
  ];

  # pytest-socket require network for majority of tests
  doCheck = false;

  pythonImportsCheck = [
    "pytest_socket"
  ];

  meta = with lib; {
    description = "Pytest Plugin to disable socket calls during tests";
    homepage = "https://github.com/miketheman/pytest-socket";
    license = licenses.mit;
    maintainers = with maintainers; [ costrouc ];
  };
}
{'fraction_non_alphanumeric': 0.12204176334106728, 'fraction_numerical': 0.04269141531322506, 'mean_word_length': 3.286282306163022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 4, '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': '6886202', 'n_tokens_mistral': 866, 'n_tokens_neox': 821, 'n_words': 144}