[med-svn] [Git][med-team/intake][master] 4 commits: Replace distutils which is removed in Python3.12

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Jan 4 11:50:33 GMT 2024



Andreas Tille pushed to branch master at Debian Med / intake


Commits:
d3456b70 by Andreas Tille at 2024-01-04T11:26:59+01:00
Replace distutils which is removed in Python3.12

- - - - -
6f9919f6 by Andreas Tille at 2024-01-04T12:24:06+01:00
(Build-)Depends: python3-packaging

- - - - -
bffeac5d by Andreas Tille at 2024-01-04T12:35:34+01:00
Adapt patch to current python3-packaging.  (I'm wondering who might have all the fun to rename things that worked before :-()

- - - - -
e5424002 by Andreas Tille at 2024-01-04T12:46:58+01:00
Proper replacement of which

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/python3.12.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+intake (0.6.6-3) UNRELEASED; urgency=medium
+
+  * Replace distutils which is removed in Python3.12
+    Closes: #1059921
+  * (Build-)Depends: python3-packaging
+
+ -- Andreas Tille <tille at debian.org>  Thu, 04 Jan 2024 11:25:24 +0100
+
 intake (0.6.6-2) unstable; urgency=medium
 
   * Team upload


=====================================
debian/control
=====================================
@@ -33,7 +33,7 @@ Build-Depends: debhelper-compat (= 13),
                libjs-html5shiv,
                libjs-jquery,
                node-html5shiv,
-               debhelper
+               python3-packaging
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/intake
 Vcs-Git: https://salsa.debian.org/med-team/intake.git
@@ -53,7 +53,8 @@ Depends: ${python3:Depends},
          python3-yaml,
          python3-requests,
          python3-msgpack,
-         python3-fsspec
+         python3-fsspec,
+         python3-packaging
 Description: lightweight package for finding and investigating data
  Intake is a lightweight set of tools for loading and sharing data in
  data science projects. Intake helps you:


=====================================
debian/patches/python3.12.patch
=====================================
@@ -0,0 +1,132 @@
+Description: Replace distutils which is removed in Python3.12
+Bug-Debian: https://bugs.debian.org/1059921
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 04 Jan 2024 11:25:24 +0100
+
+--- a/intake/container/dataframe.py
++++ b/intake/container/dataframe.py
+@@ -4,7 +4,7 @@
+ #
+ # The full license is in the LICENSE file, distributed with this software.
+ #-----------------------------------------------------------------------------
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ 
+ 
+ from intake.source.base import Schema, DataSource
+@@ -38,7 +38,7 @@ class RemoteDataFrame(RemoteSource):
+                 self.url, self.headers, self._source_id, self.container, i
+             )
+                           for i in range(self.npartitions)]
+-            if LooseVersion(dask.__version__) < LooseVersion("2.5.0"):
++            if Version(dask.__version__) < Version("2.5.0"):
+                 self.dataframe = dd.from_delayed(self.parts)
+             else:
+                 self.dataframe = dd.from_delayed(self.parts, verify_meta=self.verify)
+--- a/intake/interface/__init__.py
++++ b/intake/interface/__init__.py
+@@ -4,7 +4,7 @@
+ #
+ # The full license is in the LICENSE file, distributed with this software.
+ #-----------------------------------------------------------------------------
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ 
+ gl = globals()
+ 
+@@ -13,7 +13,7 @@ def do_import():
+     error = too_old = False
+     try:
+         import panel as pn
+-        too_old = LooseVersion(pn.__version__) < LooseVersion("0.9.5")
++        too_old = Version(pn.__version__) < Version("0.9.5")
+     except ImportError as e:
+         error = e
+ 
+--- a/intake/interface/source/defined_plots.py
++++ b/intake/interface/source/defined_plots.py
+@@ -4,18 +4,18 @@
+ #
+ # The full license is in the LICENSE file, distributed with this software.
+ #-----------------------------------------------------------------------------
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ 
+ try:
+     import dfviz
+-    assert LooseVersion(dfviz.__version__) >= LooseVersion("0.1.0")
++    assert Version(dfviz.__version__) >= Version("0.1.0")
+ except ImportError:
+     dfviz = False
+ 
+ try:
+     import xrviz
+     from xrviz.dashboard import Dashboard as XRViz
+-    assert LooseVersion(xrviz.__version__) >= LooseVersion("0.1.1")
++    assert Version(xrviz.__version__) >= Version("0.1.1")
+ except ImportError:
+     xrviz = False
+ 
+--- a/intake/interface/source/tests/test_gui.py
++++ b/intake/interface/source/tests/test_gui.py
+@@ -4,10 +4,10 @@
+ #
+ # The full license is in the LICENSE file, distributed with this software.
+ #-----------------------------------------------------------------------------
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ import pytest
+ pn = pytest.importorskip('panel')
+-too_old = LooseVersion(pn.__version__) < LooseVersion("0.9.5")
++too_old = Version(pn.__version__) < Version("0.9.5")
+ 
+ 
+ @pytest.mark.skipif(too_old, reason="Use with latest panel")
+--- a/intake/source/utils.py
++++ b/intake/source/utils.py
+@@ -5,10 +5,10 @@
+ # The full license is in the LICENSE file, distributed with this software.
+ #-----------------------------------------------------------------------------
+ 
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ try:
+     import dask
+-    DASK_VERSION = LooseVersion(dask.__version__)
++    DASK_VERSION = Version(dask.__version__)
+ except:
+     DASK_VERSION = None
+ from ..utils import make_path_posix
+--- a/intake/catalog/default.py
++++ b/intake/catalog/default.py
+@@ -8,6 +8,7 @@
+ import appdirs
+ import json
+ import os
++import shutil
+ import subprocess
+ import sys
+ 
+@@ -51,11 +52,9 @@ def conda_prefix():
+     except (subprocess.CalledProcessError, json.JSONDecodeError, OSError):
+         return False
+ 
+-
+ def which(program):
+     """Emulate posix ``which``"""
+-    import distutils.spawn
+-    return distutils.spawn.find_executable(program)
++    return shutil.which(program)
+ 
+ 
+ def global_data_dir():
+--- a/versioneer.py
++++ b/versioneer.py
+@@ -1499,6 +1499,7 @@ def get_cmdclass():
+     cmds = {}
+ 
+     # we add "version" to both distutils and setuptools
++    import setuptools
+     from distutils.core import Command
+ 
+     class cmd_version(Command):


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@ fix_tests.patch
 architectures-support.patch
 typo-in-manual-page.patch
 84e22555aa415eb6a92c60b11d5f1e09d4737c54.patch
+python3.12.patch



View it on GitLab: https://salsa.debian.org/med-team/intake/-/compare/ba90798424e2f521ca073150cd3c5365dc4277a0...e5424002aab8a3b377eebf298c0ecf7c9f9f9282

-- 
View it on GitLab: https://salsa.debian.org/med-team/intake/-/compare/ba90798424e2f521ca073150cd3c5365dc4277a0...e5424002aab8a3b377eebf298c0ecf7c9f9f9282
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240104/8fe8f85a/attachment-0001.htm>


More information about the debian-med-commit mailing list