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

python3Packages.defusedxml: 0.6.0 -> 0.7.0 #115251

Merged
merged 2 commits into from Mar 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 17 additions & 3 deletions pkgs/development/python-modules/defusedxml/default.nix
@@ -1,11 +1,25 @@
{ buildPythonPackage, fetchPypi }:
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:

buildPythonPackage rec {
pname = "defusedxml";
version = "0.6.0";
version = "0.7.0";
disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5";
sha256 = "183fz8xwclhkirwpvpldyypn47r8lgzfz2mk9jgyg7b37jg5vcc6";
};

pythonImportsCheck = [ "defusedxml" ];
Copy link
Member

@mweinelt mweinelt Mar 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable tests by passing tests.py to the pytestCheckHook.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff --git a/pkgs/development/python-modules/defusedxml/default.nix b/pkgs/development/python-modules/defusedxml/default.nix
index 3abdd0fb792..ef1ba91d45c 100644
--- a/pkgs/development/python-modules/defusedxml/default.nix
+++ b/pkgs/development/python-modules/defusedxml/default.nix
@@ -2,6 +2,7 @@
 , buildPythonPackage
 , fetchPypi
 , pythonOlder
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -14,6 +15,8 @@ buildPythonPackage rec {
     sha256 = "183fz8xwclhkirwpvpldyypn47r8lgzfz2mk9jgyg7b37jg5vcc6";
   };
 
+  checkInputs = [ pytestCheckHook ];
+
   pythonImportsCheck = [ "defusedxml" ];
 
   meta = with lib; {
=========================== short test summary info ============================
FAILED tests.py::BaseTests::test_allow_expansion - AttributeError: 'BaseTests...
FAILED tests.py::BaseTests::test_dtd_forbidden - AttributeError: 'BaseTests' ...
FAILED tests.py::BaseTests::test_dtd_with_external_ref - AttributeError: 'Bas...
FAILED tests.py::BaseTests::test_entities_forbidden - AttributeError: 'BaseTe...
FAILED tests.py::BaseTests::test_entity_cycle - AttributeError: 'BaseTests' o...
FAILED tests.py::BaseTests::test_external_file_ref - AttributeError: 'BaseTes...
FAILED tests.py::BaseTests::test_external_ref - AttributeError: 'BaseTests' o...
FAILED tests.py::BaseTests::test_simple_parse - AttributeError: 'BaseTests' o...
FAILED tests.py::BaseTests::test_simple_parse_ns - AttributeError: 'BaseTests...
FAILED tests.py::TestDefusedElementTree::test_html_arg - AssertionError: Depr...
FAILED tests.py::TestDefusedcElementTree::test_html_arg - AssertionError: Dep...
FAILED tests.py::TestDefusedLxml::test_allow_expansion - TypeError: catching ...
FAILED tests.py::TestDefusedLxml::test_dtd_forbidden - TypeError: catching cl...
FAILED tests.py::TestDefusedLxml::test_dtd_with_external_ref - TypeError: cat...
FAILED tests.py::TestDefusedLxml::test_entities_forbidden - TypeError: catchi...
FAILED tests.py::TestDefusedLxml::test_entity_cycle - TypeError: assertRaises...
FAILED tests.py::TestDefusedLxml::test_lxml_warnings - AssertionError: None i...
FAILED tests.py::TestDefusedLxml::test_restricted_element1 - TypeError: catch...
FAILED tests.py::TestDefusedLxml::test_restricted_element2 - TypeError: catch...
FAILED tests.py::TestDefusedLxml::test_simple_parse - TypeError: catching cla...
FAILED tests.py::TestDefusedLxml::test_simple_parse_ns - TypeError: catching ...
FAILED tests.py::TestDefusedLxml::test_xpath_injection - AttributeError: 'Non...
================== 22 failed, 67 passed, 2 warnings in 0.91s ===================

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the tests fail with lots of type errors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, I'm a bit baffled why you merge this anyway. The tests are working upstream.

https://github.com/tiran/defusedxml/runs/2029830851

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SuperSandro2000, made the requested changes in a new PR #115341


meta = with lib; {
description = "Python module to defuse XML issues";
homepage = "https://github.com/tiran/defusedxml";
license = licenses.psfl;
maintainers = with maintainers; [ fab ];
};
}