Bug 1913266
Summary: | mkdocs fails to build with Python 3.10: ImportError: cannot import name 'Sequence' from 'collections' | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
Component: | mkdocs | Assignee: | Robin Lee <robinlee.sysu> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | code, jamatos, mhroncok, robinlee.sysu, thrnciar, tir.karthi, williamjmorenor |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-06-14 10:38:26 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1890881 |
Description
Tomáš Hrnčiar
2021-01-06 11:49:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34. The vendored copy of the file seems to have been removed in https://github.com/mkdocs/mkdocs/commit/5c2b4f13536009852046c89aadd63ac46eacbaaa and should fix the issue. This is due to some validations done from mock in Python 3.10 to catch typos : https://github.com/python/cpython/pull/23737 (In reply to Karthikeyan Singaravelan from comment #2) > The vendored copy of the file seems to have been removed in > https://github.com/mkdocs/mkdocs/commit/ > 5c2b4f13536009852046c89aadd63ac46eacbaaa and should fix the issue. This is > due to some validations done from mock in Python 3.10 to catch typos : > https://github.com/python/cpython/pull/23737 Backporting this commit indeed fixes the issue with Python 3.10. This commit also introduces a new dependency on ghp-import. We have only ghp-import2 in Fedora, so it would be good to communicate with the maintainer to switch to ghp-import (https://pypi.org/project/ghp-import/). To clarify, ghp-import2 was created long time ago as an active fork of (dead at the time) ghp-import. But now the situation is reversed and ghp-import is active, ghp-import2 is dead. In Fedora, we have ghp-import2 packaged, for nikola, but nikola already switched as well: https://github.com/getnikola/nikola/commit/6bafa5f28e1a96411bbd85c0e9fd4309d82ba5e3 CCing the Fedora maintainer of nikola and ghp-import2 This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla. The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide. You can either build the package in the side tag, with: $ fedpkg build --target=f35-python Or you can the build and we will eventually build it for you. Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away. Thanks. See also https://fedoraproject.org/wiki/Changes/Python3.10 If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/ The current failure is: + /usr/bin/python3 -m mkdocs build Traceback (most recent call last): File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/builddir/build/BUILD/mkdocs-1.1.2/mkdocs/__main__.py", line 15, in <module> from mkdocs import config # noqa: E402 File "/builddir/build/BUILD/mkdocs-1.1.2/mkdocs/config/__init__.py", line 2, in <module> from mkdocs.config.defaults import DEFAULT_SCHEMA File "/builddir/build/BUILD/mkdocs-1.1.2/mkdocs/config/defaults.py", line 1, in <module> from mkdocs.config import config_options File "/builddir/build/BUILD/mkdocs-1.1.2/mkdocs/config/config_options.py", line 2, in <module> from collections import Sequence, namedtuple ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib64/python3.10/collections/__init__.py) Upstream fix: https://github.com/mkdocs/mkdocs/commit/72f506dcce8db268ae4b3798cd30c8afd378d076 I have submitted a PR that resolves this (https://src.fedoraproject.org/rpms/mkdocs/pull-request/2). - It includes the commit you referenced as a patch. - It also backports another upstream commit to fix an IP address parsing bug with python 3.9.5 and later, not previously reported in this issue, which was causing a test failure. - Finally, it includes a temporary downstream patch for the “auto_spec” problem mentioned above, which simply changes the keyword argument to “autospec” without introducing the new “ghp-import” dependency. All of these patches can be dropped after the next upstream release. Collectively, this resolves all of the test failures and other issues on Python 3.10. The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build. This package was successfully rebuilt with Python 3.10. If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it. This package was successfully rebuilt with Python 3.10. If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it. |