[Debichem-devel] Bug#1058122: python-griddataformats: FTBFS: AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

Yogeswaran Umasankar kd8mbd at gmail.com
Sat Jan 13 06:51:28 GMT 2024


Hi,
I created a patch for fixing AttributeError: module 'configparser' has
no attribute 'SafeConfigParser'. I've attached the debdiff for you to
check out.
Cheers!

-------------- next part --------------
diff -Nru python-griddataformats-1.0.1/debian/changelog python-griddataformats-1.0.1/debian/changelog
--- python-griddataformats-1.0.1/debian/changelog	2022-11-07 17:53:52.000000000 +0000
+++ python-griddataformats-1.0.1/debian/changelog	2024-01-13 01:30:00.000000000 +0000
@@ -1,3 +1,22 @@
+python-griddataformats (1.0.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch for AttributeError: module 'configparser' (Closes:#1058122).
+  * Revised autopkgtest d/tests/* for Python 3.12.
+  * Bumped Standards-Version to 4.6.2.
+
+ -- Yogeswaran Umasankar <kd8mbd at gmail.com>  Sat, 13 Jan 2024 01:30:00 +0000
+
+python-griddataformats (1.0.1-2) UNRELEASED; urgency=medium
+
+  * Trim trailing whitespace.
+  * Use versioned copyright format URI.
+  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository-Browse.
+  * Remove constraints unnecessary since buster (oldstable):
+    + Build-Depends: Drop versioned constraint on python3-numpy.
+
+ -- Debian Janitor <janitor at jelmer.uk>  Fri, 18 Nov 2022 03:19:39 -0000
+
 python-griddataformats (1.0.1-1) unstable; urgency=medium
 
   * New upstream release.
@@ -66,18 +85,18 @@
 
 python-griddataformats (0.2.2-3) unstable; urgency=low
 
-  * added debian/watch 
+  * added debian/watch
 
  -- S?bastien Buchoux <sebastien.buchoux at gmail.com>  Thu, 17 Nov 2011 17:19:28 +0100
 
 python-griddataformats (0.2.2-2) unstable; urgency=low
 
-  * python-setuptools added as a build dependency in debian/control 
+  * python-setuptools added as a build dependency in debian/control
 
  -- S?bastien Buchoux <sebastien.buchoux at gmail.com>  Wed, 16 Nov 2011 17:17:56 +0100
 
 python-griddataformats (0.2.2-1) unstable; urgency=low
 
   * Initial release as Debian package
-  
+
  -- S?bastien Buchoux <sebastien.buchoux at gmail.com>  Wed, 16 Nov 2011 10:43:43 +0100
diff -Nru python-griddataformats-1.0.1/debian/control python-griddataformats-1.0.1/debian/control
--- python-griddataformats-1.0.1/debian/control	2022-11-07 17:53:52.000000000 +0000
+++ python-griddataformats-1.0.1/debian/control	2024-01-13 01:30:00.000000000 +0000
@@ -7,12 +7,12 @@
  dh-python,
  python3-all:any,
  python3-mrcfile,
- python3-numpy (>= 1.19~),
+ python3-numpy,
  python3-pytest,
  python3-scipy,
  python3-setuptools,
  python3-six
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
 Homepage: https://www.mdanalysis.org/GridDataFormats/
 Vcs-Git: https://salsa.debian.org/debichem-team/python-griddataformats.git
 Vcs-Browser: https://salsa.debian.org/debichem-team/python-griddataformats
diff -Nru python-griddataformats-1.0.1/debian/copyright python-griddataformats-1.0.1/debian/copyright
--- python-griddataformats-1.0.1/debian/copyright	2022-11-07 17:53:52.000000000 +0000
+++ python-griddataformats-1.0.1/debian/copyright	2024-01-13 01:30:00.000000000 +0000
@@ -1,4 +1,4 @@
-Format: http://dep.debian.net/deps/dep5
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: python-griddataformats
 Source: https://github.com/MDAnalysis/GridDataFormats
 
diff -Nru python-griddataformats-1.0.1/debian/patches/001_AttributeError-fix-py312.patch python-griddataformats-1.0.1/debian/patches/001_AttributeError-fix-py312.patch
--- python-griddataformats-1.0.1/debian/patches/001_AttributeError-fix-py312.patch	1970-01-01 00:00:00.000000000 +0000
+++ python-griddataformats-1.0.1/debian/patches/001_AttributeError-fix-py312.patch	2024-01-13 01:30:00.000000000 +0000
@@ -0,0 +1,18 @@
+Description: Fix for AttributeError: module 'configparser' in Python 3.12.
+Author: Yogeswaran Umasankar <kd8mbd at gmail.com>
+Last-Update: 2024-01-13
+
+--- a/versioneer.py
++++ b/versioneer.py
+@@ -339,9 +339,9 @@ def get_config_from_root(root):
+     # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
+     # the top of versioneer.py for instructions on writing your setup.cfg .
+     setup_cfg = os.path.join(root, "setup.cfg")
+-    parser = configparser.SafeConfigParser()
++    parser = configparser.ConfigParser()
+     with open(setup_cfg, "r") as f:
+-        parser.readfp(f)
++        parser.read_file(f)
+     VCS = parser.get("versioneer", "VCS")  # mandatory
+ 
+     def get(parser, name):
diff -Nru python-griddataformats-1.0.1/debian/patches/series python-griddataformats-1.0.1/debian/patches/series
--- python-griddataformats-1.0.1/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ python-griddataformats-1.0.1/debian/patches/series	2024-01-13 01:30:00.000000000 +0000
@@ -0,0 +1 @@
+001_AttributeError-fix-py312.patch
diff -Nru python-griddataformats-1.0.1/debian/source/options python-griddataformats-1.0.1/debian/source/options
--- python-griddataformats-1.0.1/debian/source/options	1970-01-01 00:00:00.000000000 +0000
+++ python-griddataformats-1.0.1/debian/source/options	2024-01-13 01:30:00.000000000 +0000
@@ -0,0 +1,2 @@
+extend-diff-ignore = "^[^/]*[.]egg-info/|^GridDataFormats[.]egg-info"
+extend-diff-ignore = "^[^/]*[.]egg-info/|^GridDataFormats[.]egg-info/"
diff -Nru python-griddataformats-1.0.1/debian/tests/control python-griddataformats-1.0.1/debian/tests/control
--- python-griddataformats-1.0.1/debian/tests/control	2022-11-07 17:53:52.000000000 +0000
+++ python-griddataformats-1.0.1/debian/tests/control	2024-01-13 01:30:00.000000000 +0000
@@ -1,3 +1,3 @@
-Test-Command: pytest-3 -v
-Depends: @, @builddeps@,
- python3-pytest
+Tests: runtests
+Depends: @, @builddeps@, python3-pytest, python3-all
+Restrictions: allow-stderr
diff -Nru python-griddataformats-1.0.1/debian/tests/runtests python-griddataformats-1.0.1/debian/tests/runtests
--- python-griddataformats-1.0.1/debian/tests/runtests	1970-01-01 00:00:00.000000000 +0000
+++ python-griddataformats-1.0.1/debian/tests/runtests	2024-01-13 01:30:00.000000000 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e -u
+
+cp -va gridData/tests "$AUTOPKGTEST_TMP"/
+mkdir -p "$AUTOPKGTEST_TMP"/datafiles
+cp -va gridData/tests/datafiles/* "$AUTOPKGTEST_TMP"/datafiles
+cd "$AUTOPKGTEST_TMP"
+
+for py in $(py3versions --supported); do
+    $py -m pytest -v tests
+done
diff -Nru python-griddataformats-1.0.1/debian/upstream/metadata python-griddataformats-1.0.1/debian/upstream/metadata
--- python-griddataformats-1.0.1/debian/upstream/metadata	1970-01-01 00:00:00.000000000 +0000
+++ python-griddataformats-1.0.1/debian/upstream/metadata	2024-01-13 01:30:00.000000000 +0000
@@ -0,0 +1,4 @@
+---
+Bug-Database: https://github.com/MDAnalysis/GridDataFormats/issues
+Bug-Submit: https://github.com/MDAnalysis/GridDataFormats/issues/new
+Repository-Browse: https://github.com/MDAnalysis/GridDataFormats
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debichem-devel/attachments/20240113/a5ab347c/attachment.sig>


More information about the Debichem-devel mailing list