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-01-09 17:23:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jupyter-core (Old) and /work/SRC/openSUSE:Factory/.python-jupyter-core.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter-core" Mon Jan 9 17:23:20 2023 rev:14 rq:1056897 version:5.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jupyter-core/python-jupyter-core.changes 2023-01-03 15:04:48.522314923 +0100 +++ /work/SRC/openSUSE:Factory/.python-jupyter-core.new.32243/python-jupyter-core.changes 2023-01-09 17:23:22.523013407 +0100 @@ -1,0 +2,7 @@ +Sun Jan 8 09:16:03 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 5.1.2 + * Add spell check and ensure docstrings #327 (@blink1073) + * Maint: Some more precise typing. #326 (@Carreau) + +------------------------------------------------------------------- Old: ---- jupyter_core-5.1.1.tar.gz New: ---- jupyter_core-5.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jupyter-core.spec ++++++ --- /var/tmp/diff_new_pack.X37jXB/_old 2023-01-09 17:23:23.031016282 +0100 +++ /var/tmp/diff_new_pack.X37jXB/_new 2023-01-09 17:23:23.035016304 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,7 @@ %endif Name: python-jupyter-core%{psuffix} -Version: 5.1.1 +Version: 5.1.2 Release: 0 Summary: Base package on which Jupyter projects rely License: BSD-3-Clause ++++++ jupyter_core-5.1.1.tar.gz -> jupyter_core-5.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/.github/workflows/test.yml new/jupyter_core-5.1.2/.github/workflows/test.yml --- old/jupyter_core-5.1.1/.github/workflows/test.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/.github/workflows/test.yml 2020-02-02 01:00:00.000000000 +0100 @@ -79,10 +79,19 @@ test_docs: name: Test Docs - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Build API docs + run: | + hatch run docs:api + # If this fails run `hatch run docs:api` locally + # and commit. + git status --porcelain + git status -s | grep "A" && exit 1 + git status -s | grep "M" && exit 1 + echo "API docs done" - run: hatch run docs:build test_lint: @@ -95,7 +104,7 @@ run: | hatch run typing:test hatch run lint:style - pipx run 'validate-pyproject[all]' pyproject.toml + pipx run interrogate -v . pipx run doc8 --max-line-length=200 make_sdist: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/.pre-commit-config.yaml new/jupyter_core-5.1.2/.pre-commit-config.yaml --- old/jupyter_core-5.1.1/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 @@ -5,17 +5,18 @@ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - - id: end-of-file-fixer - id: check-case-conflict + - id: check-ast + - id: check-docstring-first - id: check-executables-have-shebangs - - id: requirements-txt-fixer - id: check-added-large-files - id: check-case-conflict + - id: check-merge-conflict + - id: check-json - id: check-toml - id: check-yaml - id: debug-statements - - id: forbid-new-submodules - - id: check-builtin-literals + - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema @@ -34,7 +35,7 @@ - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.178 + rev: v0.0.189 hooks: - id: ruff args: ["--fix"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/CHANGELOG.md new/jupyter_core-5.1.2/CHANGELOG.md --- old/jupyter_core-5.1.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -2,6 +2,27 @@ <!-- <START NEW CHANGELOG ENTRY> --> +## 5.1.2 + +([Full Changelog](https://github.com/jupyter/jupyter_core/compare/v5.1.1...4bd8ba97c99fefc416fe43411f935d40e2b7e441)) + +### Maintenance and upkeep improvements + +- Add spell check and ensure docstrings [#327](https://github.com/jupyter/jupyter_core/pull/327) ([@blink1073](https://github.com/blink1073)) +- Maint: Some more precise typing. [#326](https://github.com/jupyter/jupyter_core/pull/326) ([@Carreau](https://github.com/Carreau)) + +### Documentation improvements + +- Add api docs [#328](https://github.com/jupyter/jupyter_core/pull/328) ([@blink1073](https://github.com/blink1073)) + +### Contributors to this release + +([GitHub contributors page for this release](https://github.com/jupyter/jupyter_core/graphs/contributors?from=2022-12-22&to=2023-01-02&type=c)) + +[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ablink1073+updated%3A2022-12-22..2023-01-02&type=Issues) | [@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3ACarreau+updated%3A2022-12-22..2023-01-02&type=Issues) + +<!-- <END NEW CHANGELOG ENTRY> --> + ## 5.1.1 ([Full Changelog](https://github.com/jupyter/jupyter_core/compare/v5.1.0...1ed25e389116fbb98c513ee2148f38f9548e6198)) @@ -25,8 +46,6 @@ [@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ablink1073+updated%3A2022-11-28..2022-12-22&type=Issues) | [@jasongrout](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Ajasongrout+updated%3A2022-11-28..2022-12-22&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Aminrk+updated%3A2022-11-28..2022-12-22&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_core+involves%3Apre-commit-ci+updated%3A2022-11-28..2022-12-22&type=Issues) -<!-- <END NEW CHANGELOG ENTRY> --> - ## 5.1.0 ([Full Changelog](https://github.com/jupyter/jupyter_core/compare/v5.0.0...9a976bb7d4f2d7092b2ee98b05a30eb1ff0be425)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/PKG-INFO new/jupyter_core-5.1.2/PKG-INFO --- old/jupyter_core-5.1.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: jupyter_core -Version: 5.1.1 +Version: 5.1.2 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/ @@ -85,7 +85,9 @@ Requires-Dist: traitlets>=5.3 Provides-Extra: docs Requires-Dist: myst-parser; extra == 'docs' +Requires-Dist: sphinx-autodoc-typehints; extra == 'docs' Requires-Dist: sphinxcontrib-github-alt; extra == 'docs' +Requires-Dist: sphinxcontrib-spelling; extra == 'docs' Requires-Dist: traitlets; extra == 'docs' Provides-Extra: test Requires-Dist: ipykernel; extra == 'test' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/api/jupyter_core.rst new/jupyter_core-5.1.2/docs/api/jupyter_core.rst --- old/jupyter_core-5.1.1/docs/api/jupyter_core.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/api/jupyter_core.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,57 @@ +jupyter\_core package +===================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + jupyter_core.utils + +Submodules +---------- + + +.. automodule:: jupyter_core.application + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: jupyter_core.command + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: jupyter_core.migrate + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: jupyter_core.paths + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: jupyter_core.troubleshoot + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: jupyter_core.version + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: jupyter_core + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/api/jupyter_core.utils.rst new/jupyter_core-5.1.2/docs/api/jupyter_core.utils.rst --- old/jupyter_core-5.1.1/docs/api/jupyter_core.utils.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/api/jupyter_core.utils.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,10 @@ +jupyter\_core.utils package +=========================== + +Module contents +--------------- + +.. automodule:: jupyter_core.utils + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/api/modules.rst new/jupyter_core-5.1.2/docs/api/modules.rst --- old/jupyter_core-5.1.1/docs/api/modules.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/api/modules.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,7 @@ +jupyter_core +============ + +.. toctree:: + :maxdepth: 4 + + jupyter_core diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/conf.py new/jupyter_core-5.1.2/docs/conf.py --- old/jupyter_core-5.1.1/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 @@ -33,8 +33,16 @@ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinxcontrib_github_alt", + "sphinx_autodoc_typehints", ] +try: + import enchant # type:ignore # noqa + + extensions += ["sphinxcontrib.spelling"] +except ImportError: + pass + github_project_url = "https://github.com/jupyter/jupyter_core" # Add any paths that contain templates here, relative to this directory. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/index.rst new/jupyter_core-5.1.2/docs/index.rst --- old/jupyter_core-5.1.1/docs/index.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/index.rst 2020-02-02 01:00:00.000000000 +0100 @@ -10,9 +10,8 @@ .. toctree:: :maxdepth: 2 - paths changelog - + API Docs <api/modules> Indices and tables ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/docs/paths.rst new/jupyter_core-5.1.2/docs/paths.rst --- old/jupyter_core-5.1.1/docs/paths.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/docs/paths.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -Paths for Jupyter files -======================= - -.. module:: jupyter_core.paths - -Specific directories --------------------- - -.. autofunction:: jupyter_config_dir - -.. autofunction:: jupyter_data_dir - -.. autofunction:: jupyter_runtime_dir - - -Search paths ------------- - -.. autofunction:: jupyter_config_path - -.. autofunction:: jupyter_path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/application.py new/jupyter_core-5.1.2/jupyter_core/application.py --- old/jupyter_core-5.1.1/jupyter_core/application.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/jupyter_core/application.py 2020-02-02 01:00:00.000000000 +0100 @@ -235,6 +235,7 @@ @catch_config_error def initialize(self, argv=None): + """Initialize the application.""" # don't hook up crash handler before parsing command-line if argv is None: argv = sys.argv[1:] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/command.py new/jupyter_core-5.1.2/jupyter_core/command.py --- old/jupyter_core-5.1.1/jupyter_core/command.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/jupyter_core/command.py 2020-02-02 01:00:00.000000000 +0100 @@ -22,6 +22,8 @@ class JupyterParser(argparse.ArgumentParser): + """A Jupyter argument parser.""" + @property def epilog(self): """Add subcommands to epilog on request @@ -37,6 +39,7 @@ def jupyter_parser() -> JupyterParser: + """Create a jupyter parser object.""" parser = JupyterParser( description="Jupyter: Interactive Computing", ) @@ -171,6 +174,7 @@ def main() -> None: + """The command entry point.""" parser = jupyter_parser() if len(sys.argv) > 1 and not sys.argv[1].startswith("-"): # Don't parse if a subcommand is given diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/migrate.py new/jupyter_core-5.1.2/jupyter_core/migrate.py --- old/jupyter_core-5.1.1/jupyter_core/migrate.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/jupyter_core/migrate.py 2020-02-02 01:00:00.000000000 +0100 @@ -7,11 +7,14 @@ - .ipython/ - nbextensions -> JUPYTER_DATA_DIR/nbextensions - kernels -> JUPYTER_DATA_DIR/kernels + - .ipython/profile_default/ - static/custom -> .jupyter/custom - nbconfig -> .jupyter/nbconfig - security/ + - notebook_secret, notebook_cookie_secret, nbsignatures.db -> JUPYTER_DATA_DIR + - ipython_{notebook,nbconvert,qtconsole}_config.py -> .jupyter/jupyter_{name}_config.py @@ -183,7 +186,7 @@ def migrate_config(name, env): - """Migrate a config file + """Migrate a config file. Includes substitutions for updated configurable names. """ @@ -245,6 +248,8 @@ class JupyterMigrate(JupyterApp): + """A Jupyter Migration App.""" + name = "jupyter-migrate" description = """ Migrate configuration and data from .ipython prior to 4.0 to Jupyter locations. @@ -263,6 +268,7 @@ """ def start(self): + """Start the application.""" if not migrate(): self.log.info("Found nothing to migrate.") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/paths.py new/jupyter_core-5.1.2/jupyter_core/paths.py --- old/jupyter_core-5.1.1/jupyter_core/paths.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/jupyter_core/paths.py 2020-02-02 01:00:00.000000000 +0100 @@ -1006,6 +1006,8 @@ def issue_insecure_write_warning() -> None: + """Issue an insecure write warning.""" + def format_warning(msg, *args, **kwargs): return str(msg) + "\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/utils/__init__.py new/jupyter_core-5.1.2/jupyter_core/utils/__init__.py --- old/jupyter_core-5.1.1/jupyter_core/utils/__init__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/jupyter_core/utils/__init__.py 2020-02-02 01:00:00.000000000 +0100 @@ -10,11 +10,13 @@ import threading import warnings from pathlib import Path -from typing import Any, Awaitable, Callable, Optional, TypeVar, Union +from types import FrameType +from typing import Awaitable, Callable, List, Optional, TypeVar, Union, cast def ensure_dir_exists(path, mode=0o777): - """ensure that a directory exists + """Ensure that a directory exists + If it doesn't exist, try to create it, protecting against a race condition if another process is doing the same. The default permissions are determined by the current umask. @@ -28,7 +30,7 @@ raise OSError("%r exists but is not a directory" % path) -def _get_frame(level): +def _get_frame(level: int) -> Optional[FrameType]: """Get the frame at the given stack level.""" # sys._getframe is much faster than inspect.stack, but isn't guaranteed to # exist in all python implementations, so we fall back to inspect.stack() @@ -48,7 +50,7 @@ # added in the process. For example, with the deprecation warning in the # __init__ below, the appropriate stacklevel will change depending on how deep # the inheritance hierarchy is. -def _external_stacklevel(internal): +def _external_stacklevel(internal: List[str]) -> int: """Find the stacklevel of the first frame that doesn't contain any of the given internal strings The depth will be 1 at minimum in order to start checking at the caller of @@ -70,18 +72,21 @@ return level - 1 -def deprecation(message, internal="jupyter_core/"): +def deprecation(message: str, internal: Union[str, List[str]] = "jupyter_core/") -> None: """Generate a deprecation warning targeting the first frame that is not 'internal' internal is a string or list of strings, which if they appear in filenames in the frames, the frames will be considered internal. Changing this can be useful if, for examnple, we know that our internal code is calling out to another library. """ + _internal: List[str] if isinstance(internal, str): - internal = [internal] + _internal = [internal] + else: + _internal = internal # stack level of the first external frame from here - stacklevel = _external_stacklevel(internal) + stacklevel = _external_stacklevel(_internal) # The call to .warn adds one frame, so bump the stacklevel up by one warnings.warn(message, DeprecationWarning, stacklevel=stacklevel + 1) @@ -128,12 +133,13 @@ def run_sync(coro: Callable[..., Awaitable[T]]) -> Callable[..., T]: - """Runs a coroutine and blocks until it has executed. + """Wraps coroutine in a function that blocks until it has executed. Parameters ---------- coro : coroutine The coroutine to be executed. + Returns ------- result : @@ -163,18 +169,22 @@ return wrapped -async def ensure_async(obj: Union[Awaitable[Any], Any]) -> Any: +async def ensure_async(obj: Union[Awaitable[T], T]) -> T: """Convert a non-awaitable object to a coroutine if needed, and await it if it was not already awaited. + + This function is meant to be called on the result of calling a function, + when that function could either be asynchronous or not. """ if inspect.isawaitable(obj): + obj = cast(Awaitable[T], obj) try: result = await obj except RuntimeError as e: if str(e) == "cannot reuse already awaited coroutine": # obj is already the coroutine's result - return obj + return cast(T, obj) raise return result # obj doesn't need to be awaited - return obj + return cast(T, obj) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_core-5.1.1/jupyter_core/version.py new/jupyter_core-5.1.2/jupyter_core/version.py --- old/jupyter_core-5.1.1/jupyter_core/version.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/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.1.1" +__version__ = "5.1.2" # 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.1.1/pyproject.toml new/jupyter_core-5.1.2/pyproject.toml --- old/jupyter_core-5.1.1/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_core-5.1.2/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -49,6 +49,8 @@ docs = [ "myst-parser", "sphinxcontrib_github_alt", + "sphinxcontrib_spelling", + "sphinx-autodoc-typehints", "traitlets", ] @@ -65,8 +67,11 @@ [tool.hatch.envs.docs] features = ["docs"] +[tool.hatch.envs.docs.env-vars] +SPHINXOPTS = "-W -n" [tool.hatch.envs.docs.scripts] -build = "make -C docs html SPHINXOPTS='-W'" +build = "make -C docs html" +api = "sphinx-apidoc -o docs/api -f -E jupyter_core jupyter_core/tests/*" [tool.hatch.envs.test] features = ["test"] @@ -88,7 +93,7 @@ test = "mypy --install-types --non-interactive {args:.}" [tool.hatch.envs.lint] -dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.178"] +dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.189"] detached = true [tool.hatch.envs.lint.scripts] style = [ @@ -208,5 +213,15 @@ # F821 Undefined name `get_config` "jupyter_core/tests/**/profile_default/*_config.py" = ["F821"] +[tool.interrogate] +ignore-init-module=true +ignore-private=true +ignore-semiprivate=true +ignore-property-decorators=true +ignore-nested-functions=true +ignore-nested-classes=true +fail-under=100 +exclude = ["docs", "*/tests"] + [tool.check-wheel-contents] toplevel = ["jupyter_core/", "jupyter.py"]