diff --git a/pkgs/development/python-modules/mail-parser/default.nix b/pkgs/development/python-modules/mail-parser/default.nix index 226fe1878de2..807c97f6adde 100644 --- a/pkgs/development/python-modules/mail-parser/default.nix +++ b/pkgs/development/python-modules/mail-parser/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "mail-parser"; - version = "4.0.0"; + version = "4.1.2"; pyproject = true; src = fetchFromGitHub { owner = "SpamScope"; repo = "mail-parser"; rev = "refs/tags/${version}"; - hash = "sha256-WpV1WJFwzAquPXimew86YpEp++dnkIiBe5E4lMBDl7w="; + hash = "sha256-AXMfb+9POEaosCc+dv1xenhvBbpVkllMjftMoADUPXE="; }; LC_ALL = "en_US.utf-8"; @@ -49,11 +49,11 @@ buildPythonPackage rec { cat tests/mails/mail_malformed_3 | ${python.interpreter} -m mailparser -k -j ''; - meta = with lib; { + meta = { description = "Mail parser for python 2 and 3"; mainProgram = "mailparser"; homepage = "https://github.com/SpamScope/mail-parser"; - license = licenses.asl20; - maintainers = with maintainers; [ psyanticy ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ psyanticy ]; }; } diff --git a/pkgs/development/python-modules/mailsuite/default.nix b/pkgs/development/python-modules/mailsuite/default.nix index f6cb1a2a2330..a58dfba8dbea 100644 --- a/pkgs/development/python-modules/mailsuite/default.nix +++ b/pkgs/development/python-modules/mailsuite/default.nix @@ -16,18 +16,22 @@ buildPythonPackage rec { pname = "mailsuite"; - version = "1.9.16"; + version = "1.9.18"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-rfavOOivttXXmdA/Nl3jUmXIUQrjxDDZ8cHcNIJQL6U="; + hash = "sha256-3rK5PgcAOKVvZbFT7PaZX9lhU8yKpPQozvh2F8mTkfA="; }; nativeBuildInputs = [ hatchling ]; + pythonRelaxDeps = [ + "mail-parser" + ]; + propagatedBuildInputs = [ dnspython expiringdict diff --git a/pkgs/development/python-modules/opensearch-py/default.nix b/pkgs/development/python-modules/opensearch-py/default.nix index 0914a8ca6701..5557ea3e21b1 100644 --- a/pkgs/development/python-modules/opensearch-py/default.nix +++ b/pkgs/development/python-modules/opensearch-py/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -62,6 +63,8 @@ buildPythonPackage rec { pytz ] ++ optional-dependencies.async; + __darwinAllowLocalNetworking = true; + disabledTestPaths = [ # require network "test_opensearchpy/test_async/test_connection.py" @@ -70,11 +73,21 @@ buildPythonPackage rec { "test_opensearchpy/test_server_secured" ]; - disabledTests = [ - # finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None) - "test_ca_certs_ssl_cert_dir" - "test_no_ca_certs" - ]; + disabledTests = + [ + # finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None) + "test_ca_certs_ssl_cert_dir" + "test_no_ca_certs" + + # Failing tests, issue opened at https://github.com/opensearch-project/opensearch-py/issues/849 + "test_basicauth_in_request_session" + "test_callable_in_request_session" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) [ + # Flaky tests: OSError: [Errno 48] Address already in use + "test_redirect_failure_when_allow_redirect_false" + "test_redirect_success_when_allow_redirect_true" + ]; meta = { description = "Python low-level client for OpenSearch"; diff --git a/pkgs/development/python-modules/parsedmarc/default.nix b/pkgs/development/python-modules/parsedmarc/default.nix index 61ec964340d4..dc118008ef9b 100644 --- a/pkgs/development/python-modules/parsedmarc/default.nix +++ b/pkgs/development/python-modules/parsedmarc/default.nix @@ -27,6 +27,7 @@ nixosTests, opensearch-py, publicsuffixlist, + pygelf, pythonOlder, requests, tqdm, @@ -41,14 +42,14 @@ let in buildPythonPackage rec { pname = "parsedmarc"; - version = "8.15.0"; + version = "8.15.4"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Z2KF8jv/D/SvwQWd1PGSlsAfowmYOd5CvvcC4kVuLos="; + hash = "sha256-lxW92jlSWgGVxOO+CwIZi5sKHqoZuR5VQCnDVORXmXU="; }; nativeBuildInputs = [ @@ -82,6 +83,7 @@ buildPythonPackage rec { mailsuite msgraph-core publicsuffixlist + pygelf requests tqdm xmltodict diff --git a/pkgs/development/python-modules/pygelf/default.nix b/pkgs/development/python-modules/pygelf/default.nix new file mode 100644 index 000000000000..bb5735771c74 --- /dev/null +++ b/pkgs/development/python-modules/pygelf/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + mock, + pytestCheckHook, + requests, +}: +buildPythonPackage rec { + pname = "pygelf"; + version = "0.4.2"; + pyproject = true; + + src = fetchPypi { + pname = "pygelf"; + inherit version; + hash = "sha256-0LuPRf9kipoYdxP0oFwJ9oX8uK3XsEu3Rx8gBxvRGq0="; + }; + + build-system = [ setuptools ]; + + pythonImportsCheck = [ "pygelf" ]; + + nativeCheckInputs = [ + mock + pytestCheckHook + requests + ]; + + disabledTests = [ + # ConnectionRefusedError: [Errno 111] Connection refused + "test_static_fields" + "test_dynamic_fields" + ]; + + disabledTestPaths = [ + # These tests requires files that are stripped off by Pypi packaging + "tests/test_queuehandler_support.py" + "tests/test_debug_mode.py" + "tests/test_common_fields.py" + ]; + + meta = { + description = "Python logging handlers with GELF (Graylog Extended Log Format) support"; + homepage = "https://github.com/keeprocking/pygelf"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 61e7d05fb154..ef8f266c85bf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10405,6 +10405,8 @@ self: super: with self; { pyfreedompro = callPackage ../development/python-modules/pyfreedompro { }; + pygelf = callPackage ../development/python-modules/pygelf { }; + pygments-style-github = callPackage ../development/python-modules/pygments-style-github { }; pygnmi = callPackage ../development/python-modules/pygnmi { };