#8 Add patch for Python 3.8 compatibility (merged upstream)
Merged 4 years ago by churchyard. Opened 4 years ago by churchyard.
rpms/ churchyard/python-ipykernel py38  into  master

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

+ From e0dd55f53163e7a09b2afa484d526da3b038ccab Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

+ Date: Tue, 28 May 2019 14:15:34 +0200

+ Subject: [PATCH] Python 3.8: PEP 570 -- Python Positional-Only Parameters

+ 

+ https://www.python.org/dev/peps/pep-0570/

+ 

+ Fixes https://github.com/ipython/ipykernel/issues/406

+ ---

+  ipykernel/codeutil.py | 2 ++

+  1 file changed, 2 insertions(+)

+ 

+ diff --git a/ipykernel/codeutil.py b/ipykernel/codeutil.py

+ index 3946a98a..bac32bed 100644

+ --- a/ipykernel/codeutil.py

+ +++ b/ipykernel/codeutil.py

+ @@ -33,6 +33,8 @@ def reduce_code(co):

+              co.co_lnotab, co.co_freevars, co.co_cellvars]

+      if sys.version_info[0] >= 3:

+          args.insert(1, co.co_kwonlyargcount)

+ +    if sys.version_info > (3, 8, 0, 'alpha', 3):

+ +        args.insert(1, co.co_posonlyargcount)

+      return code_ctor, tuple(args)

+  

+  copyreg.pickle(types.CodeType, reduce_code)

file modified
+5 -1
@@ -7,6 +7,10 @@ 

  License:        BSD

  URL:            https://github.com/ipython/%{modname}

  Source0:        https://github.com/ipython/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz

+ 

+ # Python 3.8: PEP 570 -- Python Positional-Only Parameters

+ Patch1:         https://github.com/ipython/ipykernel/pull/408.patch

+ 

  BuildArch:      noarch

  

  BuildRequires:  python3-sphinx
@@ -52,7 +56,7 @@ 

  This package contains the documentation of %{name}.

  

  %prep

- %setup -q -n %{modname}-%{version}

+ %autosetup -p1 -n %{modname}-%{version}

  

  %build

  %py3_build

no initial comment

rebased onto 2a79975

4 years ago

The remaining issues are no longer reproducible.

Pull-Request has been merged by churchyard

4 years ago