about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2024-05-01 07:38:32 +0200
committerGitHub <noreply@github.com>2024-05-01 07:38:32 +0200
commitc54c9679cee2b8776efae89ed378ba1f0b59752f (patch)
tree3a222c993f38e0ce3211eac0bb999c9812659150 /pkgs
parent38c01297e7ec11f7b9e3f2cae7d6fcec6cc767ec (diff)
parent5d32909cad0e04ad87d79e42ceeb351c92839252 (diff)
Merge pull request #299654 from melvyn2/update-uncompyle6
python3Packages.{xdis,uncompyle6}: bump to latest to support python 3.12
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/uncompyle6/default.nix14
-rw-r--r--pkgs/development/python-modules/xdis/default.nix26
2 files changed, 20 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/uncompyle6/default.nix b/pkgs/development/python-modules/uncompyle6/default.nix
index 9820902a69a4f..fa48931594c9e 100644
--- a/pkgs/development/python-modules/uncompyle6/default.nix
+++ b/pkgs/development/python-modules/uncompyle6/default.nix
@@ -1,7 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, pythonAtLeast
+, pythonOlder
 , spark-parser
 , xdis
 , nose
@@ -12,18 +12,22 @@
 
 buildPythonPackage rec {
   pname = "uncompyle6";
-  version = "3.9.0";
+  version = "3.9.1";
   format = "setuptools";
-  disabled = pythonAtLeast "3.9"; # See: https://github.com/rocky/python-uncompyle6/issues/331
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-HmqQLeYOpcP30q9+J0UAa05Lm97eiIoH+EQcmTjy7n0=";
+    hash = "sha256-xFHDjrPFzINOuLip5uCwzzIm5NlNCP0nbdA/6RWO2yc=";
   };
 
-  nativeCheckInputs = [ nose pytest hypothesis six ];
   propagatedBuildInputs = [ spark-parser xdis ];
 
+  nativeCheckInputs = [ nose pytest hypothesis six ];
+
+  # Tests attempt to decompile bytecode of the python version
+  # that is running the tests - this does not work for versions
+  # above 3.8, but they decompile older bytecode fine
+  doCheck = pythonOlder "3.9";
   # six import errors (yet it is supplied...)
   checkPhase = ''
     runHook preCheck
diff --git a/pkgs/development/python-modules/xdis/default.nix b/pkgs/development/python-modules/xdis/default.nix
index 9f5d40248c7c5..5fda8fce96cce 100644
--- a/pkgs/development/python-modules/xdis/default.nix
+++ b/pkgs/development/python-modules/xdis/default.nix
@@ -11,25 +11,18 @@
 
 buildPythonPackage rec {
   pname = "xdis";
-  version = "6.0.5";
+  version = "6.1.0";
   format = "setuptools";
 
-  # No support for Python 3.11, https://github.com/rocky/python-xdis/issues/98
-  disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "rocky";
     repo = "python-xdis";
     rev = "refs/tags/${version}";
-    hash = "sha256-3mL0EuPHF/dithovrYvMjweYGwGhrN75N9MRfLjNC34=";
+    hash = "sha256-KgKTO99T2/be1sBs5rY3Oy7/Yl9WGgdG3hqqkZ7D7ZY=";
   };
 
-  postPatch = ''
-    # Our Python release is not in the test matrix
-    substituteInPlace xdis/magics.py \
-      --replace "3.10.4" "3.10.5 3.10.6 3.10.7 3.10.8 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14"
-  '';
-
   propagatedBuildInputs = [
     click
     six
@@ -43,13 +36,16 @@ buildPythonPackage rec {
     "xdis"
   ];
 
-  # import file mismatch:
-  # imported module 'test_disasm' has this __file__ attribute:
-  #   /build/source/pytest/test_disasm.py
-  # which is not the same as the test file we want to collect:
-  #   /build/source/test_unit/test_disasm.py
   disabledTestPaths = [
+    # import file mismatch:
+    # imported module 'test_disasm' has this __file__ attribute:
+    #   /build/source/pytest/test_disasm.py
+    # which is not the same as the test file we want to collect:
+    #   /build/source/test_unit/test_disasm.py
     "test_unit/test_disasm.py"
+
+    # Doesn't run on non-2.7 but has global-level mis-import
+    "test_unit/test_dis27.py"
   ];
 
   disabledTests = [