Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-jupyter-events for openSUSE:Factory checked in at 2023-08-23 14:58:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jupyter-events (Old) and /work/SRC/openSUSE:Factory/.python-jupyter-events.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter-events" Wed Aug 23 14:58:39 2023 rev:6 rq:1105431 version:0.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jupyter-events/python-jupyter-events.changes 2023-07-30 20:58:33.255498377 +0200 +++ /work/SRC/openSUSE:Factory/.python-jupyter-events.new.1766/python-jupyter-events.changes 2023-08-23 14:59:49.370227053 +0200 @@ -1,0 +2,15 @@ +Wed Aug 23 08:11:45 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.7.0 + * allow a 'message' field in an event schema #72 (@Zsailer) + * Improve usability of jp_read_emitted_events fixture #74 + (@kevin-bates) +- Fix libalternatives/update-alternatives +- Drop jupyter_events-pr80-jsonschema-referencing.patch + +------------------------------------------------------------------- +Wed Aug 23 07:36:24 UTC 2023 - ecsos <ec...@opensuse.org> + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- Old: ---- jupyter_events-0.6.3.tar.gz jupyter_events-pr80-jsonschema-referencing.patch New: ---- jupyter_events-0.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jupyter-events.spec ++++++ --- /var/tmp/diff_new_pack.690keo/_old 2023-08-23 14:59:50.086228334 +0200 +++ /var/tmp/diff_new_pack.690keo/_new 2023-08-23 14:59:50.090228341 +0200 @@ -21,15 +21,15 @@ %else %bcond_with libalternatives %endif + +%{?sle15_python_module_pythons} Name: python-jupyter-events -Version: 0.6.3 +Version: 0.7.0 Release: 0 Summary: Jupyter Event System library License: BSD-3-Clause URL: https://github.com/jupyter/jupyter_events Source: https://files.pythonhosted.org/packages/source/j/jupyter_events/jupyter_events-%{version}.tar.gz -# PATCH-FIX-UPSTREAM jupyter_events-pr80-jsonschema-referencing.patch gh#jupyter/jupyter_events#80 -Patch0: jupyter_events-pr80-jsonschema-referencing.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module hatchling >= 1.5} BuildRequires: %{python_module pip} @@ -46,6 +46,13 @@ Requires: python-traitlets >= 5.3 Provides: python-jupyter_events = %{version}-%{release} BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun):update-alternatives +%endif # SECTION test requirements BuildRequires: %{python_module rfc3339-validator} BuildRequires: %{python_module PyYAML >= 5.3} @@ -98,6 +105,7 @@ %python_uninstall_alternative jupyter-events %files %{python_files} +%license LICENSE %python_alternative %{_bindir}/jupyter-events %{python_sitelib}/jupyter_events %{python_sitelib}/jupyter_events-%{version}.dist-info ++++++ jupyter_events-0.6.3.tar.gz -> jupyter_events-0.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/.github/workflows/python-tests.yml new/jupyter_events-0.7.0/.github/workflows/python-tests.yml --- old/jupyter_events-0.6.3/.github/workflows/python-tests.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/.github/workflows/python-tests.yml 2020-02-02 01:00:00.000000000 +0100 @@ -18,7 +18,7 @@ fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.7", "3.11"] + python-version: ["3.8", "3.12"] include: - os: windows-latest python-version: "3.9" @@ -27,14 +27,21 @@ - os: ubuntu-latest python-version: "3.10" - os: macos-latest - python-version: "3.8" + python-version: "3.11" steps: - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Run Tests run: hatch run cov:test - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 + + coverage: + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 docs: runs-on: windows-latest @@ -150,7 +157,7 @@ tests_check: # This job does nothing and is only used for the branch protection if: always() needs: - - build + - coverage - docs - test_lint - check_release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/.gitignore new/jupyter_events-0.7.0/.gitignore --- old/jupyter_events-0.6.3/.gitignore 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/.gitignore 2020-02-02 01:00:00.000000000 +0100 @@ -105,3 +105,6 @@ .DS_Store .vscode/ + +# pycharm +.idea/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/.pre-commit-config.yaml new/jupyter_events-0.7.0/.pre-commit-config.yaml --- old/jupyter_events-0.6.3/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/.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.19.2 + rev: 0.23.2 hooks: - id: check-github-workflows @@ -30,12 +30,12 @@ - id: mdformat - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.194 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.276 hooks: - id: ruff args: ["--fix"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/CHANGELOG.md new/jupyter_events-0.7.0/CHANGELOG.md --- old/jupyter_events-0.6.3/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -4,6 +4,33 @@ <!-- <START NEW CHANGELOG ENTRY> --> +## 0.7.0 + +([Full Changelog](https://github.com/jupyter/jupyter_events/compare/v0.6.3...56e7d2660b59632765a85859217cddc7304e82f8)) + +### Enhancements made + +- allow a 'message' field in an event schema [#72](https://github.com/jupyter/jupyter_events/pull/72) ([@Zsailer](https://github.com/Zsailer)) + +### Bugs fixed + +- Improve usability of jp_read_emitted_events fixture [#74](https://github.com/jupyter/jupyter_events/pull/74) ([@kevin-bates](https://github.com/kevin-bates)) + +### Maintenance and upkeep improvements + +- Migrate RefResolver to referencing.Registry [#80](https://github.com/jupyter/jupyter_events/pull/80) ([@hbcarlos](https://github.com/hbcarlos)) +- Use local coverage [#73](https://github.com/jupyter/jupyter_events/pull/73) ([@blink1073](https://github.com/blink1073)) +- Clean up license [#67](https://github.com/jupyter/jupyter_events/pull/67) ([@dcsaba89](https://github.com/dcsaba89)) +- Add more linting [#65](https://github.com/jupyter/jupyter_events/pull/65) ([@blink1073](https://github.com/blink1073)) + +### Contributors to this release + +([GitHub contributors page for this release](https://github.com/jupyter/jupyter_events/graphs/contributors?from=2023-01-12&to=2023-07-31&type=c)) + +[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Ablink1073+updated%3A2023-01-12..2023-07-31&type=Issues) | [@dcsaba89](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Adcsaba89+updated%3A2023-01-12..2023-07-31&type=Issues) | [@hbcarlos](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Ahbcarlos+updated%3A2023-01-12..2023-07-31&type=Issues) | [@kevin-bates](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Akevin-bates+updated%3A2023-01-12..2023-07-31&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Apre-commit-ci+updated%3A2023-01-12..2023-07-31&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3AZsailer+updated%3A2023-01-12..2023-07-31&type=Issues) + +<!-- <END NEW CHANGELOG ENTRY> --> + ## 0.6.3 ([Full Changelog](https://github.com/jupyter/jupyter_events/compare/v0.6.2...ac65980322317f1f30bc07150c9e14afaad03d40)) @@ -18,8 +45,6 @@ [@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_events+involves%3Ablink1073+updated%3A2023-01-10..2023-01-12&type=Issues) -<!-- <END NEW CHANGELOG ENTRY> --> - ## 0.6.2 ([Full Changelog](https://github.com/jupyter/jupyter_events/compare/v0.6.1...a00859944090df5277f263fcfe72ae48b8cc2382)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/COPYING.md new/jupyter_events-0.7.0/COPYING.md --- old/jupyter_events-0.6.3/COPYING.md 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/COPYING.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ -# Licensing terms - -This project is licensed under the terms of the Modified BSD License -(also known as New or Revised or 3-Clause BSD), as follows: - -- Copyright (c) 2022-, Jupyter Development Team - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the Jupyter Development Team nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -## About the Jupyter Development Team - -The Jupyter Development Team is the set of all contributors to the Jupyter project. -This includes all of the Jupyter subprojects. - -The core team that coordinates development on GitHub can be found here: -https://github.com/jupyter/. - -## Our Copyright Policy - -Jupyter uses a shared copyright model. Each contributor maintains copyright -over their contributions to Jupyter. But, it is important to note that these -contributions are typically only changes to the repositories. Thus, the Jupyter -source code, in its entirety is not the copyright of any single person or -institution. Instead, it is the collective copyright of the entire Jupyter -Development Team. If individual contributors want to maintain a record of what -changes/contributions they have specific copyright on, they should indicate -their copyright in the commit message of the change, when they commit the -change to one of the Jupyter repositories. - -With this in mind, the following banner should be used in any source code file -to indicate the copyright and license terms: - -``` -# Copyright (c) Jupyter Development Team. -# Distributed under the terms of the Modified BSD License. -``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/LICENSE new/jupyter_events-0.7.0/LICENSE --- old/jupyter_events-0.6.3/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/LICENSE 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2022-, Jupyter Development Team + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/PKG-INFO new/jupyter_events-0.7.0/PKG-INFO --- old/jupyter_events-0.6.3/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,71 +1,40 @@ Metadata-Version: 2.1 Name: jupyter-events -Version: 0.6.3 +Version: 0.7.0 Summary: Jupyter Event System library Project-URL: Homepage, http://jupyter.org Author-email: Jupyter Development Team <jupy...@googlegroups.com> -License: # Licensing terms +License: BSD 3-Clause License - This project is licensed under the terms of the Modified BSD License - (also known as New or Revised or 3-Clause BSD), as follows: - - - Copyright (c) 2022-, Jupyter Development Team + Copyright (c) 2022-, Jupyter Development Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - - Neither the name of the Jupyter Development Team nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ## About the Jupyter Development Team - - The Jupyter Development Team is the set of all contributors to the Jupyter project. - This includes all of the Jupyter subprojects. - - The core team that coordinates development on GitHub can be found here: - https://github.com/jupyter/. - - ## Our Copyright Policy - - Jupyter uses a shared copyright model. Each contributor maintains copyright - over their contributions to Jupyter. But, it is important to note that these - contributions are typically only changes to the repositories. Thus, the Jupyter - source code, in its entirety is not the copyright of any single person or - institution. Instead, it is the collective copyright of the entire Jupyter - Development Team. If individual contributors want to maintain a record of what - changes/contributions they have specific copyright on, they should indicate - their copyright in the commit message of the change, when they commit the - change to one of the Jupyter repositories. - - With this in mind, the following banner should be used in any source code file - to indicate the copyright and license terms: - - ``` - # Copyright (c) Jupyter Development Team. - # Distributed under the terms of the Modified BSD License. - ``` -License-File: COPYING.md +License-File: LICENSE Keywords: Jupyter,JupyterLab Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research @@ -73,10 +42,11 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Requires-Python: >=3.7 -Requires-Dist: jsonschema[format-nongpl]>=3.2.0 +Requires-Python: >=3.8 +Requires-Dist: jsonschema[format-nongpl]>=4.18.0 Requires-Dist: python-json-logger>=2.0.4 Requires-Dist: pyyaml>=5.3 +Requires-Dist: referencing Requires-Dist: rfc3339-validator Requires-Dist: rfc3986-validator>=0.1.1 Requires-Dist: traitlets>=5.3 @@ -90,11 +60,9 @@ Requires-Dist: sphinxcontrib-spelling; extra == 'docs' Provides-Extra: test Requires-Dist: click; extra == 'test' -Requires-Dist: coverage; extra == 'test' Requires-Dist: pre-commit; extra == 'test' Requires-Dist: pytest-asyncio>=0.19.0; extra == 'test' Requires-Dist: pytest-console-scripts; extra == 'test' -Requires-Dist: pytest-cov; extra == 'test' Requires-Dist: pytest>=7.0; extra == 'test' Requires-Dist: rich; extra == 'test' Description-Content-Type: text/markdown @@ -102,7 +70,6 @@ # Jupyter Events [](https://github.com/jupyter/jupyter_events/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++) -[](https://codecov.io/gh/jupyter/jupyter_events) [](http://jupyter-events.readthedocs.io/en/latest/?badge=latest) _An event system for Jupyter Applications and extensions._ @@ -126,3 +93,31 @@ ## Documentation Documentation is available at [jupyter-events.readthedocs.io](https://jupyter-events.readthedocs.io). + +## About the Jupyter Development Team + +The Jupyter Development Team is the set of all contributors to the Jupyter project. +This includes all of the Jupyter subprojects. + +The core team that coordinates development on GitHub can be found here: +https://github.com/jupyter/. + +## Our Copyright Policy + +Jupyter uses a shared copyright model. Each contributor maintains copyright +over their contributions to Jupyter. But, it is important to note that these +contributions are typically only changes to the repositories. Thus, the Jupyter +source code, in its entirety is not the copyright of any single person or +institution. Instead, it is the collective copyright of the entire Jupyter +Development Team. If individual contributors want to maintain a record of what +changes/contributions they have specific copyright on, they should indicate +their copyright in the commit message of the change, when they commit the +change to one of the Jupyter repositories. + +With this in mind, the following banner should be used in any source code file +to indicate the copyright and license terms: + +``` +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/README.md new/jupyter_events-0.7.0/README.md --- old/jupyter_events-0.6.3/README.md 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/README.md 2020-02-02 01:00:00.000000000 +0100 @@ -1,7 +1,6 @@ # Jupyter Events [](https://github.com/jupyter/jupyter_events/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++) -[](https://codecov.io/gh/jupyter/jupyter_events) [](http://jupyter-events.readthedocs.io/en/latest/?badge=latest) _An event system for Jupyter Applications and extensions._ @@ -25,3 +24,31 @@ ## Documentation Documentation is available at [jupyter-events.readthedocs.io](https://jupyter-events.readthedocs.io). + +## About the Jupyter Development Team + +The Jupyter Development Team is the set of all contributors to the Jupyter project. +This includes all of the Jupyter subprojects. + +The core team that coordinates development on GitHub can be found here: +https://github.com/jupyter/. + +## Our Copyright Policy + +Jupyter uses a shared copyright model. Each contributor maintains copyright +over their contributions to Jupyter. But, it is important to note that these +contributions are typically only changes to the repositories. Thus, the Jupyter +source code, in its entirety is not the copyright of any single person or +institution. Instead, it is the collective copyright of the entire Jupyter +Development Team. If individual contributors want to maintain a record of what +changes/contributions they have specific copyright on, they should indicate +their copyright in the commit message of the change, when they commit the +change to one of the Jupyter repositories. + +With this in mind, the following banner should be used in any source code file +to indicate the copyright and license terms: + +``` +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/codecov.yml new/jupyter_events-0.7.0/codecov.yml --- old/jupyter_events-0.6.3/codecov.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/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_events-0.6.3/docs/conf.py new/jupyter_events-0.7.0/docs/conf.py --- old/jupyter_events-0.6.3/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 @@ -20,7 +20,7 @@ from typing import List project = "jupyter_events" -copyright = "2019, Project Jupyter" +copyright = "2019, Project Jupyter" # noqa author = "Project Jupyter" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/_version.py new/jupyter_events-0.7.0/jupyter_events/_version.py --- old/jupyter_events-0.6.3/jupyter_events/_version.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/_version.py 2020-02-02 01:00:00.000000000 +0100 @@ -5,16 +5,16 @@ from typing import List # Version string must appear intact for hatch versioning -__version__ = "0.6.3" +__version__ = "0.7.0" # Build up version_info tuple for backwards compatibility pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)" match = re.match(pattern, __version__) -assert match is not None +assert match is not None # noqa parts: List[object] = [int(match[part]) for part in ["major", "minor", "patch"]] if match["rest"]: parts.append(match["rest"]) version_info = tuple(parts) kernel_protocol_version_info = (5, 3) -kernel_protocol_version = "%s.%s" % kernel_protocol_version_info +kernel_protocol_version = "{}.{}".format(*kernel_protocol_version_info) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/logger.py new/jupyter_events-0.7.0/jupyter_events/logger.py --- old/jupyter_events-0.6.3/jupyter_events/logger.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/logger.py 2020-02-02 01:00:00.000000000 +0100 @@ -7,11 +7,11 @@ import json import logging import warnings -from datetime import datetime +from datetime import datetime, timezone from typing import Any, Callable, Coroutine, Optional, Union from jsonschema import ValidationError -from pythonjsonlogger import jsonlogger # type:ignore +from pythonjsonlogger import jsonlogger from traitlets import Dict, Instance, Set, default from traitlets.config import Config, LoggingConfigurable @@ -63,7 +63,7 @@ """ handlers = Handlers( - default_value=[], + default_value=None, allow_none=True, help="""A list of logging.Handler instances to send events to. @@ -149,16 +149,21 @@ All outgoing messages will be formatted as a JSON string. """ - def _skip_message(record, **kwargs): + def _handle_message_field(record, **kwargs): + """Python's logger always emits the "message" field with + the value as "null" unless it's present in the schema/data. + Message happens to be a common field for event logs, + so special case it here and only emit it if "message" + is found the in the schema's property list. """ - Remove 'message' from log record. - It is always emitted with 'null', and we do not want it, - since we are always emitting events only - """ - del record["message"] + schema = self.schemas.get(record["__schema__"]) + if "message" not in schema.properties: + del record["message"] return json.dumps(record, **kwargs) - formatter = jsonlogger.JsonFormatter(json_serializer=_skip_message) + formatter = jsonlogger.JsonFormatter( + json_serializer=_handle_message_field, + ) handler.setFormatter(formatter) self._logger.addHandler(handler) if handler not in self.handlers: @@ -208,9 +213,9 @@ if schema_id: self._modifiers[schema_id].add(modifier) return - for id in self._modifiers: - if schema_id is None or id == schema_id: - self._modifiers[id].add(modifier) + for id_ in self._modifiers: + if schema_id is None or id_ == schema_id: + self._modifiers[id_].add(modifier) else: msg = ( "Modifiers are required to follow an exact function/method " @@ -283,10 +288,10 @@ self._modified_listeners[schema_id].add(listener) return self._unmodified_listeners[schema_id].add(listener) - for id in self.schemas.schema_ids: - if schema_id is None or id == schema_id: + for id_ in self.schemas.schema_ids: + if schema_id is None or id_ == schema_id: if modified: - self._modified_listeners[id].add(listener) + self._modified_listeners[id_].add(listener) else: self._unmodified_listeners[schema_id].add(listener) else: @@ -363,6 +368,7 @@ "this was not intentional, please register the schema using the " "`register_event_schema` method.", SchemaNotRegistered, + stacklevel=2, ) return None @@ -381,10 +387,9 @@ self.schemas.validate_event(schema_id, modified_data) # Generate the empty event capsule. - if timestamp_override is None: - timestamp = datetime.utcnow() - else: - timestamp = timestamp_override + timestamp = ( + datetime.now(tz=timezone.utc) if timestamp_override is None else timestamp_override + ) capsule = { "__timestamp__": timestamp.isoformat() + "Z", "__schema__": schema_id, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/pytest_plugin.py new/jupyter_events-0.7.0/jupyter_events/pytest_plugin.py --- old/jupyter_events-0.6.3/jupyter_events/pytest_plugin.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/pytest_plugin.py 2020-02-02 01:00:00.000000000 +0100 @@ -26,8 +26,8 @@ def _read(): jp_event_handler.flush() - lines = jp_event_sink.getvalue().strip().split("\n") - output = [json.loads(item) for item in lines] + event_buf = jp_event_sink.getvalue().strip() + output = [json.loads(item) for item in event_buf.split("\n")] if event_buf else None # Clear the sink. jp_event_sink.truncate(0) jp_event_sink.seek(0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/schema.py new/jupyter_events-0.7.0/jupyter_events/schema.py --- old/jupyter_events-0.6.3/jupyter_events/schema.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/schema.py 2020-02-02 01:00:00.000000000 +0100 @@ -3,7 +3,9 @@ from pathlib import Path, PurePath from typing import Optional, Type, Union -from jsonschema import FormatChecker, RefResolver, validators +from jsonschema import FormatChecker, validators +from referencing import Registry +from referencing.jsonschema import DRAFT7 try: from jsonschema.protocols import Validator @@ -55,8 +57,8 @@ any schema registered here follows the expected form of Jupyter Events. - resolver: - RefResolver for nested JSON schema references. + registry: + Registry for nested JSON schema references. """ def __init__( @@ -64,14 +66,18 @@ schema: SchemaType, validator_class: Type[Validator] = validators.Draft7Validator, # type:ignore[assignment] format_checker: FormatChecker = draft7_format_checker, - resolver: Optional[RefResolver] = None, + registry: Optional[Registry] = None, ): """Initialize an event schema.""" _schema = self._load_schema(schema) # Validate the schema against Jupyter Events metaschema. validate_schema(_schema) + + if registry is None: + registry = DRAFT7.create_resource(_schema) @ Registry() + # Create a validator for this schema - self._validator = validator_class(_schema, resolver=resolver, format_checker=format_checker) + self._validator = validator_class(_schema, registry=registry, format_checker=format_checker) # type: ignore self._schema = _schema def __repr__(self): @@ -135,7 +141,7 @@ raise EventSchemaUnrecognized(msg) @property - def id(self) -> str: + def id(self) -> str: # noqa """Schema $id field.""" return self._schema["$id"] @@ -144,6 +150,10 @@ """Schema's version.""" return self._schema["version"] + @property + def properties(self) -> dict: + return self._schema["properties"] + def validate(self, data: dict) -> None: """Validate an incoming instance of this event schema.""" self._validator.validate(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/schema_registry.py new/jupyter_events-0.7.0/jupyter_events/schema_registry.py --- old/jupyter_events-0.6.3/jupyter_events/schema_registry.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/schema_registry.py 2020-02-02 01:00:00.000000000 +0100 @@ -47,35 +47,35 @@ self._add(schema) return schema - def get(self, id: str) -> EventSchema: + def get(self, id_: str) -> EventSchema: """Fetch a given schema. If the schema is not found, this will raise a KeyError. """ try: - return self._schemas[id] + return self._schemas[id_] except KeyError: msg = ( - f"The requested schema, {id}, was not found in the " + f"The requested schema, {id_}, was not found in the " "schema registry. Are you sure it was previously registered?" ) raise KeyError(msg) from None - def remove(self, id: str) -> None: + def remove(self, id_: str) -> None: """Remove a given schema. If the schema is not found, this will raise a KeyError. """ try: - del self._schemas[id] + del self._schemas[id_] except KeyError: msg = ( - f"The requested schema, {id}, was not found in the " + f"The requested schema, {id_}, was not found in the " "schema registry. Are you sure it was previously registered?" ) raise KeyError(msg) from None - def validate_event(self, id: str, data: dict) -> None: + def validate_event(self, id_: str, data: dict) -> None: """Validate an event against a schema within this registry. """ - schema = self.get(id) + schema = self.get(id_) schema.validate(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/jupyter_events/validators.py new/jupyter_events-0.7.0/jupyter_events/validators.py --- old/jupyter_events-0.6.3/jupyter_events/validators.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/jupyter_events/validators.py 2020-02-02 01:00:00.000000000 +0100 @@ -2,7 +2,11 @@ import pathlib import jsonschema -from jsonschema import Draft7Validator, RefResolver, ValidationError +from jsonschema import Draft7Validator, ValidationError +from referencing import Registry +from referencing.jsonschema import DRAFT7 + +from . import yaml draft7_format_checker = ( Draft7Validator.FORMAT_CHECKER @@ -10,7 +14,6 @@ else jsonschema.draft7_format_checker ) -from . import yaml METASCHEMA_PATH = pathlib.Path(__file__).parent.joinpath("schemas") @@ -29,19 +32,21 @@ EVENT_CORE_SCHEMA["$id"]: EVENT_CORE_SCHEMA, } -METASCHEMA_RESOLVER = RefResolver( - base_uri=EVENT_METASCHEMA["$id"], referrer=EVENT_METASCHEMA, store=SCHEMA_STORE -) +resources = [ + DRAFT7.create_resource(each) + for each in (EVENT_METASCHEMA, PROPERTY_METASCHEMA, EVENT_CORE_SCHEMA) +] +METASCHEMA_REGISTRY: Registry = resources @ Registry() -JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator( +JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator( # type: ignore schema=EVENT_METASCHEMA, - resolver=METASCHEMA_RESOLVER, + registry=METASCHEMA_REGISTRY, format_checker=draft7_format_checker, ) -JUPYTER_EVENTS_CORE_VALIDATOR = Draft7Validator( +JUPYTER_EVENTS_CORE_VALIDATOR = Draft7Validator( # type: ignore schema=EVENT_CORE_SCHEMA, - resolver=METASCHEMA_RESOLVER, + registry=METASCHEMA_REGISTRY, format_checker=draft7_format_checker, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/pyproject.toml new/jupyter_events-0.7.0/pyproject.toml --- old/jupyter_events-0.6.3/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -6,7 +6,7 @@ name = "jupyter-events" description = "Jupyter Event System library" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8" authors = [ { name = "Jupyter Development Team", email = "jupy...@googlegroups.com" }, ] @@ -23,7 +23,8 @@ "Programming Language :: Python :: 3", ] dependencies = [ - "jsonschema[format-nongpl,format_nongpl]>=3.2.0", + "referencing", + "jsonschema[format-nongpl,format_nongpl]>=4.18.0", "python-json-logger>=2.0.4", "pyyaml>=5.3", "traitlets>=5.3", @@ -38,7 +39,7 @@ ] [project.license] -file = 'COPYING.md' +file = 'LICENSE' [project.urls] Homepage = "http://jupyter.org" @@ -54,11 +55,9 @@ "sphinxcontrib-spelling", ] test = [ - "coverage", "pre-commit", "pytest-asyncio>=0.19.0", "pytest-console-scripts", - "pytest-cov", "pytest>=7.0", # [cli] "click", @@ -85,9 +84,9 @@ [tool.hatch.envs.cov] features = ["test"] -dependencies = ["coverage", "pytest-cov"] +dependencies = ["coverage[toml]", "pytest-cov"] [tool.hatch.envs.cov.scripts] -test = "python -m pytest -vv --cov jupyter_events --cov-branch --cov-report term-missing:skip-covered --cov-fail-under 80 {args}" +test = "python -m pytest -vv --cov jupyter_events --cov-branch --cov-report term-missing:skip-covered {args}" nowarn = "test -W default {args}" [tool.hatch.envs.typing] @@ -97,7 +96,7 @@ test = "mypy --install-types --non-interactive {args:.}" [tool.hatch.envs.lint] -dependencies = ["black[jupyter]==22.12.0", "mdformat>0.7", "ruff==0.0.194"] +dependencies = ["black[jupyter]==23.3.0", "mdformat>0.7", "ruff==0.0.270"] detached = true [tool.hatch.envs.lint.scripts] style = [ @@ -133,6 +132,10 @@ "@(abc\\.)?abstractmethod", ] +[tool.coverage.run] +relative_files = true +source = ["jupyter_events"] + [tool.mypy] check_untyped_defs = true disallow_incomplete_defs = true @@ -156,42 +159,19 @@ target-version = "py37" line-length = 100 select = [ - "A", "B", "C", "E", "EM", "F", "FBT", "I", "N", "Q", "RUF", "S", "T", - "UP", "W", "YTT", + "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N", + "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP", + "W", "YTT", ] ignore = [ - # Allow non-abstract empty methods in abstract base classes - "B027", - # Ignore McCabe complexity - "C901", - # Allow boolean positional values in function calls, like `dict.get(... True)` - "FBT003", - # Use of `assert` detected - "S101", - # Line too long - "E501", - # Relative imports are banned - "TID252", - # Boolean ... in function definition - "FBT001", "FBT002", - # Module level import not at top of file - "E402", - # A001/A002/A003 .. is shadowing a python builtin - "A001", "A002", "A003", - # Possible hardcoded password - "S105", "S106", # Q000 Single quotes found but double quotes preferred "Q000", - # N806 Variable `B` in function should be lowercase - "N806", - # T201 `print` found - "T201", - # N802 Function name `CreateWellKnownSid` should be lowercase - "N802", "N803", - # C408 Unnecessary `dict` call (rewrite as a literal) - "C408", - # N801 Class name `directional_link` should use CapWords convention - "N801", + # FBT001 Boolean positional arg in function definition + "FBT001", "FBT002", "FBT003", + # E501 Line too long (158 > 100 characters) + "E501", + # SIM105 Use `contextlib.suppress(...)` + "SIM105", ] unfixable = [ # Don't touch print statements @@ -209,7 +189,11 @@ # B007 Loop control variable `i` not used within the loop body. # N802 Function name `assertIn` should be lowercase # F841 Local variable `t` is assigned to but never used -"tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "F841"] +# S101 Use of `assert` detected +"tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "F841", "S101"] +# C901 Function is too complex +"jupyter_events/logger.py" = ["C901"] # `emit` is too complex (12 > 10) + [tool.interrogate] ignore-init-module=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jupyter_events-0.6.3/tests/test_logger.py new/jupyter_events-0.7.0/tests/test_logger.py --- old/jupyter_events-0.6.3/tests/test_logger.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jupyter_events-0.7.0/tests/test_logger.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,7 +1,8 @@ import io import json import logging -from datetime import datetime, timedelta +import sys +from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock import jsonschema @@ -113,7 +114,7 @@ el = EventLogger(handlers=[handler]) el.register_event_schema(schema) - timestamp_override = datetime.utcnow() - timedelta(days=1) + timestamp_override = datetime.now(tz=timezone.utc) - timedelta(days=1) el.emit( schema_id="http://test/test", @@ -136,7 +137,7 @@ "something": { "type": "string", "title": "test", - }, + } }, } @@ -158,12 +159,112 @@ assert "__timestamp__" in event_capsule # Remove timestamp from capsule when checking equality, since it is gonna vary del event_capsule["__timestamp__"] - assert event_capsule == { + expected = { "__schema__": "http://test/test", "__schema_version__": 1, "__metadata_version__": 1, "something": "blah", } + if sys.version_info >= (3, 12): + expected["taskName"] = None + assert event_capsule == expected + + +def test_message_field(): + """ + Simple test for emitting an event with + the literal property "message". + """ + schema = { + "$id": "http://test/test", + "version": 1, + "properties": { + "something": { + "type": "string", + "title": "test", + }, + "message": { + "type": "string", + "title": "test", + }, + }, + } + + output = io.StringIO() + handler = logging.StreamHandler(output) + el = EventLogger(handlers=[handler]) + el.register_event_schema(schema) + + el.emit( + schema_id="http://test/test", + data={"something": "blah", "message": "a message was seen"}, + ) + handler.flush() + + event_capsule = json.loads(output.getvalue()) + + assert "__timestamp__" in event_capsule + # Remove timestamp from capsule when checking equality, since it is gonna vary + del event_capsule["__timestamp__"] + expected = { + "__schema__": "http://test/test", + "__schema_version__": 1, + "__metadata_version__": 1, + "something": "blah", + "message": "a message was seen", + } + if sys.version_info >= (3, 12): + expected["taskName"] = None + assert event_capsule == expected + + +def test_nested_message_field(): + """ + Simple test for emitting an event with + the literal property "message". + """ + schema = { + "$id": "http://test/test", + "version": 1, + "properties": { + "thing": { + "type": "object", + "title": "thing", + "properties": { + "message": { + "type": "string", + "title": "message", + }, + }, + }, + }, + } + + output = io.StringIO() + handler = logging.StreamHandler(output) + el = EventLogger(handlers=[handler]) + el.register_event_schema(schema) + + el.emit( + schema_id="http://test/test", + data={"thing": {"message": "a nested message was seen"}}, + ) + handler.flush() + + event_capsule = json.loads(output.getvalue()) + + assert "__timestamp__" in event_capsule + # Remove timestamp from capsule when checking equality, since it is gonna vary + del event_capsule["__timestamp__"] + expected = { + "__schema__": "http://test/test", + "__schema_version__": 1, + "__metadata_version__": 1, + "thing": {"message": "a nested message was seen"}, + } + if sys.version_info >= (3, 12): + expected["taskName"] = None + assert event_capsule == expected def test_register_event_schema(tmp_path): @@ -320,24 +421,30 @@ assert "__timestamp__" in event_capsule0 # Remove timestamp from capsule when checking equality, since it is gonna vary del event_capsule0["__timestamp__"] - assert event_capsule0 == { + expected = { "__schema__": "http://test/test0", "__schema_version__": 1, "__metadata_version__": 1, "something": "blah", } + if sys.version_info >= (3, 12): + expected["taskName"] = None + assert event_capsule0 == expected event_capsule1 = json.loads(output1.getvalue()) assert "__timestamp__" in event_capsule1 # Remove timestamp from capsule when checking equality, since it is gonna vary del event_capsule1["__timestamp__"] - assert event_capsule1 == { + expected = { "__schema__": "http://test/test1", "__schema_version__": 1, "__metadata_version__": 1, "something": "blah", } + if sys.version_info >= (3, 12): + expected["taskName"] = None + assert event_capsule1 == expected def test_register_duplicate_schemas():