Bug 162798 - [Request][25.2] Add "lib\importlib\readers.py" to Python
Summary: [Request][25.2] Add "lib\importlib\readers.py" to Python
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-04 22:58 UTC by nobu
Modified: 2024-09-13 17:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2024-09-04 22:58:54 UTC
Description:
Add "lib\importlib\readers.py" to Python.

I'm referring to the recent LibreOffice 25.2, which includes Python 3.10.

Steps to Reproduce:
1. Download get-pip.py.
2. Install pip using python.exe get-pip.py using the prescribed method.

Actual Results:
3. Fail.

Expected Results:
3. pip will be installed.


Reproducible: Always


User Profile Reset: No

Additional Info:
If "lib\importlib\readers.py" is added, pip installation will be successful.

Reproducible with
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 677750f3f3d21c40e37cc4296673c931a0cb3779
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 10240); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded
Comment 1 nobu 2024-09-06 22:01:26 UTC
For an easy-to-understand explanation, I used the problem when installing "pip" as an example, but there are major packages that do not work properly due to the lack of "readers.py".
Comment 2 nobu 2024-09-13 08:48:55 UTC
APSO version v1.4.2 shows the following error message when installing pip.

Traceback (most recent call last):
  File "C:\Users\TAC_D4\AppData\Local\Temp\get-pip.py", line 28425, in <module>
    main()
  File "C:\Users\TAC_D4\AppData\Local\Temp\get-pip.py", line 137, in main
    bootstrap(tmpdir=tmpdir)
  File "C:\Users\TAC_D4\AppData\Local\Temp\get-pip.py", line 113, in bootstrap
    monkeypatch_for_cert(tmpdir)
  File "C:\Users\TAC_D4\AppData\Local\Temp\get-pip.py", line 94, in monkeypatch_for_cert
    from pip._internal.commands.install import InstallCommand
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_internal\commands\install.py", line 16, in <module>
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_internal\cli\req_command.py", line 18, in <module>
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_internal\index\collector.py", line 31, in <module>
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_vendor\requests\__init__.py", line 146, in <module>
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_vendor\requests\utils.py", line 63, in <module>
  File "C:\Users\TAC_D4\AppData\Local\Temp\tmp3ff7vjiw\pip.zip\pip\_vendor\certifi\core.py", line 76, in where
  File "F:\sub1\LO_252\program\python-core-3.10.15\lib\importlib\resources.py", line 119, in path
    reader = _common.get_resource_reader(_common.get_package(package))
  File "F:\sub1\LO_252\program\python-core-3.10.15\lib\importlib\_common.py", line 52, in get_resource_reader
    return reader(spec.name)  # type: ignore
  File "<frozen zipimport>", line 326, in get_resource_reader
ModuleNotFoundError: No module named 'importlib.readers'

Reproducible with
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 47a348bb0fd6dfdd93c1975d216daadc4f6b9b6f
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 10240); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: threaded
Comment 3 Commit Notification 2024-09-13 17:13:12 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a3adfdb2d93f7ee1f7559bcec1e0461f840a4a6e

tdf#162798: python3: Add lib/importlib/readers.py

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco Faulí 2024-09-13 17:13:38 UTC
Hi nobu,
Thanks for reporting this issue. It should be fixed now