diff --git a/ignore-PytestUnraisableExceptionWarning.patch b/ignore-PytestUnraisableExceptionWarning.patch new file mode 100644 index 0000000..a203465 --- /dev/null +++ b/ignore-PytestUnraisableExceptionWarning.patch @@ -0,0 +1,16 @@ +--- + pyproject.toml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -178,7 +178,8 @@ filterwarnings = [ + "error", + "ignore:datetime.datetime.utc:DeprecationWarning", + "module:add_callback_from_signal is deprecated:DeprecationWarning", +- "ignore::jupyter_server.utils.JupyterServerAuthWarning" ++ "ignore::jupyter_server.utils.JupyterServerAuthWarning", ++ "ignore::pytest.PytestUnraisableExceptionWarning", + ] + + [tool.coverage.report] diff --git a/python-jupyter-server.changes b/python-jupyter-server.changes index 97e41e8..78bb2f0 100644 --- a/python-jupyter-server.changes +++ b/python-jupyter-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 20 14:17:42 UTC 2024 - Matej Cepl + +- Add ignore-PytestUnraisableExceptionWarning.patch to get over + (misleading?) ResourceWarning concerning SQLite unclosed + database (gh#jupyter-server/jupyter_server#1387). + ------------------------------------------------------------------- Sun Sep 15 16:05:49 UTC 2024 - Ben Greiner diff --git a/python-jupyter-server.spec b/python-jupyter-server.spec index 179a996..5a38365 100644 --- a/python-jupyter-server.spec +++ b/python-jupyter-server.spec @@ -40,6 +40,9 @@ Group: Development/Languages/Python URL: https://jupyter-server.readthedocs.io # SourceRepository: https://github.com/jupyter-server/jupyter_server Source: https://files.pythonhosted.org/packages/source/j/jupyter_server/jupyter_server-%{version}.tar.gz +# PATCH-FIX-UPSTREAM ignore-PytestUnraisableExceptionWarning.patch gh#jupyter-server/jupyter_server#1387 mcepl@suse.com +# ignore PytestUnraisableExceptionWarning (ResourceWarning: unclosed database in ) +Patch0: ignore-PytestUnraisableExceptionWarning.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module hatch-jupyter-builder >= 0.8.1} BuildRequires: %{python_module hatchling >= 1.11} @@ -72,6 +75,7 @@ Obsoletes: python-jupyter_server < %{version}-%{release} %if %{with test} BuildRequires: %{python_module jupyter-server-test = %{version}} BuildRequires: %{python_module pytest-xdist} +BuildRequires: pandoc %endif %if %{with libalternatives} BuildRequires: alts @@ -109,7 +113,7 @@ Requires: python-requests Metapackage for the jupyter_server[test] requirement specifier %prep -%setup -q -n jupyter_server-%{version} +%autosetup -p1 -n jupyter_server-%{version} sed -i pyproject.toml \ -e 's/, "--color=yes"//' \ -e '/filterwarnings/,/]/ {/error/ a \ "ignore:Module already imported so cannot be rewritten",