Bug 2305924 - python3.12.5 breaks mercurial
Summary: python3.12.5 breaks mercurial
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mercurial
Version: 39
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mads Kiilerich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-19 22:30 UTC by Dmitri A. Sergatskov
Modified: 2024-09-04 03:53 UTC (History)
13 users (show)

Fixed In Version: mercurial-6.7.4-3.fc40 mercurial-6.5.3-3.fc39
Clone Of:
Environment:
Last Closed: 2024-09-04 03:53:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources mercurial pull-request 20 0 None None None 2024-08-20 10:03:24 UTC
Fedora Package Sources mercurial pull-request 21 0 None None None 2024-08-20 10:15:54 UTC

Description Dmitri A. Sergatskov 2024-08-19 22:30:19 UTC
After upgrading python to 3.12.5 (from testin), mercurial does not work.
E.g.:
$ hg --version
Traceback (most recent call last):
  File "/usr/bin/hg", line 57, in <module>
    from mercurial import dispatch
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/usr/lib64/python3.12/site-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
    super().exec_module(module)
  File "<frozen importlib.util>", line 257, in exec_module
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/usr/lib64/python3.12/site-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
    super().exec_module(module)
  File "<frozen importlib.util>", line 267, in exec_module
AttributeError: partially initialized module 'threading' has no attribute 'RLock' (most likely due to a circular import


Reproducible: Always



Expected Results:  
after downgrading, it works again:
$ sudo dnf downgrade python
[sudo] password for XXXXXXXX: 
Last metadata expiration check: 0:04:55 ago on Mon 19 Aug 2024 06:23:47 PM EDT.
Dependencies resolved.
====================================================================================================================================================================================================================
 Package                                                         Architecture                                Version                                             Repository                                    Size
====================================================================================================================================================================================================================
Downgrading:
 python-unversioned-command                                      noarch                                      3.12.4-1.fc40                                       updates                                       11 k
 python3                                                         x86_64                                      3.12.4-1.fc40                                       updates                                       27 k
 python3-libs                                                    x86_64                                      3.12.4-1.fc40                                       updates                                      9.1 M
 python3-tkinter                                                 x86_64                                      3.12.4-1.fc40                                       updates                                      410 k

$ hg --version
Mercurial Distributed SCM (version 6.7.4)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2023 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Comment 1 Elliott Sales de Andrade 2024-08-19 23:12:54 UTC
This is a duplicate of bug 2299346, except for F40 since Python 3.12 had similar backports. So the same backport should be applied to mercurial on F40, and the workaround from that bug should also work.

Comment 2 Dmitri A. Sergatskov 2024-08-19 23:29:27 UTC
Thanks! I can verify that mercurial-6.8.1-2 (rpm rebuild from fedora 41) works with python-3.12.5
$ hg --version
Mercurial Distributed SCM (version 6.8.1)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2024 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ python3 --version
Python 3.12.5

Dmitri.
--

Comment 3 Miro Hrončok 2024-08-20 10:03:24 UTC
Sync Fedora 40 with Fedora 41 to fix mercurial with Python 3.12.5:

https://src.fedoraproject.org/rpms/mercurial/pull-request/20

Comment 4 Miro Hrončok 2024-08-20 10:15:54 UTC
[F39] Exclude threading and warnings from demandimport:

https://src.fedoraproject.org/rpms/mercurial/pull-request/21

Comment 5 Fedora Update System 2024-08-21 20:39:02 UTC
FEDORA-2024-1b8e4dd88f (mercurial-6.7.4-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b8e4dd88f

Comment 6 Fedora Update System 2024-08-22 01:45:46 UTC
FEDORA-2024-1b8e4dd88f has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1b8e4dd88f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b8e4dd88f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-08-24 01:53:31 UTC
FEDORA-2024-1b8e4dd88f (mercurial-6.7.4-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2024-08-26 07:57:39 UTC
FEDORA-2024-cd388c945c (mercurial-6.5.3-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-cd388c945c

Comment 9 Fedora Update System 2024-08-27 02:34:12 UTC
FEDORA-2024-cd388c945c has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-cd388c945c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-cd388c945c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Marco Saluzzo 2024-08-27 18:41:07 UTC
Confirm that the patch FEDORA-2024-cd388c945c resolves the issue with 3.12.5 on F39

$ hg --version
Mercurial Distributed SCM (version 6.5.3)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2023 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS

Comment 11 Fedora Update System 2024-09-04 03:53:10 UTC
FEDORA-2024-cd388c945c (mercurial-6.5.3-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


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