Sync from SUSE:ALP:Source:Standard:1.0 python-jupyter-events revision 98e93864b833c058e0bfc6f7b098b26e

This commit is contained in:
Adrian Schröter 2024-02-19 15:49:02 +01:00
commit 4e131a72b5
5 changed files with 272 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
jupyter_events-0.9.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,48 @@
diff -ur jupyter_events-0.9.0.orig/tests/test_logger.py jupyter_events-0.9.0/tests/test_logger.py
--- jupyter_events-0.9.0.orig/tests/test_logger.py 2024-02-06 16:12:31.070657567 +0100
+++ jupyter_events-0.9.0/tests/test_logger.py 2024-02-06 16:13:51.287692498 +0100
@@ -165,8 +165,6 @@
"__metadata_version__": 1,
"something": "blah",
}
- if sys.version_info >= (3, 12):
- expected["taskName"] = None
assert event_capsule == expected
@@ -213,8 +211,6 @@
"something": "blah",
"message": "a message was seen",
}
- if sys.version_info >= (3, 12):
- expected["taskName"] = None
assert event_capsule == expected
@@ -262,8 +258,6 @@
"__metadata_version__": 1,
"thing": {"message": "a nested message was seen"},
}
- if sys.version_info >= (3, 12):
- expected["taskName"] = None
assert event_capsule == expected
@@ -427,8 +421,6 @@
"__metadata_version__": 1,
"something": "blah",
}
- if sys.version_info >= (3, 12):
- expected["taskName"] = None
assert event_capsule0 == expected
event_capsule1 = json.loads(output1.getvalue())
@@ -442,8 +434,6 @@
"__metadata_version__": 1,
"something": "blah",
}
- if sys.version_info >= (3, 12):
- expected["taskName"] = None
assert event_capsule1 == expected

View File

@ -0,0 +1,83 @@
-------------------------------------------------------------------
Tue Feb 6 15:15:02 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Add jupyter_events-py312-taskname.patch because we patched
gh#madzak/python-json-logger#183
-------------------------------------------------------------------
Sun Nov 26 16:05:33 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.9.0
* Clean up linting and fix a bug that was found #91 (@blink1073)
- Release 0.8.0
* Allow for string annotations in listener signature #88
(@blink1073)
-------------------------------------------------------------------
Wed Aug 23 08:11:45 UTC 2023 - Ben Greiner <code@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 <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Sun Jul 30 15:30:25 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Add jupyter_events-pr80-jsonschema-referencing.patch
* gh#jupyter/jupyter_events#80
* Avoid test suite errors in consuming packages because of
jsonschema DeprecationWarning
- Remove workaround for rpmlint parser crash
-------------------------------------------------------------------
Wed Jul 19 20:47:32 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Unpin jsonschema: nbformat has been fixed, the jupyter ecosystem
can work with jsonschema 4.18 now (asdf-format is still blocked
but not on the dependency chain for jupyter packages).
-------------------------------------------------------------------
Thu Jul 13 12:53:46 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Restrict to jsonschema < 4.18 in order to resolve conflicts with
other jupyter packages
-------------------------------------------------------------------
Thu Mar 30 19:48:36 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Work around gh#rpm-software-management/rpmlint#1043
* This produces false positives for python-missing-require and
python-lefover-require but at least it does not crash rpmlint
* See also gh#pypa/hatch#801, gh#jupyter/jupyter_events#70
-------------------------------------------------------------------
Sun Jan 15 21:04:58 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.6.3
* Clean up typing #64 (@blink1073)
- Release 0.6.2
* Decrease pyyaml dependency floor to increase compatibility #63
(@kevin-bates)
- Release 0.6.1
* Remove artificial cap on jsonschema dependency #61
(@kevin-bates)
* Try dropping jsonschema dependency #59 (@bretttully)
- Release 0.6.0
* Add typing file #60 (@blink1073)
* Use base setup dependency type #47 (@blink1073)
* (CI and lint cleanups in multiple PRs)
- allow update-alternatives for backported 15.x packages
---------------------------------------------------------
Sun Dec 25 22:08:53 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Initial specfile for v0.5
- Required by jupyter-server 2

115
python-jupyter-events.spec Normal file
View File

@ -0,0 +1,115 @@
#
# spec file for package python-jupyter-events
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{suse_version} >= 1550
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-jupyter-events
Version: 0.9.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-OPENSUSE jupyter_events-py312-taskname.patch code@bnavigator.de -- we patched python-python-json-logger with gh#madzak/python-json-logger#183
Patch0: jupyter_events-py312-taskname.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatchling >= 1.5}
BuildRequires: %{python_module pip}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-PyYAML >= 5.3
Requires: python-jsonschema-format-nongpl >= 4.18
Requires: python-python-json-logger >= 2.0.4
Requires: python-referencing
Requires: python-rfc3339-validator
Requires: python-rfc3986-validator >= 0.1.1
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}
BuildRequires: %{python_module click}
BuildRequires: %{python_module jsonschema-format-nongpl >= 4.18}
BuildRequires: %{python_module pytest >= 7}
BuildRequires: %{python_module pytest-asyncio >= 0.19.0}
BuildRequires: %{python_module pytest-console-scripts}
BuildRequires: %{python_module python-json-logger >= 2.0.4}
BuildRequires: %{python_module referencing}
BuildRequires: %{python_module rfc3986-validator >= 0.1.1}
BuildRequires: %{python_module rich}
BuildRequires: %{python_module traitlets >= 5.3}
# /SECTION
%python_subpackages
%description
Jupyter Events enables Jupyter Python Applications (e.g. Jupyter Server,
JupyterLab Server, JupyterHub, etc.) to emit events—structured data
describing things happening inside the application. Other software
(e.g. client applications like JupyterLab) can listen and respond to
these events.
%prep
%autosetup -p1 -n jupyter_events-%{version}
sed -i -e 's/--color=yes//' pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/jupyter-events
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand # provide flavored command in case not yet installed libalts are not supported by python_flavored_alternatives
mkdir -p build/flavorbin
which jupyter-events || ln -s %{buildroot}%{_bindir}/jupyter-events-%{$python_bin_suffix} build/flavorbin/jupyter-events
}
%pytest
%pre
%python_libalternatives_reset_alternative jupyter-events
%post
%python_install_alternative jupyter-events
%postun
%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
%changelog