Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-python-multipart for
openSUSE:Factory checked in at 2022-12-13 18:55:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-multipart (Old)
and /work/SRC/openSUSE:Factory/.python-python-multipart.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-multipart"
Tue Dec 13 18:55:19 2022 rev:4 rq:1042468 version:0.0.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-multipart/python-python-multipart.changes
2022-04-10 00:41:56.597087816 +0200
+++
/work/SRC/openSUSE:Factory/.python-python-multipart.new.1835/python-python-multipart.changes
2022-12-13 18:55:35.151241223 +0100
@@ -1,0 +2,8 @@
+Mon Dec 12 16:51:23 UTC 2022 - [email protected]
+
+- do not require six
+- added patches
+ fix
https://github.com/andrew-d/python-multipart/commit/c54ad6006bacc77623864ec8e5c96bfd32230e01
+ + python-python-multipart-no-six.patch
+
+-------------------------------------------------------------------
New:
----
python-python-multipart-no-six.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-multipart.spec ++++++
--- /var/tmp/diff_new_pack.dNLsMl/_old 2022-12-13 18:55:35.719244254 +0100
+++ /var/tmp/diff_new_pack.dNLsMl/_new 2022-12-13 18:55:35.723244276 +0100
@@ -16,8 +16,6 @@
#
-%{?!python_module:%define python_module() python3-%{**}}
-%define skip_python2 1
Name: python-python-multipart
Version: 0.0.5
Release: 0
@@ -27,7 +25,10 @@
Source:
https://files.pythonhosted.org/packages/source/p/python-multipart/python-multipart-%{version}.tar.gz
Patch0: support-pyyaml-6.patch
#
https://github.com/andrew-d/python-multipart/commit/8cff1aac7479fbb69087e355f66315b21640bab0
+#
https://github.com/andrew-d/python-multipart/commit/2c7e95c7236fcecdb5660823936403d1359fdb85
Patch1: python-python-multipart-no-mock.patch
+#
https://github.com/andrew-d/python-multipart/commit/c54ad6006bacc77623864ec8e5c96bfd32230e01
+Patch2: python-python-multipart-no-six.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
@@ -60,6 +61,7 @@
%files %{python_files}
%doc README.rst
%license LICENSE.txt
-%{python_sitelib}/*
+%{python_sitelib}/multipart
+%{python_sitelib}/python_multipart-*.egg-info
%changelog
++++++ python-python-multipart-no-six.patch ++++++
Index: python-multipart-0.0.5/multipart/multipart.py
===================================================================
--- python-multipart-0.0.5.orig/multipart/multipart.py
+++ python-multipart-0.0.5/multipart/multipart.py
@@ -1,11 +1,5 @@
from __future__ import with_statement, absolute_import, print_function
-from six import (
- binary_type,
- text_type,
- PY3,
-)
-
from .decoders import *
from .exceptions import *
@@ -74,14 +68,9 @@ NULL = b'\x00'[0]
# str on Py2, and bytes on Py3. Same with getting the ordinal value of a byte,
# and joining a list of bytes together.
# These functions abstract that.
-if PY3: # pragma: no cover
- lower_char = lambda c: c | 0x20
- ord_char = lambda c: c
- join_bytes = lambda b: bytes(list(b))
-else: # pragma: no cover
- lower_char = lambda c: c.lower()
- ord_char = lambda c: ord(c)
- join_bytes = lambda b: b''.join(list(b))
+lower_char = lambda c: c | 0x20
+ord_char = lambda c: c
+join_bytes = lambda b: bytes(list(b))
# These are regexes for parsing header values.
SPECIAL_CHARS = re.escape(b'()<>@,;:\\"/[]?={} \t')
@@ -104,7 +93,7 @@ def parse_options_header(value):
# If we are passed a string, we assume that it conforms to WSGI and does
# not contain any code point that's not in latin-1.
- if isinstance(value, text_type): # pragma: no cover
+ if isinstance(value, str): # pragma: no cover
value = value.encode('latin-1')
# If we have no options, return the string as-is.
@@ -454,13 +443,13 @@ class File(object):
options = {}
if keep_extensions:
ext = self._ext
- if isinstance(ext, binary_type):
+ if isinstance(ext, bytes):
ext = ext.decode(sys.getfilesystemencoding())
options['suffix'] = ext
if file_dir is not None:
d = file_dir
- if isinstance(d, binary_type):
+ if isinstance(d, bytes):
d = d.decode(sys.getfilesystemencoding())
options['dir'] = d
@@ -478,7 +467,7 @@ class File(object):
fname = tmp_file.name
# Encode filename as bytes.
- if isinstance(fname, text_type):
+ if isinstance(fname, str):
fname = fname.encode(sys.getfilesystemencoding())
self._actual_file_name = fname
@@ -1037,7 +1026,7 @@ class MultipartParser(BaseParser):
# self.skip = tuple(skip)
# Save our boundary.
- if isinstance(boundary, text_type): # pragma: no cover
+ if isinstance(boundary, str): # pragma: no cover
boundary = boundary.encode('latin-1')
self.boundary = b'\r\n--' + boundary
Index: python-multipart-0.0.5/multipart/tests/test_multipart.py
===================================================================
--- python-multipart-0.0.5.orig/multipart/tests/test_multipart.py
+++ python-multipart-0.0.5/multipart/tests/test_multipart.py
@@ -14,7 +14,6 @@ from .compat import (
unittest,
)
from io import BytesIO
-from six import binary_type, text_type
try:
from unittest.mock import MagicMock, Mock, patch
@@ -29,7 +28,7 @@ curr_dir = os.path.abspath(os.path.dirna
def force_bytes(val):
- if isinstance(val, text_type):
+ if isinstance(val, str):
val = val.encode(sys.getfilesystemencoding())
return val
@@ -799,7 +798,7 @@ class TestFormParser(unittest.TestCase):
def test_http(self, param):
# Firstly, create our parser with the given boundary.
boundary = param['result']['boundary']
- if isinstance(boundary, text_type):
+ if isinstance(boundary, str):
boundary = boundary.encode('latin-1')
self.make(boundary)
Index: python-multipart-0.0.5/multipart/exceptions.py
===================================================================
--- python-multipart-0.0.5.orig/multipart/exceptions.py
+++ python-multipart-0.0.5/multipart/exceptions.py
@@ -1,7 +1,5 @@
import binascii
-from six import PY3
-
class FormParserError(ValueError):
"""Base error class for our form parser."""
@@ -52,7 +50,4 @@ else: # pragma
# We check which version of Python we're on to figure out what error we need
# to catch for invalid Base64.
-if PY3: # pragma: no cover
Base64Error = binascii.Error
-else: # pragma: no cover
- Base64Error = TypeError