#2 Support Python 3.10, remove the loop parameter from asyncio.wait(), add test, fix docs
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/python-jupyter-console python3.10  into  rawhide

file modified
+19 -2
@@ -3,13 +3,18 @@ 

  

  Name:           python-%{srcname}

  Version:        6.4.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Jupyter terminal console

  

  License:        BSD

  URL:            https://jupyter.org

  Source0:        %pypi_source %{srcname_}

  

+ # Remove the loop parameter from asyncio.wait()

+ # Reported upstream in https://github.com/jupyter/jupyter_console/issues/245

+ # Not backwards compatible with all older Pythons, downstream only for now

+ Patch1:         python3.10.patch

+ 

  BuildArch:      noarch

  

  BuildRequires:  python3-devel
@@ -42,6 +47,7 @@ 

  

  BuildArch: noarch

  

+ BuildRequires:  make

  BuildRequires:  python3dist(sphinx)

  BuildRequires:  python3dist(sphinx-rtd-theme)

  BuildRequires:  python3dist(sphinxcontrib-github-alt)
@@ -61,7 +67,8 @@ 

  %py3_build

  

  # generate html docs

- PYTHONPATH=${PWD} sphinx-build-3 docs html

+ %make_build -C docs html PYTHONPATH=${PWD}/build/lib

+ mv docs/_build/html .

  # remove the sphinx-build leftovers

  rm -rf html/.{doctrees,buildinfo}

  
@@ -73,6 +80,11 @@ 

  %check

  %{pytest} -ra

  

+ # assert we can start the console ad run a simple command

+ export PATH=%{buildroot}%{_bindir}:$PATH

+ export PYTHONPATH=%{buildroot}%{python3_sitelib}

+ echo 'exit()' | jupyter-console --simple-prompt

+ 

  

  %files -n python3-%{srcname}

  %doc README.md
@@ -87,6 +99,11 @@ 

  

  

  %changelog

+ * Fri Jul 02 2021 Miro Hrončok <mhroncok@redhat.com> - 6.4.0-3

+ - Support Python 3.10

+ - Generate the documentation completely

+ - Fixes: rhbz#1978009

+ 

  * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.4.0-2

  - Rebuilt for Python 3.10

  

file added
+13
@@ -0,0 +1,13 @@ 

+ diff --git a/jupyter_console/ptshell.py b/jupyter_console/ptshell.py

+ index a9daeed..0c1b51f 100644

+ --- a/jupyter_console/ptshell.py

+ +++ b/jupyter_console/ptshell.py

+ @@ -661,7 +661,7 @@ class ZMQTerminalInteractiveShell(SingletonConfigurable):

+                      # wish to include external content

+                      tasks.append(self.handle_external_iopub(loop=loop))

+  

+ -                main_task = asyncio.wait(tasks, loop=loop, return_when=asyncio.FIRST_COMPLETED)

+ +                main_task = asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)

+                  _, pending = loop.run_until_complete(main_task)

+  

+                  for task in pending:

no initial comment

I've also actually verified the console starts now.

Looks good to me. Thanks for fixing the documentation!

Pull-Request has been merged by churchyard

2 years ago