Bug 1868006
Summary: | python38: Support for alternative architectures' names in Python importlib | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Lumír Balhar <lbalhar> |
Component: | python38 | Assignee: | Lumír Balhar <lbalhar> |
Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.0 | CC: | cstratak, pviktori, rhel-cs-apps-subsystem-qe, torsava |
Target Milestone: | beta | Keywords: | Reproducer, Triaged |
Target Release: | 8.4 | Flags: | pm-rhel:
mirror+
|
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python38-3.8.6-2.module+el8.4.0+9001+fc421f6c | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | 1868003 | Environment: | |
Last Closed: | 2021-05-18 15:53:56 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: | 1868003 | ||
Bug Blocks: |
Description
Lumír Balhar
2020-08-11 11:50:48 UTC
To test this, install and run the third-party Numpy package on ppc64le. The test currently exists (I'm not sure where) but is failing. This can wait for RHEL 8.4.0 because it needs some time in Fedora first. The change is ready in https://src.osci.redhat.com/rpms/python38/c/39c2cf50cf9227125068160bdf0aac901cf8e90f?branch=private-lbalhar-stream-3.8-rhel-8.4.0 Scratch build: https://mbsweb.engineering.redhat.com/module/7653 Verification: old: # python3.8 -c "import sys; print(sys.path_importer_cache['/usr/lib64/python3.8']._loaders)" [('.cpython-38-ppc64le-linux-gnu.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.abi3.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.py', <class '_frozen_importlib_external.SourceFileLoader'>), ('.pyc', <class '_frozen_importlib_external.SourcelessFileLoader'>)] new: # python3.8 -c "import sys; print(sys.path_importer_cache['/usr/lib64/python3.8']._loaders)" [('.cpython-38-ppc64le-linux-gnu.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.abi3.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.cpython-38-powerpc64le-linux-gnu.so', <class '_frozen_importlib_external.ExtensionFileLoader'>), ('.py', <class '_frozen_importlib_external.SourceFileLoader'>), ('.pyc', <class '_frozen_importlib_external.SourcelessFileLoader'>)] # pip3.8 install simple.manylinux-demo # python3.8 -m unittest discover dummyextension.tests . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK The change is ready but untested in https://src.osci.redhat.com/rpms/python38/c/c3c61d86034bad1237818a45a5cd691aff301f5c?branch=private-lbalhar-stream-3.8-rhel-8.4.0 I cannot test it because I cannot rebuild Python 38 module because of a problem with dependencies collision between baseos and the module described in https://projects.engineering.redhat.com/browse/RHELBLD-3128 Module scratch build: https://mbsweb.engineering.redhat.com/module/8914 Python 3.8 component: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33406200 PR: https://src.osci.redhat.com/rpms/python38/pull-request/5 Verification: Old version (python38-3.8.3-3.module+el8.3.0+7680+79e7e61a.ppc64le) # python3.8 -m venv venv source venv/bin/activate # source venv/bin/activate (venv) # pip install -U pip Collecting pip Downloading https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl (1.5MB) |████████████████████████████████| 1.5MB 1.8MB/s Installing collected packages: pip Found existing installation: pip 19.3.1 Uninstalling pip-19.3.1: Successfully uninstalled pip-19.3.1 Successfully installed pip-20.3 (venv) # pip install simple-manylinux-demo Collecting simple-manylinux-demo Downloading simple_manylinux_demo-1.0-cp38-cp38-manylinux2014_ppc64le.whl (17 kB) Installing collected packages: simple-manylinux-demo Successfully installed simple-manylinux-demo-1.0 (venv) # ls -la venv/lib/python3.8/site-packages/dummyextension/ total 120 drwxr-xr-x. 4 root root 4096 Dec 2 08:28 . drwxr-xr-x. 10 root root 4096 Dec 2 08:28 .. -rw-r--r--. 1 root root 0 Dec 2 08:28 __init__.py drwxr-xr-x. 2 root root 4096 Dec 2 08:28 __pycache__ -rwxr-xr-x. 1 root root 89176 Dec 2 08:28 extension.cpython-38-powerpc64le-linux-gnu.so drwxr-xr-x. 3 root root 4096 Dec 2 08:28 tests (venv) # python Python 3.8.3 (default, Aug 18 2020, 12:58:59) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from dummyextension import extension Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'extension' from 'dummyextension' (/venv/lib64/python3.8/site-packages/dummyextension/__init__.py) >>> import sysconfig >>> sysconfig.get_config_var("EXT_SUFFIX") '.cpython-38-ppc64le-linux-gnu.so' New version (python38-3.8.6-2.scrmod+el8.4.0+8900+a7d53920.ppc64le) # python3.8 -m venv venv # source venv/bin/activate (venv) # pip install -U pip Collecting pip Using cached https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 19.3.1 Uninstalling pip-19.3.1: Successfully uninstalled pip-19.3.1 Successfully installed pip-20.3 (venv) # pip install simple-manylinux-demo Collecting simple-manylinux-demo Using cached simple_manylinux_demo-1.0-cp38-cp38-manylinux2014_ppc64le.whl (17 kB) Installing collected packages: simple-manylinux-demo Successfully installed simple-manylinux-demo-1.0 (venv) # python Python 3.8.6 (default, Dec 1 2020, 07:56:20) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from dummyextension import extension >>> import sysconfig >>> sysconfig.get_config_var("EXT_SUFFIX") '.cpython-38-ppc64le-linux-gnu.so' >>> (venv) # git clone https://github.com/frenzymadness/simple-manylinux-demo.git (venv) # cd simple-manylinux-demo/ (venv) # python setup.py build (venv) # ls -la build total 32 drwxr-xr-x. 4 root root 4096 Dec 2 08:33 . drwxr-xr-x. 5 root root 4096 Dec 2 08:33 .. drwxr-xr-x. 3 root root 4096 Dec 2 08:33 lib.linux-ppc64le-3.8 drwxr-xr-x. 3 root root 4096 Dec 2 08:33 temp.linux-ppc64le-3.8 (venv) # ls -la build/lib.linux-ppc64le-3.8/dummyextension/ total 56 drwxr-xr-x. 3 root root 4096 Dec 2 08:33 . drwxr-xr-x. 3 root root 4096 Dec 2 08:33 .. -rw-r--r--. 1 root root 0 Dec 2 08:33 __init__.py -rwxr-xr-x. 1 root root 89368 Dec 2 08:33 extension.cpython-38-ppc64le-linux-gnu.so drwxr-xr-x. 2 root root 4096 Dec 2 08:33 tests (venv) # PYTHONPATH=build/lib.linux-ppc64le-3.8/dummyextension/ python Python 3.8.6 (default, Dec 1 2020, 07:56:20) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import extension >>> The PR is merged. I'm gonna rebuild the module together with other fixes later. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: python38:3.8 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1879 |