[med-svn] [Git][med-team/python-dicompylercore][master] extend remove-six.patch

Alexandre Detiste (@detiste-guest) gitlab at salsa.debian.org
Sun Nov 8 13:09:33 GMT 2026



Alexandre Detiste pushed to branch master at Debian Med / python-dicompylercore


Commits:
d24f0cba by Alexandre Detiste at 2026-11-08T14:04:33+01:00
extend remove-six.patch

- - - - -


2 changed files:

- debian/patches/0d5729d7a2412e1c3f1e4cb4f6b07f7407eb8b06.patch
- debian/patches/remove-six.patch


Changes:

=====================================
debian/patches/0d5729d7a2412e1c3f1e4cb4f6b07f7407eb8b06.patch
=====================================
@@ -46,7 +46,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
 
 --- a/.github/workflows/build.yml
 +++ b/.github/workflows/build.yml
-@@ -13,19 +13,22 @@ jobs:
+@@ -13,19 +13,22 @@
          strategy:
              fail-fast: false
              matrix:
@@ -74,7 +74,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
                with:
                    path: ~/.cache/pip
                    key: ${{ hashFiles('setup.py') }}
-@@ -37,6 +40,11 @@ jobs:
+@@ -37,6 +40,11 @@
                    pip install coverage
                    pip install coveralls
                    pip install codecov
@@ -88,7 +88,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
                run: |
 --- a/.github/workflows/codacy.yml
 +++ b/.github/workflows/codacy.yml
-@@ -36,7 +36,7 @@ jobs:
+@@ -36,7 +36,7 @@
      steps:
        # Checkout the repository to the GitHub Actions runner
        - name: Checkout code
@@ -99,7 +99,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
        - name: Run Codacy Analysis CLI
 --- a/.github/workflows/codeql.yml
 +++ b/.github/workflows/codeql.yml
-@@ -24,7 +24,7 @@ jobs:
+@@ -24,7 +24,7 @@
  
      steps:
        - name: Checkout
@@ -110,7 +110,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
          uses: github/codeql-action/init at v2
 --- a/.github/workflows/dependency-review.yml
 +++ b/.github/workflows/dependency-review.yml
-@@ -15,6 +15,6 @@ jobs:
+@@ -15,6 +15,6 @@
      runs-on: ubuntu-latest
      steps:
        - name: 'Checkout Repository'
@@ -121,7 +121,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
 +        uses: actions/dependency-review-action at v4
 --- a/HISTORY.rst
 +++ b/HISTORY.rst
-@@ -5,6 +5,7 @@ History
+@@ -5,6 +5,7 @@
  0.5.7 (unreleased)
  ------------------
  - Dropped support for Python 2.
@@ -131,7 +131,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  ------------------
 --- a/README.rst
 +++ b/README.rst
-@@ -16,13 +16,13 @@ Other information
+@@ -16,13 +16,13 @@
  
  -  Free software: `BSD license <https://github.com/dicompyler/dicompyler-core/blob/master/LICENSE>`__
  -  Documentation: `Read the docs <https://dicompyler-core.readthedocs.io>`__
@@ -147,7 +147,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  -  `matplotlib <http://matplotlib.org>`__ 1.3.0 or higher (for DVH calculation)
  -  Optional:
  
-@@ -85,7 +85,7 @@ This package was created with
+@@ -85,7 +85,7 @@
     :target: http://mybinder.org/repo/bastula/dicom-notebooks
  .. |pypi| image:: https://img.shields.io/pypi/v/dicompyler-core.svg
     :target: https://pypi.python.org/pypi/dicompyler-core
@@ -156,7 +156,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
     :target: https://pypi.python.org/pypi/dicompyler-core
  .. |GH Actions| image:: https://github.com/dicompyler/dicompyler-core/actions/workflows/build.yml/badge.svg
     :target: https://github.com/dicompyler/dicompyler-core/actions
-@@ -97,8 +97,8 @@ This package was created with
+@@ -97,8 +97,8 @@
     :target: https://app.codacy.com/gh/dicompyler/dicompyler-core/dashboard
  .. |Codecov| image:: https://codecov.io/gh/dicompyler/dicompyler-core/branch/master/graph/badge.svg
     :target: https://codecov.io/gh/dicompyler/dicompyler-core
@@ -187,7 +187,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  import random
  from numbers import Number
  from io import BytesIO
-@@ -33,6 +30,40 @@ if shapely_available:
+@@ -33,6 +30,40 @@
  logger = logging.getLogger('dicompylercore.dicomparser')
  
  
@@ -228,7 +228,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  class DicomParser:
      """Class to parse DICOM / DICOM RT files."""
  
-@@ -59,7 +90,7 @@ class DicomParser:
+@@ -59,7 +90,7 @@
          elif isinstance(dataset, (str, BytesIO, Path)):
              try:
                  with open(dataset, "rb") as fp:
@@ -237,7 +237,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
                                          stop_before_pixels=memmap_pixel_array)
                      if memmap_pixel_array:
                          self.offset = fp.tell() + 8
-@@ -78,12 +109,14 @@ class DicomParser:
+@@ -78,12 +109,14 @@
              raise AttributeError
  
          # Fix dataset file_meta if incorrect
@@ -256,7 +256,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
          # i.e. RTStruct does not contain PixelData and its presence can confuse
 --- a/dicompylercore/dvh.py
 +++ b/dicompylercore/dvh.py
-@@ -108,16 +108,14 @@ class DVH(object):
+@@ -108,16 +108,14 @@
  
      def __repr__(self):
          """String representation of the class."""
@@ -283,7 +283,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  
 --- a/dicompylercore/util.py
 +++ b/dicompylercore/util.py
-@@ -132,7 +132,7 @@ def piecewise(x, condlist, funclist, *ar
+@@ -132,7 +132,7 @@
      y = np.zeros(x.shape, x.dtype)
      for k in range(n):
          item = funclist[k]
@@ -294,7 +294,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
              vals = x[condlist[k]]
 --- a/docs/conf.py
 +++ b/docs/conf.py
-@@ -44,7 +44,7 @@ extensions = ['sphinx.ext.autodoc', 'sph
+@@ -44,7 +44,7 @@
                'sphinx.ext.napoleon']
  
  autodoc_mock_imports = [
@@ -305,16 +305,16 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  
 --- a/setup.py
 +++ b/setup.py
-@@ -34,7 +34,7 @@ setup(
+@@ -33,7 +33,7 @@
+     include_package_data=True,
      install_requires=[
          "numpy>=1.2",
-         "six>=1.5",
 -        "pydicom>=0.9.9",
 +        "pydicom>=2.4.0,<4",
          "matplotlib>=1.3.0"
      ],
      extras_require={
-@@ -57,11 +57,10 @@ setup(
+@@ -56,11 +56,10 @@
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: BSD License',
          'Natural Language :: English',
@@ -372,7 +372,7 @@ Co-authored-by: Darcy Mason <darcymason at gmail.com>
  from numpy import arange, zeros
  from numpy.testing import (
      assert_array_almost_equal,
-@@ -27,6 +19,7 @@ from numpy.testing import (
+@@ -27,6 +19,7 @@
  )
  import warnings
  from dicompylercore.config import mpl_available, scipy_available


=====================================
debian/patches/remove-six.patch
=====================================
@@ -15,11 +15,9 @@ Subject: [PATCH] Remove Python 2 support (#367)
  tox.ini                       |  2 +-
  6 files changed, 19 insertions(+), 50 deletions(-)
 
-diff --git a/HISTORY.rst b/HISTORY.rst
-index 305d2f9..748f996 100644
 --- a/HISTORY.rst
 +++ b/HISTORY.rst
-@@ -4,6 +4,7 @@ History
+@@ -4,6 +4,7 @@
  
  0.5.7 (unreleased)
  ------------------
@@ -27,11 +25,9 @@ index 305d2f9..748f996 100644
  
  0.5.6 (2023-05-08)
  ------------------
-diff --git a/README.rst b/README.rst
-index 9f9d343..bed3b00 100644
 --- a/README.rst
 +++ b/README.rst
-@@ -24,7 +24,6 @@ Dependencies
+@@ -24,7 +24,6 @@
  -  `numpy <http://www.numpy.org>`__ 1.2 or higher
  -  `pydicom <https://pydicom.github.io>`__ 0.9.9 or higher (pydicom 1.0 compatible)
  -  `matplotlib <http://matplotlib.org>`__ 1.3.0 or higher (for DVH calculation)
@@ -39,8 +35,6 @@ index 9f9d343..bed3b00 100644
  -  Optional:
  
     -  `Pillow <https://pillow.readthedocs.io>`__ (for image display)
-diff --git a/dicompylercore/config.py b/dicompylercore/config.py
-index 4038aae..29d97bc 100644
 --- a/dicompylercore/config.py
 +++ b/dicompylercore/config.py
 @@ -7,52 +7,24 @@
@@ -107,8 +101,6 @@ index 4038aae..29d97bc 100644
 +dicompyler_uid_prefix_rtstruct = dicompyler_uid_prefix + "2."
 +dicompyler_uid_prefix_rtplan = dicompyler_uid_prefix + "3."
 +dicompyler_uid_prefix_rtdose = dicompyler_uid_prefix + "4."
-diff --git a/dicompylercore/dicomparser.py b/dicompylercore/dicomparser.py
-index 22d1991..5f92eb7 100755
 --- a/dicompylercore/dicomparser.py
 +++ b/dicompylercore/dicomparser.py
 @@ -20,8 +20,8 @@
@@ -122,7 +114,7 @@ index 22d1991..5f92eb7 100755
  from dicompylercore import dvh, util
  from dicompylercore.config import pil_available, shapely_available
  
-@@ -56,7 +56,7 @@ def __init__(self, dataset, memmap_pixel_array=False):
+@@ -56,7 +56,7 @@
          self.memmap_pixel_array = memmap_pixel_array
          if isinstance(dataset, Dataset):
              self.ds = dataset
@@ -131,7 +123,7 @@ index 22d1991..5f92eb7 100755
              try:
                  with open(dataset, "rb") as fp:
                      self.ds = read_file(fp, defer_size=100, force=True,
-@@ -203,8 +203,6 @@ def GetDemographics(self):
+@@ -203,8 +203,6 @@
                     'birth_date': None,
                     'gender': 'Other'}
          if 'PatientName' in self.ds:
@@ -140,7 +132,7 @@ index 22d1991..5f92eb7 100755
              name = self.ds.PatientName
              patient['name'] = str(name)
              patient['given_name'] = name.given_name
-@@ -668,7 +666,7 @@ def CalculatePlaneThickness(self, planesDict):
+@@ -668,7 +666,7 @@
          planes = []
  
          # Iterate over each plane in the structure
@@ -149,8 +141,6 @@ index 22d1991..5f92eb7 100755
              planes.append(float(z))
          planes.sort()
  
-diff --git a/dicompylercore/dvhcalc.py b/dicompylercore/dvhcalc.py
-index 01d3127..8766764 100644
 --- a/dicompylercore/dvhcalc.py
 +++ b/dicompylercore/dvhcalc.py
 @@ -19,7 +19,6 @@
@@ -161,7 +151,7 @@ index 01d3127..8766764 100644
  import logging
  logger = logging.getLogger('dicompylercore.dvhcalc')
  
-@@ -140,10 +139,10 @@ def _calculate_dvh(structure,
+@@ -140,10 +139,10 @@
      This is an internal function called by `get_dvh` and
      should not be called directly.
      """
@@ -173,7 +163,7 @@ index 01d3127..8766764 100644
  
      # Create an empty array of bins to store the histogram in cGy
      # only if the structure has contour data or the dose grid exists
-@@ -207,7 +206,7 @@ def _calculate_dvh(structure,
+@@ -207,7 +206,7 @@
              'thickness'] / (interpolation_segments_between_planes + 1)
  
      # Iterate over each plane in the structure
@@ -182,8 +172,6 @@ index 01d3127..8766764 100644
          # Get the dose plane for the current structure plane
          if interpolation_resolution or use_structure_extents:
              doseplane = get_interpolated_dose(
-diff --git a/tox.ini b/tox.ini
-index fb45b35..5bcc632 100644
 --- a/tox.ini
 +++ b/tox.ini
 @@ -1,5 +1,5 @@
@@ -193,3 +181,13 @@ index fb45b35..5bcc632 100644
  
  [testenv]
  setenv =
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,6 @@
+     include_package_data=True,
+     install_requires=[
+         "numpy>=1.2",
+-        "six>=1.5",
+         "pydicom>=0.9.9",
+         "matplotlib>=1.3.0"
+     ],



View it on GitLab: https://salsa.debian.org/med-team/python-dicompylercore/-/commit/d24f0cbaadd337e0cdebb883f7f830ba24349466

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-dicompylercore/-/commit/d24f0cbaadd337e0cdebb883f7f830ba24349466
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


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


More information about the debian-med-commit mailing list