Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.opensearch-py: fix build #357642

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkgs/development/python-modules/mail-parser/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 ];
};
}
8 changes: 6 additions & 2 deletions pkgs/development/python-modules/mailsuite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 18 additions & 5 deletions pkgs/development/python-modules/opensearch-py/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,

Expand Down Expand Up @@ -62,6 +63,8 @@ buildPythonPackage rec {
pytz
] ++ optional-dependencies.async;

__darwinAllowLocalNetworking = true;

disabledTestPaths = [
# require network
"test_opensearchpy/test_async/test_connection.py"
Expand All @@ -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";
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/python-modules/parsedmarc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
nixosTests,
opensearch-py,
publicsuffixlist,
pygelf,
pythonOlder,
requests,
tqdm,
Expand All @@ -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 = [
Expand Down Expand Up @@ -82,6 +83,7 @@ buildPythonPackage rec {
mailsuite
msgraph-core
publicsuffixlist
pygelf
requests
tqdm
xmltodict
Expand Down
50 changes: 50 additions & 0 deletions pkgs/development/python-modules/pygelf/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
mock,
pytestCheckHook,
requests,
}:
buildPythonPackage rec {
pname = "pygelf";
version = "0.4.2";
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
pyproject = true;

src = fetchPypi {
pname = "pygelf";
inherit version;
hash = "sha256-0LuPRf9kipoYdxP0oFwJ9oX8uK3XsEu3Rx8gBxvRGq0=";
};
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10397,6 +10397,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 { };
Expand Down