Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-redfish for openSUSE:Factory 
checked in at 2022-06-18 22:06:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-redfish (Old)
 and      /work/SRC/openSUSE:Factory/.python-redfish.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-redfish"

Sat Jun 18 22:06:22 2022 rev:10 rq:983569 version:3.1.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-redfish/python-redfish.changes    
2022-04-13 21:05:47.388605442 +0200
+++ /work/SRC/openSUSE:Factory/.python-redfish.new.1548/python-redfish.changes  
2022-06-18 22:06:26.451677506 +0200
@@ -1,0 +2,7 @@
+Fri Jun 17 21:18:17 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to 3.1.6: 
+  * Fixed issue where the 'read' method on response objects always return 
strings
+  * Modified query parameter encoding to not percent-encode characters allowed 
in query strings per RFC3986
+
+-------------------------------------------------------------------

Old:
----
  redfish-3.1.5.tar.gz

New:
----
  redfish-3.1.6.tar.gz

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

Other differences:
------------------
++++++ python-redfish.spec ++++++
--- /var/tmp/diff_new_pack.bVCAtW/_old  2022-06-18 22:06:27.751679352 +0200
+++ /var/tmp/diff_new_pack.bVCAtW/_new  2022-06-18 22:06:27.759679364 +0200
@@ -19,7 +19,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-redfish
-Version:        3.1.5
+Version:        3.1.6
 Release:        0
 Summary:        Redfish Python Library
 License:        BSD-3-Clause

++++++ redfish-3.1.5.tar.gz -> redfish-3.1.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-redfish-library-3.1.5/.github/workflows/main.yml 
new/python-redfish-library-3.1.6/.github/workflows/main.yml
--- old/python-redfish-library-3.1.5/.github/workflows/main.yml 2022-04-01 
22:08:02.000000000 +0200
+++ new/python-redfish-library-3.1.6/.github/workflows/main.yml 2022-05-12 
17:33:30.000000000 +0200
@@ -1,13 +1,42 @@
 name: Release and Publish
 on:
-  release:
-    types: [published]
+  workflow_dispatch:
+    inputs:
+      version:
+        description: 'Version number'
+        required: true
+      changes_1:
+        description: 'Change entry'
+        required: true
+      changes_2:
+        description: 'Change entry'
+        required: false
+      changes_3:
+        description: 'Change entry'
+        required: false
+      changes_4:
+        description: 'Change entry'
+        required: false
+      changes_5:
+        description: 'Change entry'
+        required: false
+      changes_6:
+        description: 'Change entry'
+        required: false
+      changes_7:
+        description: 'Change entry'
+        required: false
+      changes_8:
+        description: 'Change entry'
+        required: false
 jobs:
-  push_to_registry:
-    name: Push package to pypi
+  release_build:
+    name: Build the release
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
+      with:
+        token: ${{secrets.GITHUB_TOKEN}}
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
@@ -16,7 +45,44 @@
       run: |
         python -m pip install --upgrade pip
         pip install setuptools wheel twine
-    - name: Build and publish
+    - name: Build the changelog text
+      run: |
+        echo 'CHANGES<<EOF' >> $GITHUB_ENV
+        echo "## [${{github.event.inputs.version}}] - $(date +'%Y-%m-%d')" >> 
$GITHUB_ENV
+        echo "- ${{github.event.inputs.changes_1}}" >> $GITHUB_ENV
+        if [[ -n "${{github.event.inputs.changes_2}}" ]]; then echo "- 
${{github.event.inputs.changes_2}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_3}}" ]]; then echo "- 
${{github.event.inputs.changes_3}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_4}}" ]]; then echo "- 
${{github.event.inputs.changes_4}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_5}}" ]]; then echo "- 
${{github.event.inputs.changes_5}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_6}}" ]]; then echo "- 
${{github.event.inputs.changes_6}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_7}}" ]]; then echo "- 
${{github.event.inputs.changes_7}}" >> $GITHUB_ENV; fi
+        if [[ -n "${{github.event.inputs.changes_8}}" ]]; then echo "- 
${{github.event.inputs.changes_8}}" >> $GITHUB_ENV; fi
+        echo 'EOF' >> $GITHUB_ENV
+    - name: Update version numbers
+      run: |
+        sed -i -E 's/      version=.+,/      
version='\'${{github.event.inputs.version}}\'',/' setup.py
+        sed -i -E 's/__version__ = .+/__version__ = 
"'${{github.event.inputs.version}}'"/' src/redfish/__init__.py
+    - name: Update the changelog
+      run: |
+        ex CHANGELOG.md <<eof
+        3 insert
+        $CHANGES
+        .
+        xit
+        eof
+    - name: Commit and push the updates
+      run: |
+        git config user.name "GitHub Release Workflow"
+        git config user.email "<>"
+        git add CHANGELOG.md setup.py src/redfish/__init__.py
+        git commit -s -m "${{github.event.inputs.version}} versioning"
+        git push origin master
+    - name: Make the release
+      env:
+        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+      run: |
+        gh release create ${{github.event.inputs.version}} -t 
${{github.event.inputs.version}} -n "Changes since last 
release:"$'\n\n'"$CHANGES"
+    - name: Build and publish to pypi
       env:
         TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
         TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/CHANGELOG.md 
new/python-redfish-library-3.1.6/CHANGELOG.md
--- old/python-redfish-library-3.1.5/CHANGELOG.md       2022-04-01 
22:08:02.000000000 +0200
+++ new/python-redfish-library-3.1.6/CHANGELOG.md       2022-05-12 
17:33:30.000000000 +0200
@@ -1,5 +1,8 @@
 # Change Log
 
+## [3.1.6] - 2022-05-12
+- Fixed issue where the 'read' method on response objects always return 
strings 
+- Modified query parameter encoding to not percent-encode characters allowed 
in query strings per RFC3986
 ## [3.1.5] - 2022-04-01
 - Added methods for specifying proxies directly with a new 'proxies' parameter
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/README.rst 
new/python-redfish-library-3.1.6/README.rst
--- old/python-redfish-library-3.1.5/README.rst 2022-04-01 22:08:02.000000000 
+0200
+++ new/python-redfish-library-3.1.6/README.rst 2022-05-12 17:33:30.000000000 
+0200
@@ -187,13 +187,11 @@
 Release Process
 ---------------
 
-Run the ``release.sh`` script to publish a new version.
-
-.. code-block:: shell
-
-    sh release.sh <NewVersion>
-
-Enter the release notes when prompted; an empty line signifies no more notes 
to add.
+1. Go to the "Actions" page
+2. Select the "Release and Publish" workflow
+3. Click "Run workflow"
+4. Fill out the form
+5. Click "Run workflow"
 
 Copyright and License
 ---------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/release.sh 
new/python-redfish-library-3.1.6/release.sh
--- old/python-redfish-library-3.1.5/release.sh 2022-04-01 22:08:02.000000000 
+0200
+++ new/python-redfish-library-3.1.6/release.sh 1970-01-01 01:00:00.000000000 
+0100
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# Collect change log info
-CHANGES="## [$1] - $(date +'%Y-%m-%d')"$'\n'
-echo "Enter changes:"
-while : ; do
-    read CHANGE
-    if [ "$CHANGE" = "" ]; then
-        break
-    fi
-
-    CHANGES="$CHANGES- $CHANGE"$'\n'
-done
-
-# Rebase
-git checkout master
-git fetch && git rebase origin
-
-# Update the version number in setup.py and src/redfish/__init__.py
-sed -i -E 's/      version=.+,/      version='\'$1\'',/' setup.py
-sed -i -E 's/__version__ = .+/__version__ = "'$1'"/' src/redfish/__init__.py
-
-# Update the change log file
-ex CHANGELOG.md <<eof
-3 insert
-$CHANGES
-.
-xit
-eof
-
-# Commit and push changes
-git add CHANGELOG.md setup.py src/redfish/__init__.py
-git commit -s -m "$1 versioning"
-git push origin master
-
-# Make new release in GitHub
-CHANGES="Changes since last release:"$'\n\n'"$CHANGES"
-gh release create $1 -n "$CHANGES"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/setup.py 
new/python-redfish-library-3.1.6/setup.py
--- old/python-redfish-library-3.1.5/setup.py   2022-04-01 22:08:02.000000000 
+0200
+++ new/python-redfish-library-3.1.6/setup.py   2022-05-12 17:33:30.000000000 
+0200
@@ -12,7 +12,7 @@
     long_description = f.read()
 
 setup(name='redfish',
-      version='3.1.5',
+      version='3.1.6',
       description='Redfish Python Library',
       long_description=long_description,
       long_description_content_type='text/x-rst',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/src/redfish/__init__.py 
new/python-redfish-library-3.1.6/src/redfish/__init__.py
--- old/python-redfish-library-3.1.5/src/redfish/__init__.py    2022-04-01 
22:08:02.000000000 +0200
+++ new/python-redfish-library-3.1.6/src/redfish/__init__.py    2022-05-12 
17:33:30.000000000 +0200
@@ -6,7 +6,7 @@
 """ Redfish restful library """
 
 __all__ = ['rest', 'ris', 'discovery']
-__version__ = "3.1.5"
+__version__ = "3.1.6"
 
 from redfish.rest.v1 import redfish_client
 from redfish.rest.v1 import AuthMethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-3.1.5/src/redfish/rest/v1.py 
new/python-redfish-library-3.1.6/src/redfish/rest/v1.py
--- old/python-redfish-library-3.1.5/src/redfish/rest/v1.py     2022-04-01 
22:08:02.000000000 +0200
+++ new/python-redfish-library-3.1.6/src/redfish/rest/v1.py     2022-05-12 
17:33:30.000000000 +0200
@@ -165,14 +165,16 @@
         self._http_response = http_response
 
         if http_response is not None:
-            self._read = http_response.text
+            self._read = http_response.content
             self._status = http_response.status_code
 
     @property
     def read(self):
-        """Wrapper around httpresponse.read()"""
+        """Property for accessing raw content as an array of bytes (unless 
overridden)
 
-        # Backwards compatibility: for requests, we can simply use "text"; 
need to see if there are external dependencies to continue using read
+        TODO: Need to review usage elsewhwere; by default _read is an array of 
bytes, but applying a new value with a
+        setter routine will make it a string.  We might want to consider 
deprecating the setters.
+        """
         return self._read
 
     @read.setter
@@ -219,7 +221,11 @@
     @property
     def text(self):
         """Property for accessing the data as an unparsed string"""
-        return self.read
+        if isinstance(self.read, str):
+            value = self.read
+        else:
+            value = self.read.decode("utf-8", "ignore")
+        return value
 
     @text.setter
     def text(self, value):
@@ -235,10 +241,10 @@
     def dict(self):
         """Property for accessing the data as an dict"""
         try:
-            return json.loads(self.read)
+            return json.loads(self.text)
         except:
             str = "Service responded with invalid JSON at URI {}\n{}".format(
-                self._rest_request.path, self.read)
+                self._rest_request.path, self.text)
             LOGGER.error(str)
             raise JsonDecodingError(str) from None
 
@@ -794,6 +800,7 @@
                     LOGGER.error('Error occur while compressing body: %s', 
excp)
                     raise
 
+        query_str = None
         if args:
             if method == 'GET':
                 # Workaround for this: 
https://github.com/psf/requests/issues/993
@@ -805,12 +812,12 @@
                         none_list.append(query)
                     else:
                         args_copy[query] = args[query]
-                reqpath += '?' + urlencode(args_copy, quote_via=quote)
+                query_str = urlencode(args_copy, quote_via=quote, 
safe="/?:!$'()*+,;\\=")
                 for query in none_list:
-                    if reqpath[-1] == '?':
-                        reqpath += query
+                    if len(query_str) == 0:
+                        query_str += query
                     else:
-                        reqpath += '&' + query
+                        query_str += '&' + query
             elif method == 'PUT' or method == 'POST' or method == 'PATCH':
                 LOGGER.warning('For POST, PUT and PATCH methods, the provided 
"args" parameter "{}" is ignored.'
                                .format(args))
@@ -851,7 +858,7 @@
                     verify = self.cafile
                 resp = self._session.request(method.upper(), 
"{}{}".format(self.__base_url, reqpath), data=body,
                                              headers=headers, 
timeout=self._timeout, allow_redirects=allow_redirects,
-                                             verify=verify, 
proxies=self._proxies)
+                                             verify=verify, 
proxies=self._proxies, params=query_str)
 
                 if sys.version_info < (3, 3):
                     endtime = time.clock()

Reply via email to