Просмотр исходного кода

Intermediate changes
commit_hash:4a2c7f50a832a0e22214ca2324cce36f97a2eda5

robot-piglet 4 месяцев назад
Родитель
Сommit
acaab248b5

+ 2 - 4
contrib/python/xmltodict/py3/.dist-info/METADATA

@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: xmltodict
-Version: 0.14.0
+Version: 0.14.2
 Summary: Makes working with XML feel like you are working with JSON
 Home-page: https://github.com/martinblech/xmltodict
 Author: Martin Blech
@@ -12,8 +12,6 @@ Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
@@ -24,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Text Processing :: Markup :: XML
-Requires-Python: >=3.4
+Requires-Python: >=3.6
 Description-Content-Type: text/markdown
 License-File: LICENSE
 

+ 2 - 2
contrib/python/xmltodict/py3/tests/test_xmltodict.py

@@ -93,13 +93,13 @@ class XMLToDictTestCase(unittest.TestCase):
         """
         self.assertEqual(
             parse(xml),
-            {'root': {'emptya': "           ",
+            {'root': {'emptya': None,
                       'emptyb': {'@attr': 'attrvalue'},
                       'value': 'hello'}})
 
     def test_keep_whitespace(self):
         xml = "<root> </root>"
-        self.assertEqual(parse(xml), dict(root=' '))
+        self.assertEqual(parse(xml), dict(root=None))
         self.assertEqual(parse(xml, strip_whitespace=False),
                          dict(root=' '))
 

+ 2 - 2
contrib/python/xmltodict/py3/xmltodict.py

@@ -14,7 +14,7 @@ if tuple(map(int, platform.python_version_tuple()[:2])) < (3, 7):
 from inspect import isgenerator
 
 __author__ = 'Martin Blech'
-__version__ = '0.14.0'
+__version__ = "0.14.2"
 __license__ = 'MIT'
 
 
@@ -123,7 +123,7 @@ class _DictSAXHandler:
                     else self.cdata_separator.join(self.data))
             item = self.item
             self.item, self.data = self.stack.pop()
-            if self.strip_whitespace and data and item:
+            if self.strip_whitespace and data:
                 data = data.strip() or None
             if data and self.force_cdata and item is None:
                 item = self.dict_constructor()

+ 1 - 1
contrib/python/xmltodict/py3/ya.make

@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.14.0)
+VERSION(0.14.2)
 
 LICENSE(MIT)