mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
[3.14] gh-136434: Fix docs generation of UnboundItem
in subinterpreters (GH-136435) (#136540)
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
gh-136434: Fix docs generation of `UnboundItem` in subinterpreters (GH-136435)
(cherry picked from commit 3343fce05a
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
fdad31924c
commit
a464c4e2e8
2 changed files with 14 additions and 7 deletions
|
@ -40,16 +40,21 @@ class UnboundItem:
|
|||
|
||||
@classonly
|
||||
def singleton(cls, kind, module, name='UNBOUND'):
|
||||
doc = cls.__doc__.replace('cross-interpreter container', kind)
|
||||
doc = doc.replace('cross-interpreter', kind)
|
||||
doc = cls.__doc__
|
||||
if doc:
|
||||
doc = doc.replace(
|
||||
'cross-interpreter container', kind,
|
||||
).replace(
|
||||
'cross-interpreter', kind,
|
||||
)
|
||||
subclass = type(
|
||||
f'Unbound{kind.capitalize()}Item',
|
||||
(cls,),
|
||||
dict(
|
||||
_MODULE=module,
|
||||
_NAME=name,
|
||||
__doc__=doc,
|
||||
),
|
||||
{
|
||||
"_MODULE": module,
|
||||
"_NAME": name,
|
||||
"__doc__": doc,
|
||||
},
|
||||
)
|
||||
return object.__new__(subclass)
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix docs generation of ``UnboundItem`` in :mod:`concurrent.interpreters`
|
||||
when running with :option:`-OO`.
|
Loading…
Add table
Add a link
Reference in a new issue