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 2023-07-04 15:22:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-core (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter-core.new.23466 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter-core"
Tue Jul 4 15:22:01 2023 rev:18 rq:1096306 version:5.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jupyter-core/python-jupyter-core.changes
2023-03-22 22:28:43.429614105 +0100
+++
/work/SRC/openSUSE:Factory/.python-jupyter-core.new.23466/python-jupyter-core.changes
2023-07-04 15:22:28.586240424 +0200
@@ -1,0 +2,6 @@
+Sat Jul 1 16:37:15 UTC 2023 - Ben Greiner <[email protected]>
+
+- Update to 5.3.1
+ * Better handling of config migration #356 (@smartass101)
+
+-------------------------------------------------------------------
Old:
----
jupyter_core-5.3.0.tar.gz
New:
----
jupyter_core-5.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter-core.spec ++++++
--- /var/tmp/diff_new_pack.7hyomK/_old 2023-07-04 15:22:29.278244582 +0200
+++ /var/tmp/diff_new_pack.7hyomK/_new 2023-07-04 15:22:29.282244606 +0200
@@ -32,7 +32,7 @@
%endif
Name: python-jupyter-core%{psuffix}
-Version: 5.3.0
+Version: 5.3.1
Release: 0
Summary: Base package on which Jupyter projects rely
License: BSD-3-Clause
++++++ jupyter_core-5.3.0.tar.gz -> jupyter_core-5.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/.github/workflows/test.yml
new/jupyter_core-5.3.1/.github/workflows/test.yml
--- old/jupyter_core-5.3.0/.github/workflows/test.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/.github/workflows/test.yml 2020-02-02
01:00:00.000000000 +0100
@@ -41,15 +41,21 @@
- name: Test
run: |
hatch run cov:test
- - name: Coverage
- run: |
- pip install codecov coverage[toml]
- codecov
- name: Check CLI
run: |
pip install .
cd $HOME
jupyter troubleshoot
+ - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
+
+ coverage:
+ runs-on: ubuntu-latest
+ if: always()
+ needs:
+ - build
+ steps:
+ - uses: actions/checkout@v3
+ - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
test_minimum_versions:
name: Test Minimum Versions
@@ -152,7 +158,7 @@
tests_check: # This job does nothing and is only used for the branch
protection
if: always()
needs:
- - build
+ - coverage
- test_lint
- test_docs
- test_minimum_versions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/.pre-commit-config.yaml
new/jupyter_core-5.3.1/.pre-commit-config.yaml
--- old/jupyter_core-5.3.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
@@ -20,7 +20,7 @@
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
- rev: 0.21.0
+ rev: 0.23.1
hooks:
- id: check-github-workflows
@@ -30,12 +30,12 @@
- id: mdformat
- repo: https://github.com/psf/black
- rev: 23.1.0
+ rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.0.254
+ rev: v0.0.270
hooks:
- id: ruff
args: ["--fix"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/.readthedocs.yaml
new/jupyter_core-5.3.1/.readthedocs.yaml
--- old/jupyter_core-5.3.0/.readthedocs.yaml 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_core-5.3.1/.readthedocs.yaml 2020-02-02 01:00:00.000000000
+0100
@@ -1,9 +1,12 @@
version: 2
python:
- version: 3.8
install:
# install itself with pip install .
- method: pip
path: .
extra_requirements:
- docs
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.11"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/CHANGELOG.md
new/jupyter_core-5.3.1/CHANGELOG.md
--- old/jupyter_core-5.3.0/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
@@ -2,6 +2,27 @@
<!-- <START NEW CHANGELOG ENTRY> -->
+## 5.3.1
+
+([Full
Changelog](https://github.com/jupyter/jupyter_core/compare/v5.3.0...c64421919f6627f82c8899018bba0836760331f4))
+
+### Bugs fixed
+
+- Better handling of config migration
[#356](https://github.com/jupyter/jupyter_core/pull/356)
([@smartass101](https://github.com/smartass101))
+
+### Maintenance and upkeep improvements
+
+- Fix write_executable test
[#351](https://github.com/jupyter/jupyter_core/pull/351)
([@blink1073](https://github.com/blink1073))
+- Use local coverage [#349](https://github.com/jupyter/jupyter_core/pull/349)
([@blink1073](https://github.com/blink1073))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyter/jupyter_core/graphs/contributors?from=2023-03-16&to=2023-06-14&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ablink1073+updated%3A2023-03-16..2023-06-14&type=Issues)
|
[@davidbrochart](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Adavidbrochart+updated%3A2023-03-16..2023-06-14&type=Issues)
|
[@jamescooke](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ajamescooke+updated%3A2023-03-16..2023-06-14&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Apre-commit-ci+updated%3A2023-03-16..2023-06-14&type=Issues)
|
[@smartass101](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Asmartass101+updated%3A2023-03-16..2023-06-14&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
## 5.3.0
([Full
Changelog](https://github.com/jupyter/jupyter_core/compare/v5.2.0...6cfe9fc042a0f016a0d4545bc6790b8277d80c24))
@@ -21,8 +42,6 @@
[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ablink1073+updated%3A2023-01-30..2023-03-16&type=Issues)
|
[@dcsaba89](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Adcsaba89+updated%3A2023-01-30..2023-03-16&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Apre-commit-ci+updated%3A2023-01-30..2023-03-16&type=Issues)
-<!-- <END NEW CHANGELOG ENTRY> -->
-
## 5.2.0
([Full
Changelog](https://github.com/jupyter/jupyter_core/compare/v5.1.5...98b9a1a94e79d1137246b4c1f8c16343b72b050c))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/PKG-INFO
new/jupyter_core-5.3.1/PKG-INFO
--- old/jupyter_core-5.3.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: jupyter_core
-Version: 5.3.0
+Version: 5.3.1
Summary: Jupyter core package. A base package on which Jupyter projects rely.
Project-URL: Homepage, https://jupyter.org
Project-URL: Documentation, https://jupyter-core.readthedocs.io/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/README.md
new/jupyter_core-5.3.1/README.md
--- old/jupyter_core-5.3.0/README.md 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/README.md 2020-02-02 01:00:00.000000000 +0100
@@ -1,7 +1,6 @@
# Jupyter Core
[](https://github.com/jupyter/jupyter_core/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)
-[](https://codecov.io/gh/jupyter/jupyter_core)
[](http://jupyter-core.readthedocs.io/en/latest/?badge=latest)
Core common functionality of Jupyter projects.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/codecov.yml
new/jupyter_core-5.3.1/codecov.yml
--- old/jupyter_core-5.3.0/codecov.yml 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/codecov.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-coverage:
- status:
- project:
- default:
- target: auto
- threshold: 1
- patch:
- default:
- target: 0%
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/application.py
new/jupyter_core-5.3.1/jupyter_core/application.py
--- old/jupyter_core-5.3.0/jupyter_core/application.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/application.py 2020-02-02
01:00:00.000000000 +0100
@@ -168,9 +168,17 @@
def migrate_config(self):
"""Migrate config/data from IPython 3"""
- if os.path.exists(os.path.join(self.config_dir, "migrated")):
- # already migrated
- return
+ try: # let's see if we can open the marker file
+ # for reading and updating (writing)
+ f_marker = open(os.path.join(self.config_dir, "migrated"), 'r+')
# noqa
+ except PermissionError: # not readable and/or writable
+ return # so let's give up migration in such an environment
+ except FileNotFoundError: # cannot find the marker file
+ pass # that means we have not migrated yet, so continue
+ else: # if we got here without raising anything,
+ # that means the file exists
+ f_marker.close()
+ return # so we must have already migrated -> bail out
from .migrate import get_ipython_dir, migrate
@@ -259,7 +267,7 @@
def start(self):
"""Start the whole thing"""
if self.subcommand:
- os.execv(self.subcommand, [self.subcommand] + self.argv[1:])
+ os.execv(self.subcommand, [self.subcommand] + self.argv[1:]) #
noqa
raise NoStart()
if self.subapp:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/command.py
new/jupyter_core-5.3.1/jupyter_core/command.py
--- old/jupyter_core-5.3.0/jupyter_core/command.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/command.py 2020-02-02
01:00:00.000000000 +0100
@@ -119,7 +119,7 @@
cmd_path = which(cmd)
if cmd_path is None:
raise OSError("%r not found" % cmd, errno.ENOENT)
- p = Popen([cmd_path] + argv[1:])
+ p = Popen([cmd_path] + argv[1:]) # noqa
# Don't raise KeyboardInterrupt in the parent process.
# Set this after spawning, to avoid subprocess inheriting handler.
import signal
@@ -128,7 +128,7 @@
p.wait()
sys.exit(p.returncode)
else:
- os.execvp(cmd, argv)
+ os.execvp(cmd, argv) # noqa
def _jupyter_abspath(subcommand):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/paths.py
new/jupyter_core-5.3.1/jupyter_core/paths.py
--- old/jupyter_core-5.3.0/jupyter_core/paths.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/paths.py 2020-02-02
01:00:00.000000000 +0100
@@ -398,7 +398,8 @@
# 'stat_result' object has no attribute 'st_file_attributes'
# https://foss.heptapod.net/pypy/pypy/-/issues/3469
warnings.warn(
- "hidden files are not detectable on this system, so no file will
be marked as hidden."
+ "hidden files are not detectable on this system, so no file will
be marked as hidden.",
+ stacklevel=2,
)
pass
@@ -1010,5 +1011,6 @@
warnings.warn(
"WARNING: Insecure writes have been enabled via environment variable "
"'JUPYTER_ALLOW_INSECURE_WRITES'! If this is not intended, remove the "
- "variable or set its value to 'False'."
+ "variable or set its value to 'False'.",
+ stacklevel=2,
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_core-5.3.0/jupyter_core/tests/test_command.py
new/jupyter_core-5.3.1/jupyter_core/tests/test_command.py
--- old/jupyter_core-5.3.0/jupyter_core/tests/test_command.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/tests/test_command.py 2020-02-02
01:00:00.000000000 +0100
@@ -62,11 +62,16 @@
if sys.platform == "win32":
try:
- import pkg_resources
+ import importlib.resources
- w = pkg_resources.resource_string("setuptools", "cli-32.exe")
+ if not hasattr(importlib.resources, 'files'):
+ raise ImportError
+ wp = importlib.resources.files('setuptools').joinpath('cli-32.exe')
+ w = wp.read_bytes()
except (ImportError, FileNotFoundError, SystemError):
- pytest.skip("Need pkg_resources/setuptools to make scripts
executable on Windows")
+ pytest.skip(
+ "Need importlib.resources and setuptools to make scripts
executable on Windows"
+ )
exe.write(w, "wb")
exe.chmod(0o700)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_core-5.3.0/jupyter_core/tests/test_migrate.py
new/jupyter_core-5.3.1/jupyter_core/tests/test_migrate.py
--- old/jupyter_core-5.3.0/jupyter_core/tests/test_migrate.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/tests/test_migrate.py 2020-02-02
01:00:00.000000000 +0100
@@ -11,6 +11,7 @@
import pytest
from jupyter_core import migrate as migrate_mod
+from jupyter_core.application import JupyterApp
from jupyter_core.migrate import (
migrate,
migrate_config,
@@ -53,7 +54,7 @@
def fin():
"""Cleanup test env"""
env_patch.stop()
- shutil.rmtree(td)
+ shutil.rmtree(td, ignore_errors=os.name == 'nt')
request.addfinalizer(fin)
@@ -216,3 +217,31 @@
migrate()
assert os.path.exists(env["JUPYTER_CONFIG_DIR"])
assert os.path.exists(env["JUPYTER_DATA_DIR"])
+
+
+def test_app_migrate(env):
+ shutil.copytree(dotipython, env["IPYTHONDIR"])
+ app = JupyterApp()
+ app.initialize([])
+ assert os.path.exists(env["JUPYTER_CONFIG_DIR"])
+ assert os.path.exists(env["JUPYTER_DATA_DIR"])
+
+
+def test_app_migrate_skip_if_marker(env):
+ shutil.copytree(dotipython, env["IPYTHONDIR"])
+ touch(pjoin(env["JUPYTER_CONFIG_DIR"], "migrated"), "done")
+ app = JupyterApp()
+ app.initialize([])
+ assert os.listdir(env["JUPYTER_CONFIG_DIR"]) == ["migrated"]
+ assert not os.path.exists(env["JUPYTER_DATA_DIR"])
+
+
+def test_app_migrate_skip_unwritable_marker(env):
+ shutil.copytree(dotipython, env["IPYTHONDIR"])
+ migrated_marker = pjoin(env["JUPYTER_CONFIG_DIR"], "migrated")
+ touch(migrated_marker, "done")
+ os.chmod(migrated_marker, 0) # make it unworkable
+ app = JupyterApp()
+ app.initialize([])
+ assert os.listdir(env["JUPYTER_CONFIG_DIR"]) == ["migrated"]
+ assert not os.path.exists(env["JUPYTER_DATA_DIR"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/tests/test_paths.py
new/jupyter_core-5.3.1/jupyter_core/tests/test_paths.py
--- old/jupyter_core-5.3.0/jupyter_core/tests/test_paths.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/tests/test_paths.py 2020-02-02
01:00:00.000000000 +0100
@@ -474,7 +474,7 @@
subdir1 = os.path.join(root, "subdir")
os.makedirs(subdir1)
assert not is_hidden(subdir1, root)
- subprocess.check_call(["attrib", "+h", subdir1])
+ subprocess.check_call(["attrib", "+h", subdir1]) # noqa
assert is_hidden(subdir1, root)
assert is_file_hidden(subdir1)
@@ -494,7 +494,7 @@
subdir1 = os.path.join(root, "subdir")
os.makedirs(subdir1)
assert not is_hidden(subdir1, root)
- subprocess.check_call(["attrib", "+h", subdir1])
+ subprocess.check_call(["attrib", "+h", subdir1]) # noqa
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered.
@@ -527,7 +527,7 @@
def fetch_win32_permissions(filename):
"""Extracts file permissions on windows using icacls"""
role_permissions = {}
- proc = os.popen("icacls %s" % filename)
+ proc = os.popen("icacls %s" % filename) # noqa
lines = proc.read().splitlines()
proc.close()
for index, line in enumerate(lines):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/troubleshoot.py
new/jupyter_core-5.3.1/jupyter_core/troubleshoot.py
--- old/jupyter_core-5.3.0/jupyter_core/troubleshoot.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/troubleshoot.py 2020-02-02
01:00:00.000000000 +0100
@@ -16,7 +16,7 @@
get data from commands that we need to run outside of python
"""
try:
- stdout = subprocess.check_output(cmd)
+ stdout = subprocess.check_output(cmd) # noqa
return stdout.decode("utf-8", "replace").strip()
except (OSError, subprocess.CalledProcessError):
return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/jupyter_core/version.py
new/jupyter_core-5.3.1/jupyter_core/version.py
--- old/jupyter_core-5.3.0/jupyter_core/version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_core-5.3.1/jupyter_core/version.py 2020-02-02
01:00:00.000000000 +0100
@@ -5,7 +5,7 @@
from typing import List
# Version string must appear intact for hatch versioning
-__version__ = "5.3.0"
+__version__ = "5.3.1"
# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-5.3.0/pyproject.toml
new/jupyter_core-5.3.1/pyproject.toml
--- old/jupyter_core-5.3.0/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_core-5.3.1/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -93,7 +93,7 @@
test = "mypy --install-types --non-interactive {args:.}"
[tool.hatch.envs.lint]
-dependencies = ["black==23.1.0", "mdformat>0.7", "ruff==0.0.254"]
+dependencies = ["black==23.3.0", "mdformat>0.7", "ruff==0.0.270"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
@@ -138,6 +138,10 @@
"module:Jupyter is migrating its paths to use standard
platformdirs:DeprecationWarning",
]
+[tool.coverage.run]
+relative_files = true
+source = ["jupyter_core"]
+
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
@@ -193,7 +197,8 @@
# S101 Use of `assert` detected
# S108 Probable insecure usage of temporary file or directory: "/tmp"
# PLR2004 Magic value used in comparison, consider replacing b'WITNESS A' with
a constant variable
-"jupyter_core/tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007",
"N802", "S101", "S108", "PLR2004"]
+# S603 `subprocess` call: check for execution of untrusted input
+"jupyter_core/tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007",
"N802", "S101", "S108", "PLR2004", "S603"]
# F821 Undefined name `get_config`
"jupyter_core/tests/**/profile_default/*_config.py" = ["F821"]
# T201 `print` found
@@ -202,6 +207,8 @@
"jupyter_core/troubleshoot.py" = ["T201"]
# N802 Function name `SetFileSecurity` should be lowercase
"jupyter_core/paths.py" = ["N802", "N803", "N806"]
+# C901 Function is too complex
+"jupyter_core/migrate.py" = ["C901"] # `migrate_static_custom` is too complex
(11 > 10)
[tool.interrogate]
ignore-init-module=true