Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947690 - sys-apps/portage-3.0.66.1-r1 - emerge throws an ".../threading.py", line 1383, in __del__ TypeError: 'NoneType' object does not support the context manager protocol" since upgraded to python 3.13
Summary: sys-apps/portage-3.0.66.1-r1 - emerge throws an ".../threading.py", line 1383...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-07 22:37 UTC by ernsteiswuerfel
Modified: 2025-01-07 23:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_947690.txt,6.68 KB, text/plain)
2025-01-07 22:37 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2025-01-07 22:37:44 UTC
Created attachment 916078 [details]
emerge --info

Since I enabled python on my ppc/23.0/musl system via PYTHON_TARGETS="python3_12 python3_13" in make.conf and did an 'emerge -uND world' I get this error every time I invoke emerge:

 # emerge -p1v python

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 7.41 s (backtrack: 0/20).

[ebuild   R    ] dev-lang/python-3.13.1:3.13::gentoo  USE="ensurepip ncurses readline sqlite ssl -bluetooth -build -debug -examples -gdbm (-jit) -libedit -pgo -test -tk -valgrind -verify-sig" LLVM_SLOT="18" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf71fac58>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1383, in __del__
TypeError: 'NoneType' object does not support the context manager protocol


So far I am only seeing this on my ppc system, not on ppc64 or amd64.
Comment 1 ernsteiswuerfel archtester 2025-01-07 22:45:50 UTC
At emerging stuff I get runtime errors like this:

[...]
Exception ignored in: <function _after_fork at 0xf6ebc5c8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
 * boost_1_85_0.tar.bz2 BLAKE2B SHA512 size ;-) ...                                     [ ok ]
Exception ignored in: <function _after_fork at 0xf72385c8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
Exception ignored in: <function _after_fork at 0xf6ee22a8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf6edfd98>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1383, in __del__
TypeError: 'NoneType' object does not support the context manager protocol
Exception ignored in: <function _after_fork at 0xf75ad3e8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
>>> Unpacking source...
>>> Unpacking boost_1_85_0.tar.bz2 to /var/tmp/portage/dev-libs/boost-1.85.0-r1/work
>>> Source unpacked in /var/tmp/portage/dev-libs/boost-1.85.0-r1/work
Exception ignored in: <function _after_fork at 0xf70902a8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf708dd98>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1383, in __del__
TypeError: 'NoneType' object does not support the context manager protocol
Exception ignored in: <function _after_fork at 0xf70063e8>
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1586, in _after_fork
    thread._after_fork(new_ident=ident)
  File "/usr/lib/python3.13/threading.py", line 934, in _after_fork
    assert self._handle.ident == new_ident
AssertionError: 
>>> Preparing source in /var/tmp/portage/dev-libs/boost-1.85.0-r1/work/boost_1_85_0 ...
[...]
Comment 2 ernsteiswuerfel archtester 2025-01-07 23:05:24 UTC
In #gentoo-powerpc IRC Sam pointed me to a forum post with the same error message: https://forums.gentoo.org/viewtopic-t-1172337.html

The linked build.log (https://bpa.st/GEXQ) shows the same error message on a x86_32/musl system using python-3.13.
Comment 3 Zac Medico gentoo-dev 2025-01-07 23:09:13 UTC
This looks like more of a python problem than a portage problem.