Bug 1789213 - python-nbformat fails to build with Python 3.9
Summary: python-nbformat fails to build with Python 3.9
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nbformat
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-09 04:32 UTC by Charalampos Stratakis
Modified: 2020-01-13 23:35 UTC (History)
5 users (show)

Fixed In Version: python-nbformat-5.0.3-1.fc32
Clone Of:
Environment:
Last Closed: 2020-01-12 00:57:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charalampos Stratakis 2020-01-09 04:32:03 UTC
python-nbformat fails to build with Python 3.9.0a2.

ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.9/collections/__init__.py)

This is due to Mapping being accessible only from collections.abc with Python 3.9

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01142004-python-nbformat/

For all our attempts to build python-nbformat with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-nbformat/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Charalampos Stratakis 2020-01-09 04:32:27 UTC
A potential fix:

diff --git a/nbformat/notebooknode.py b/nbformat/notebooknode.py
index 5e1fded..b8b59fa 100644
--- a/nbformat/notebooknode.py
+++ b/nbformat/notebooknode.py
@@ -1,7 +1,7 @@
 """NotebookNode - adding attribute access to dicts"""
 
 from ipython_genutils.ipstruct import Struct
-from collections import Mapping
+from collections.abc import Mapping
 
 
 class NotebookNode(Struct):

Comment 2 Orion Poplawski 2020-01-12 00:57:07 UTC
Looks like this was addressed in 5.0.0.  So hopefully fixed now.

Comment 3 Charalampos Stratakis 2020-01-13 23:35:32 UTC
The issue has been fixed, thanks Orion!


Note You need to log in before you can comment on or make changes to this bug.