Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pydoc fails for test.test_enum #116600

Closed
Closed
Assignees
ethanfurman
Labels
3.11only security fixes3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@serhiy-storchaka

Description

@serhiy-storchaka

Bug report

$ ./python -m pydoc test.test_enumTraceback (most recent call last):  File "/home/serhiy/py/cpython/Lib/runpy.py", line 198, in _run_module_as_main    return _run_code(code, main_globals, None,           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^                     "__main__", mod_spec)                     ^^^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/runpy.py", line 88, in _run_code    exec(code, run_globals)    ~~~~^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2948, in <module>    cli()    ~~~^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2909, in cli    help.help(arg, is_cli=True)    ~~~~~~~~~^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2165, in help    elif request: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)                  ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1881, in doc    pager(render_doc(thing, title, forceload))          ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1874, in render_doc    return title % desc + '\n\n' + renderer.document(object, name)                                   ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 521, in document    if inspect.ismodule(object): return self.docmodule(*args)                                        ~~~~~~~~~~~~~~^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1341, in docmodule    contents.append(self.document(value, key, name))                    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 522, in document    if inspect.isclass(object): return self.docclass(*args)                                       ~~~~~~~~~~~~~^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1512, in docclass    attrs = spilldata("Data and other attributes %s:\n" % tag, attrs,            ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                      lambda t: t[1] == 'data')                      ^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1475, in spilldata    push(self.docother(obj, name, mod, maxlen=70, doc=doc) +         ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1620, in docother    repr = self.repr(object)           ~~~~~~~~~^^^^^^^^  File "/home/serhiy/py/cpython/Lib/reprlib.py", line 60, in repr    return self.repr1(x, self.maxlevel)           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1213, in repr1    return cram(stripid(repr(x)), self.maxother)                        ~~~~^^^  File "/home/serhiy/py/cpython/Lib/enum.py", line 1685, in global_flag_repr    if _is_single_bit(self):       ~~~~~~~~~~~~~~^^^^^^  File "/home/serhiy/py/cpython/Lib/enum.py", line 96, in _is_single_bit    num &= num - 1           ~~~~^~~TypeError: unsupported operand type(s) for -: 'NoName' and 'int'

cc@ethanfurman

Linked PRs

Metadata

Metadata

Assignees

Labels

3.11only security fixes3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp