Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-jupyter-core for 
openSUSE:Factory checked in at 2022-03-14 19:35:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-core (Old)
 and      /work/SRC/openSUSE:Factory/.python-jupyter-core.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jupyter-core"

Mon Mar 14 19:35:17 2022 rev:10 rq:961398 version:4.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jupyter-core/python-jupyter-core.changes  
2021-11-15 15:27:44.469846028 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jupyter-core.new.25692/python-jupyter-core.changes
       2022-03-14 19:37:06.518129423 +0100
@@ -1,0 +2,10 @@
+Sun Mar 13 06:59:34 UTC 2022 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 4.9.2
+  * set proper sys.argv[0] for subcommand by @bnavigator in #248
+  * Add explicit encoding in open calls by @dlukes in #249
+  * jupyter_config_dir - reorder home_dir initialization by
+    @dharmaquark in #251 
+- Drop argv0_subcommand.patch merged upstream
+
+-------------------------------------------------------------------

Old:
----
  argv0_subcommand.patch
  jupyter_core-4.9.1.tar.gz

New:
----
  jupyter_core-4.9.2.tar.gz

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

Other differences:
------------------
++++++ python-jupyter-core.spec ++++++
--- /var/tmp/diff_new_pack.26WsES/_old  2022-03-14 19:37:06.934129921 +0100
+++ /var/tmp/diff_new_pack.26WsES/_new  2022-03-14 19:37:06.942129931 +0100
@@ -1,7 +1,7 @@
 #
 # spec file
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,10 +31,10 @@
 %define psuffix %{nil}
 %bcond_with test
 %endif
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?!python_module:%define python_module() python3-%{**}}
 %define skip_python2 1
 Name:           python-jupyter-core%{psuffix}
-Version:        4.9.1
+Version:        4.9.2
 Release:        0
 Summary:        Base package on which Jupyter projects rely
 License:        BSD-3-Clause
@@ -42,8 +42,6 @@
 Source0:        
https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
 # PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy 
to replace at build time
 Patch0:         use_rpms_paths.patch
-# PATCH-FIX-UPSTREAM argv0_subcommand.patch -- gh#jupyter/jupyter_core#248, 
merged after the release of 4.9.1
-Patch1:         argv0_subcommand.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module traitlets}
 BuildRequires:  fdupes

++++++ jupyter_core-4.9.1.tar.gz -> jupyter_core-4.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/PKG-INFO 
new/jupyter_core-4.9.2/PKG-INFO
--- old/jupyter_core-4.9.1/PKG-INFO     2021-10-28 06:00:18.573315600 +0200
+++ new/jupyter_core-4.9.2/PKG-INFO     2022-02-15 23:34:31.406066400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyter_core
-Version: 4.9.1
+Version: 4.9.2
 Summary: Jupyter core package. A base package on which Jupyter projects rely.
 Home-page: https://jupyter.org
 Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/application.py 
new/jupyter_core-4.9.2/jupyter_core/application.py
--- old/jupyter_core-4.9.1/jupyter_core/application.py  2021-10-26 
22:39:23.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/application.py  2022-02-15 
23:33:11.000000000 +0100
@@ -147,7 +147,7 @@
             config_text = config_text.decode('utf8')
         print("Writing default config to: %s" % config_file)
         ensure_dir_exists(os.path.abspath(os.path.dirname(config_file)), 0o700)
-        with open(config_file, mode='w') as f:
+        with open(config_file, mode='w', encoding='utf-8') as f:
             f.write(config_text)
     
     def migrate_config(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/command.py 
new/jupyter_core-4.9.2/jupyter_core/command.py
--- old/jupyter_core-4.9.1/jupyter_core/command.py      2021-10-26 
22:56:59.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/command.py      2022-02-15 
23:33:11.000000000 +0100
@@ -303,7 +303,7 @@
         sys.exit(e)
 
     try:
-        _execvp(command, sys.argv[1:])
+        _execvp(command, [command] + sys.argv[2:])
     except OSError as e:
         sys.exit("Error executing Jupyter command %r: %s" % (subcommand, e))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/migrate.py 
new/jupyter_core-4.9.2/jupyter_core/migrate.py
--- old/jupyter_core-4.9.1/jupyter_core/migrate.py      2021-10-26 
22:39:23.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/migrate.py      2022-02-15 
23:33:11.000000000 +0100
@@ -109,11 +109,11 @@
     ensure_dir_exists(os.path.dirname(dst))
     shutil.copy(src, dst)
     if substitutions:
-        with open(dst) as f:
+        with open(dst, encoding='utf-8') as f:
             text = f.read()
         for pat, replacement in substitutions.items():
             text = pat.sub(replacement, text)
-        with open(dst, 'w') as f:
+        with open(dst, 'w', encoding='utf-8') as f:
             f.write(text)
     return True
 
@@ -146,7 +146,7 @@
     # check if custom_js is empty:
     custom_js_empty = True
     if os.path.isfile(custom_js):
-        with open(custom_js) as f:
+        with open(custom_js, encoding='utf-8') as f:
             js = f.read().strip()
             for line in js.splitlines():
                 if not (
@@ -159,7 +159,7 @@
     # check if custom_css is empty:
     custom_css_empty = True
     if os.path.isfile(custom_css):
-        with open(custom_css) as f:
+        with open(custom_css, encoding='utf-8') as f:
             css = f.read().strip()
             custom_css_empty = css.startswith('/*') and css.endswith('*/')
     
@@ -242,7 +242,7 @@
     
     # write a marker to avoid re-running migration checks
     ensure_dir_exists(env['jupyter_config'])
-    with open(os.path.join(env['jupyter_config'], 'migrated'), 'w') as f:
+    with open(os.path.join(env['jupyter_config'], 'migrated'), 'w', 
encoding='utf-8') as f:
         f.write(datetime.utcnow().isoformat())
     
     return migrated
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/paths.py 
new/jupyter_core-4.9.2/jupyter_core/paths.py
--- old/jupyter_core-4.9.1/jupyter_core/paths.py        2021-10-27 
21:17:42.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/paths.py        2022-02-15 
23:33:11.000000000 +0100
@@ -62,14 +62,13 @@
     """
 
     env = os.environ
-    home_dir = get_home_dir()
-
     if env.get('JUPYTER_NO_CONFIG'):
         return _mkdtemp_once('jupyter-clean-cfg')
 
     if env.get('JUPYTER_CONFIG_DIR'):
         return env['JUPYTER_CONFIG_DIR']
 
+    home_dir = get_home_dir()
     return pjoin(home_dir, '.jupyter')
 
 
@@ -877,6 +876,7 @@
         Indicates that the file is binary
     """
     mode = 'wb' if binary else 'w'
+    encoding = None if binary else 'utf-8'
     open_flag = os.O_CREAT | os.O_WRONLY | os.O_TRUNC
     try:
         os.remove(fname)
@@ -898,7 +898,7 @@
             open_flag = os.O_WRONLY | os.O_TRUNC
             win32_restrict_file_to_user(fname)
 
-    with os.fdopen(os.open(fname, open_flag, 0o0600), mode) as f:
+    with os.fdopen(os.open(fname, open_flag, 0o0600), mode, encoding=encoding) 
as f:
         if os.name != 'nt':
             # Enforce that the file got the requested permissions before 
writing
             file_mode = get_file_mode(fname)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter_core-4.9.1/jupyter_core/tests/test_application.py 
new/jupyter_core-4.9.2/jupyter_core/tests/test_application.py
--- old/jupyter_core-4.9.1/jupyter_core/tests/test_application.py       
2021-10-26 22:39:23.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/tests/test_application.py       
2022-02-15 23:33:11.000000000 +0100
@@ -33,7 +33,7 @@
     app = DummyApp()
     td = mkdtemp()
     fname = pjoin(td, 'config.py')
-    with open(fname, 'w') as f:
+    with open(fname, 'w', encoding='utf-8') as f:
         f.write(_dummy_config)
     app.initialize(['--config', fname])
     shutil.rmtree(td)
@@ -44,7 +44,7 @@
     app = DummyApp()
     td = mkdtemp()
     fname = pjoin(td, 'config.py')
-    with open(fname, 'w') as f:
+    with open(fname, 'w', encoding='utf-8') as f:
         f.write(_dummy_config)
     app.initialize(['--config', fname, '--DummyApp.n=20'])
     shutil.rmtree(td)
@@ -66,7 +66,7 @@
 def test_load_config():
     config_dir = mkdtemp()
     wd = mkdtemp()
-    with open(pjoin(config_dir, 'dummy_app_config.py'), 'w') as f:
+    with open(pjoin(config_dir, 'dummy_app_config.py'), 'w', encoding='utf-8') 
as f:
         f.write('c.DummyApp.m = 1\n')
         f.write('c.DummyApp.n = 1')
     with patch.object(os, 'getcwd', lambda : wd):
@@ -75,7 +75,7 @@
 
     assert app.n == 1, "Loaded config from config dir"
     
-    with open(pjoin(wd, 'dummy_app_config.py'), 'w') as f:
+    with open(pjoin(wd, 'dummy_app_config.py'), 'w', encoding='utf-8') as f:
         f.write('c.DummyApp.n = 2')
 
     with patch.object(os, 'getcwd', lambda : wd):
@@ -92,7 +92,7 @@
 def test_load_bad_config():
     config_dir = mkdtemp()
     wd = mkdtemp()
-    with open(pjoin(config_dir, 'dummy_app_config.py'), 'w') as f:
+    with open(pjoin(config_dir, 'dummy_app_config.py'), 'w', encoding='utf-8') 
as f:
         f.write('c.DummyApp.m = "a\n') # Syntax error
     with patch.object(os, 'getcwd', lambda : wd):
         with pytest.raises(SyntaxError):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter_core-4.9.1/jupyter_core/tests/test_command.py 
new/jupyter_core-4.9.2/jupyter_core/tests/test_command.py
--- old/jupyter_core-4.9.1/jupyter_core/tests/test_command.py   2021-10-26 
22:56:59.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/tests/test_command.py   2022-02-15 
23:33:11.000000000 +0100
@@ -201,3 +201,27 @@
         env[str('PATHEXT')] = '.EXE'
     out = check_output([sys.executable, str(jupyter), 'witness'], env=env)
     assert b'WITNESS A' in out
+
+def test_argv0(tmpdir):
+    a = tmpdir.mkdir("a")
+    jupyter = a.join('jupyter')
+    jupyter.write(
+        'from jupyter_core import command; command.main()'
+    )
+    jupyter.chmod(0o700)
+    witness_a = a.join('jupyter-witness')
+    witness_a_src = f'''#!{sys.executable}
+import sys
+print(sys.argv[0])
+'''
+    write_executable(witness_a, witness_a_src)
+
+    env = {}
+    if 'SYSTEMROOT' in os.environ:  # Windows http://bugs.python.org/issue20614
+        env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT']
+    if sys.platform == 'win32':
+        env[str('PATHEXT')] = '.EXE'
+    out = check_output([sys.executable, str(jupyter), 'witness'], env=env)
+
+    # Make sure the first argv is the full path to the executing script
+    assert f'{jupyter}-witness'.encode() in out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter_core-4.9.1/jupyter_core/tests/test_migrate.py 
new/jupyter_core-4.9.2/jupyter_core/tests/test_migrate.py
--- old/jupyter_core-4.9.1/jupyter_core/tests/test_migrate.py   2021-10-26 
22:39:23.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/tests/test_migrate.py   2022-02-15 
23:33:11.000000000 +0100
@@ -57,7 +57,7 @@
 
 def touch(path, content=''):
     ensure_dir_exists(os.path.dirname(path))
-    with open(path, 'w') as f:
+    with open(path, 'w', encoding='utf-8') as f:
         f.write(content)
 
 
@@ -65,10 +65,10 @@
     """Verify that two files match"""
     
     assert os.path.exists(b)
-    with open(a) as f:
+    with open(a, encoding='utf-8') as f:
         a_txt = f.read()
     
-    with open(b) as f:
+    with open(b, encoding='utf-8') as f:
         b_txt = f.read()
     
     assert a_txt == b_txt
@@ -166,7 +166,7 @@
         'jupyter_test_config.py',
     ]
     
-    with open(pjoin(jpy, 'jupyter_test_config.py')) as f:
+    with open(pjoin(jpy, 'jupyter_test_config.py'), encoding='utf-8') as f:
         text = f.read()
     assert text == 'c.Replaced.trait = 5\n'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/tests/test_paths.py 
new/jupyter_core-4.9.2/jupyter_core/tests/test_paths.py
--- old/jupyter_core-4.9.1/jupyter_core/tests/test_paths.py     2021-10-26 
22:56:59.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/tests/test_paths.py     2022-02-15 
23:33:11.000000000 +0100
@@ -396,7 +396,7 @@
         with secure_write(fname) as f:
             f.write('test 1')
         check_user_only_permissions(fname)
-        with open(fname, 'r') as f:
+        with open(fname, 'r', encoding='utf-8') as f:
             assert f.read() == 'test 1'
     finally:
         shutil.rmtree(directory)
@@ -411,7 +411,7 @@
             f.write('test 1')
         mode = os.stat(fname).st_mode
         assert 0o0600 == (stat.S_IMODE(mode) & 0o7677)  # tolerate 
owner-execute bit
-        with open(fname, 'r') as f:
+        with open(fname, 'r', encoding='utf-8') as f:
             assert f.read() == 'test 1'
 
         # Try changing file permissions ahead of time
@@ -420,7 +420,7 @@
             f.write('test 2')
         mode = os.stat(fname).st_mode
         assert 0o0600 == (stat.S_IMODE(mode) & 0o7677)  # tolerate 
owner-execute bit
-        with open(fname, 'r') as f:
+        with open(fname, 'r', encoding='utf-8') as f:
             assert f.read() == 'test 2'
     finally:
         shutil.rmtree(directory)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core/version.py 
new/jupyter_core-4.9.2/jupyter_core/version.py
--- old/jupyter_core-4.9.1/jupyter_core/version.py      2021-10-28 
05:59:44.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core/version.py      2022-02-15 
23:34:09.000000000 +0100
@@ -11,7 +11,7 @@
     'serial'
 ])
 
-version_info = VersionInfo(4, 9, 1, 'final', 0)
+version_info = VersionInfo(4, 9, 2, 'final', 0)
 
 _specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': '', 
'dev': 'dev'}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter_core-4.9.1/jupyter_core.egg-info/PKG-INFO 
new/jupyter_core-4.9.2/jupyter_core.egg-info/PKG-INFO
--- old/jupyter_core-4.9.1/jupyter_core.egg-info/PKG-INFO       2021-10-28 
06:00:18.000000000 +0200
+++ new/jupyter_core-4.9.2/jupyter_core.egg-info/PKG-INFO       2022-02-15 
23:34:31.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyter-core
-Version: 4.9.1
+Version: 4.9.2
 Summary: Jupyter core package. A base package on which Jupyter projects rely.
 Home-page: https://jupyter.org
 Author: Jupyter Development Team

Reply via email to