Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nodeenv for openSUSE:Factory 
checked in at 2023-12-20 21:02:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nodeenv (Old)
 and      /work/SRC/openSUSE:Factory/.python-nodeenv.new.9037 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nodeenv"

Wed Dec 20 21:02:20 2023 rev:10 rq:1134138 version:1.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nodeenv/python-nodeenv.changes    
2023-11-23 21:44:01.958970867 +0100
+++ /work/SRC/openSUSE:Factory/.python-nodeenv.new.9037/python-nodeenv.changes  
2023-12-20 21:02:38.751317098 +0100
@@ -1,0 +2,14 @@
+Wed Dec 20 07:11:46 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 1.8.0:
+  * Changes:
+  * #312
+  * #313
+  * #317
+  * #320
+  * #327
+  * #329
+  * #330
+- drop python-nodeenv-no-mock.patch (obsolete)
+
+-------------------------------------------------------------------

Old:
----
  nodeenv-1.7.0.tar.gz
  python-nodeenv-no-mock.patch

New:
----
  nodeenv-1.8.0.tar.gz

BETA DEBUG BEGIN:
  Old:  * #330
- drop python-nodeenv-no-mock.patch (obsolete)
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-nodeenv.spec ++++++
--- /var/tmp/diff_new_pack.uD5kJl/_old  2023-12-20 21:02:40.331374581 +0100
+++ /var/tmp/diff_new_pack.uD5kJl/_new  2023-12-20 21:02:40.347375163 +0100
@@ -15,24 +15,23 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %{?sle15allpythons}
 
 Name:           python-nodeenv
-Version:        1.7.0
+Version:        1.8.0
 Release:        0
 Summary:        Nodejs virtual environment builder
 License:        BSD-2-Clause
 URL:            https://github.com/ekalinin/nodeenv
 Source:         
https://github.com/ekalinin/nodeenv/archive/%{version}.tar.gz#/nodeenv-%{version}.tar.gz
-# https://github.com/ekalinin/nodeenv/issues/302
-Patch0:         python-nodeenv-no-mock.patch
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-setuptools
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 %python_subpackages
 
@@ -40,8 +39,7 @@
 Node.js virtual environment builder.
 
 %prep
-%setup -q -n nodeenv-%{version}
-%patch0 -p1
+%autosetup -p1 -n nodeenv-%{version}
 
 %build
 %python_build

++++++ nodeenv-1.7.0.tar.gz -> nodeenv-1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/.github/workflows/main.yml 
new/nodeenv-1.8.0/.github/workflows/main.yml
--- old/nodeenv-1.7.0/.github/workflows/main.yml        2022-06-25 
17:33:28.000000000 +0200
+++ new/nodeenv-1.8.0/.github/workflows/main.yml        2023-05-12 
10:01:49.000000000 +0200
@@ -12,18 +12,20 @@
     runs-on: ubuntu-20.04
 
     strategy:
+      fail-fast: false
       matrix:
         python-version:
-        - 2.7
-        - 3.7
-        - 3.8
-        - 3.9
+        - '2.7'
+        - '3.7'
+        - '3.8'
+        - '3.9'
         - '3.10'
+        - '3.11'
 
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
 
-    - uses: actions/setup-python@v2
+    - uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
 
@@ -38,7 +40,7 @@
         TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') tox
 
     - name: Upload coverage data
-      uses: actions/upload-artifact@v2
+      uses: actions/upload-artifact@v3
       with:
         name: coverage-data
         path: '.coverage.*'
@@ -48,9 +50,9 @@
     runs-on: ubuntu-20.04
     needs: tests
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
 
-      - uses: actions/setup-python@v2
+      - uses: actions/setup-python@v4
         with:
           python-version: '3.10'
 
@@ -58,7 +60,7 @@
         run: python -m pip install --upgrade coverage[toml]
 
       - name: Download data
-        uses: actions/download-artifact@v2
+        uses: actions/download-artifact@v3
         with:
           name: coverage-data
 
@@ -70,7 +72,7 @@
 
       - name: Upload HTML report
         if: ${{ failure() }}
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         with:
           name: html-report
           path: htmlcov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/AUTHORS new/nodeenv-1.8.0/AUTHORS
--- old/nodeenv-1.7.0/AUTHORS   2022-06-25 17:33:28.000000000 +0200
+++ new/nodeenv-1.8.0/AUTHORS   2023-05-12 10:01:49.000000000 +0200
@@ -11,6 +11,7 @@
 -  Kyle P Davis
 -  Kefu Chai
 -  Elias Kunnas
+-  Avimitin
 -  Adam Johnson
 -  Pierre Le Marre
 -  Eashwar Ranganathan
@@ -28,6 +29,7 @@
 -  Jon Winn
 -  Duncan Bellamy
 -  Dennis Flanigan
+-  Christian Clauss
 -  Chris Beaven
 -  Cerem Cem ASLAN
 -  Bruno Oliveira
@@ -36,6 +38,7 @@
 -  Alex Couper
 -  0Xellos
 -  zjeuhpiung liu
+-  zbw
 -  urbandove
 -  sam
 -  rely10
@@ -54,6 +57,7 @@
 -  Vincent Bernat
 -  Uman Shahzad
 -  Tom Whitwell
+-  Tom Parker-Shemilt
 -  Tim Gates
 -  Thomas Bechtold
 -  Terseus
@@ -76,8 +80,10 @@
 -  Joby Harding
 -  Jesse Dhillon
 -  Jeremy Banks
+-  Jelle van der Waa
 -  Geoffrey Huntley
 -  Fabricio C Zuardi
+-  Eashwar Ranganathan
 -  Duncan Bellamy
 -  Dennis Flanigan
 -  Dan North
@@ -85,6 +91,7 @@
 -  Damien Nozay
 -  Brian Jacobel
 -  Ben Davis
+-  Bastien Gérard
 -  Augusto Andreoli
 -  Andreas Wirooks
 -  Alexey Poryadin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/nodeenv.py new/nodeenv-1.8.0/nodeenv.py
--- old/nodeenv-1.7.0/nodeenv.py        2022-06-25 17:33:28.000000000 +0200
+++ new/nodeenv-1.8.0/nodeenv.py        2023-05-12 10:01:49.000000000 +0200
@@ -47,7 +47,7 @@
 
 from pkg_resources import parse_version
 
-nodeenv_version = '1.7.0'
+nodeenv_version = '1.8.0'
 
 join = os.path.join
 abspath = os.path.abspath
@@ -530,6 +530,10 @@
     return sysconfig.get_config_var('HOST_GNU_TYPE') == 'x86_64-pc-linux-musl'
 
 
+def is_riscv64():
+    return platform.machine() == 'riscv64'
+
+
 def get_node_bin_url(version):
     archmap = {
         'x86':    'x86',  # Windows Vista 32
@@ -547,6 +551,7 @@
         'armv8.4': 'arm64',
         'ppc64le': 'ppc64le',   # Power PC
         's390x': 's390x',       # IBM S390x
+        'riscv64': 'riscv64',   # RISCV 64
     }
     sysinfo = {
         'system': platform.system().lower(),
@@ -577,17 +582,28 @@
         tf.close()
 
 
+def _download_node_file(node_url, n_attempt=3):
+    """Do multiple attempts to avoid incomplete data in case
+    of unstable network"""
+    while n_attempt > 0:
+        try:
+            return io.BytesIO(urlopen(node_url).read())
+        except IncompleteRead as e:
+            logger.warning(
+                'Incomplete read while reading'
+                'from {} - {}'.format(node_url, e)
+            )
+            n_attempt -= 1
+            if n_attempt == 0:
+                raise e
+
+
 def download_node_src(node_url, src_dir, args):
     """
     Download source code
     """
     logger.info('.', extra=dict(continued=True))
-    try:
-        dl_contents = io.BytesIO(urlopen(node_url).read())
-    except IncompleteRead as e:
-        logger.warning('Incomplete read while reading'
-                       'from {}'.format(node_url))
-        dl_contents = e.partial
+    dl_contents = _download_node_file(node_url)
     logger.info('.', extra=dict(continued=True))
 
     if is_WIN or is_CYGWIN:
@@ -765,6 +781,8 @@
                 # if arm64 not found, try x64
                 download_node_src(node_url.replace('arm64', 'x64'),
                                   src_dir, args)
+            else:
+                logger.warning('Failed to download from %s' % node_url)
 
     logger.info('.', extra=dict(continued=True))
 
@@ -1082,7 +1100,7 @@
         else:
             src_domain = args.mirror
     # use unofficial builds only if musl and no explicitly chosen mirror
-    elif is_x86_64_musl():
+    elif is_x86_64_musl() or is_riscv64():
         src_domain = 'unofficial-builds.nodejs.org'
     else:
         src_domain = 'nodejs.org'
@@ -1397,10 +1415,13 @@
         # `fish_prompt` using `functions -e`.
         set -l fish_function_path
 
-        # Erase virtualenv's `fish_prompt` and restore the original.
-        functions -e fish_prompt
-        functions -c _node_old_fish_prompt fish_prompt
-        functions -e _node_old_fish_prompt
+        # Prevents error when using nested fish instances
+        if functions -q _node_old_fish_prompt
+            # Erase virtualenv's `fish_prompt` and restore the original.
+            functions -e fish_prompt
+            functions -c _node_old_fish_prompt fish_prompt
+            functions -e _node_old_fish_prompt
+        end
         set -e _OLD_NODE_FISH_PROMPT_OVERRIDE
     end
 
@@ -1492,7 +1513,7 @@
 
         # Restore the original $status
         echo "exit $old_status" | source
-        _old_fish_prompt
+        _node_old_fish_prompt
     end
 
     set -gx _OLD_NODE_FISH_PROMPT_OVERRIDE "$NODE_VIRTUAL_ENV"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/requirements-dev.txt 
new/nodeenv-1.8.0/requirements-dev.txt
--- old/nodeenv-1.7.0/requirements-dev.txt      2022-06-25 17:33:28.000000000 
+0200
+++ new/nodeenv-1.8.0/requirements-dev.txt      2023-05-12 10:01:49.000000000 
+0200
@@ -2,6 +2,6 @@
 
 coverage
 flake8
-mock
+mock; python_version < '3.3'
 pytest
-tox
\ No newline at end of file
+tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/tests/nodeenv_test.py 
new/nodeenv-1.8.0/tests/nodeenv_test.py
--- old/nodeenv-1.7.0/tests/nodeenv_test.py     2022-06-25 17:33:28.000000000 
+0200
+++ new/nodeenv-1.8.0/tests/nodeenv_test.py     2023-05-12 10:01:49.000000000 
+0200
@@ -6,12 +6,16 @@
 import subprocess
 import sys
 import sysconfig
+import platform
 
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import pytest
 
 import nodeenv
-
+from nodeenv import IncompleteRead
 
 HERE = os.path.abspath(os.path.dirname(__file__))
 
@@ -112,6 +116,8 @@
     # Check if running on musl system and delete last mirror if it is
     if sys_type in musl_type:
         urls.pop()
+    elif platform.machine() == "riscv64":
+        urls.pop()
     with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
         def rewind(_):
             f.seek(0)
@@ -140,3 +146,14 @@
 @pytest.mark.usefixtures('mock_index_json')
 def test_get_lts_node_version():
     assert nodeenv.get_last_lts_node_version() == '12.14.0'
+
+
+def test__download_node_file():
+    with mock.patch.object(nodeenv, 'urlopen') as m_urlopen:
+        m_urlopen.side_effect = IncompleteRead("dummy")
+        with pytest.raises(IncompleteRead):
+            nodeenv._download_node_file(
+                "https://dummy/nodejs.tar.gz";,
+                n_attempt=5
+            )
+        assert m_urlopen.call_count == 5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.7.0/tests/test_install_activate.py 
new/nodeenv-1.8.0/tests/test_install_activate.py
--- old/nodeenv-1.7.0/tests/test_install_activate.py    2022-06-25 
17:33:28.000000000 +0200
+++ new/nodeenv-1.8.0/tests/test_install_activate.py    2023-05-12 
10:01:49.000000000 +0200
@@ -1,7 +1,10 @@
 import sys
 import os
 
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import pytest
 
 import nodeenv

Reply via email to