Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pymarc for openSUSE:Factory 
checked in at 2022-11-01 13:42:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pymarc (Old)
 and      /work/SRC/openSUSE:Factory/.python-pymarc.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pymarc"

Tue Nov  1 13:42:11 2022 rev:6 rq:1032494 version:4.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pymarc/python-pymarc.changes      
2022-10-08 01:25:36.790283074 +0200
+++ /work/SRC/openSUSE:Factory/.python-pymarc.new.2275/python-pymarc.changes    
2022-11-01 13:42:20.899825893 +0100
@@ -1,0 +2,7 @@
+Fri Oct 28 20:11:57 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to 4.2.1 
+  * Bugfix for Field.delete_subfield() for situations when a subfield value is 
present with the name of the subfield that you want to delete.
+  * Updated README to point to ReadTheDocs documentation. 
+
+-------------------------------------------------------------------

Old:
----
  pymarc-4.2.0.tar.gz

New:
----
  pymarc-4.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pymarc.spec ++++++
--- /var/tmp/diff_new_pack.hzDGsb/_old  2022-11-01 13:42:21.939831424 +0100
+++ /var/tmp/diff_new_pack.hzDGsb/_new  2022-11-01 13:42:21.943831446 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pymarc
-Version:        4.2.0
+Version:        4.2.1
 Release:        0
 Summary:        MARC bibliographic data manipulation module
 License:        BSD-2-Clause

++++++ pymarc-4.2.0.tar.gz -> pymarc-4.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/PKG-INFO new/pymarc-4.2.1/PKG-INFO
--- old/pymarc-4.2.0/PKG-INFO   2022-04-05 00:46:29.947458500 +0200
+++ new/pymarc-4.2.1/PKG-INFO   2022-10-17 22:22:44.191717900 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pymarc
-Version: 4.2.0
+Version: 4.2.1
 Summary: Read, write and modify MARC bibliographic data
 Home-page: http://gitlab.com/pymarc/pymarc
 Author: Ed Summers
@@ -44,6 +44,8 @@
 you run across an example that you think should be here please send a
 pull request.
 
+You can read pymarc documentation 
[here](https://pymarc.readthedocs.io/en/latest/).
+
 ### Installation
 
 You'll probably just want to use pip to install pymarc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/README.md new/pymarc-4.2.1/README.md
--- old/pymarc-4.2.0/README.md  2022-03-02 23:15:58.000000000 +0100
+++ new/pymarc-4.2.1/README.md  2022-10-17 22:15:40.000000000 +0200
@@ -22,6 +22,8 @@
 you run across an example that you think should be here please send a
 pull request.
 
+You can read pymarc documentation 
[here](https://pymarc.readthedocs.io/en/latest/).
+
 ### Installation
 
 You'll probably just want to use pip to install pymarc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/pymarc/field.py 
new/pymarc-4.2.1/pymarc/field.py
--- old/pymarc-4.2.0/pymarc/field.py    2022-04-05 00:40:47.000000000 +0200
+++ new/pymarc-4.2.1/pymarc/field.py    2022-10-17 22:15:40.000000000 +0200
@@ -190,13 +190,11 @@
         If no subfield is found with the specified code None is returned.
         """
         try:
-            index = self.subfields.index(code)
-            if index % 2 == 0:
-                value = self.subfields.pop(index + 1)
-                self.subfields.pop(index)
-                return value
-            else:
-                return None
+            codes = self.subfields[0::2]
+            index = codes.index(code) * 2
+            value = self.subfields.pop(index + 1)
+            self.subfields.pop(index)
+            return value
         except ValueError:
             return None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/pymarc.egg-info/PKG-INFO 
new/pymarc-4.2.1/pymarc.egg-info/PKG-INFO
--- old/pymarc-4.2.0/pymarc.egg-info/PKG-INFO   2022-04-05 00:46:29.000000000 
+0200
+++ new/pymarc-4.2.1/pymarc.egg-info/PKG-INFO   2022-10-17 22:22:44.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pymarc
-Version: 4.2.0
+Version: 4.2.1
 Summary: Read, write and modify MARC bibliographic data
 Home-page: http://gitlab.com/pymarc/pymarc
 Author: Ed Summers
@@ -44,6 +44,8 @@
 you run across an example that you think should be here please send a
 pull request.
 
+You can read pymarc documentation 
[here](https://pymarc.readthedocs.io/en/latest/).
+
 ### Installation
 
 You'll probably just want to use pip to install pymarc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/setup.py new/pymarc-4.2.1/setup.py
--- old/pymarc-4.2.0/setup.py   2022-04-05 00:40:57.000000000 +0200
+++ new/pymarc-4.2.1/setup.py   2022-10-17 22:16:04.000000000 +0200
@@ -8,7 +8,7 @@
 
 from setuptools import setup
 
-version = "4.2.0"
+version = "4.2.1"
 
 classifiers = """
 Intended Audience :: Education
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymarc-4.2.0/test/test_field.py 
new/pymarc-4.2.1/test/test_field.py
--- old/pymarc-4.2.0/test/test_field.py 2022-04-05 00:40:47.000000000 +0200
+++ new/pymarc-4.2.1/test/test_field.py 2022-10-17 22:15:40.000000000 +0200
@@ -171,10 +171,10 @@
         self.assertEqual(self.field["a"], "changed")
 
     def test_delete_subfield_only_by_code(self):
-        self.field.delete_subfield("An American Odyssey")
-        self.assertEqual(self.field["b"], "An American Odyssey")
-        self.field.delete_subfield("b")
-        self.assertTrue(self.field["b"] is None)
+        field = Field(tag="960", indicators=[" ", " "], subfields=["a", "b", 
"b", "x"])
+        value = field.delete_subfield("b")
+        self.assertEqual(value, "x")
+        self.assertEqual(field.subfields, ["a", "b"])
 
     def test_subfield_dict(self):
         field = Field(

Reply via email to