pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/3343fce05acb29a772599ce586abd43edf40bae6

gh-136434: Fix docs generation of `UnboundItem` in subinterpreters (#… · python/cpython@3343fce · GitHub
Skip to content

Commit 3343fce

Browse files
authored
gh-136434: Fix docs generation of UnboundItem in subinterpreters (#136435)
1 parent 975b57d commit 3343fce

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

Lib/concurrent/interpreters/_crossinterp.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,21 @@ class UnboundItem:
4040

4141
@classonly
4242
def singleton(cls, kind, module, name='UNBOUND'):
43-
doc = cls.__doc__.replace('cross-interpreter container', kind)
44-
doc = doc.replace('cross-interpreter', kind)
43+
doc = cls.__doc__
44+
if doc:
45+
doc = doc.replace(
46+
'cross-interpreter container', kind,
47+
).replace(
48+
'cross-interpreter', kind,
49+
)
4550
subclass = type(
4651
f'Unbound{kind.capitalize()}Item',
4752
(cls,),
48-
dict(
49-
_MODULE=module,
50-
_NAME=name,
51-
__doc__=doc,
52-
),
53+
{
54+
"_MODULE": module,
55+
"_NAME": name,
56+
"__doc__": doc,
57+
},
5358
)
5459
return object.__new__(subclass)
5560

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix docs generation of ``UnboundItem`` in :mod:`concurrent.interpreters`
2+
when running with :option:`-OO`.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy