GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Help function throws error with sqlite3 module · Issue #101717 · python/cpython

Help function throws error with sqlite3 module #101717

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Help function throws error with sqlite3 module#101717
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@kbidlack
kbidlack
opened on Feb 8, 2023
Issue body actions

Bug report

When running the help function on the sqlite3 module, a RuntimeError is thrown:

>>> import sqlite3
>>> help(sqlite3)
Traceback (most recent call last):
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2222, in wrap_value
    value = eval(s, module_dict)
            ^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 1, in <module>
NameError: name 'ConnectionType' is not defined. Did you mean: 'Connection'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2225, in wrap_value
    value = eval(s, sys_module_dict)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 1, in <module>
NameError: name 'ConnectionType' is not defined. Did you mean: 'ConnectionError'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen _sitebuiltins>", line 103, in __call__
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 2002, in __call__
    self.help(request)
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 2063, in help
    else: doc(request, 'Help on %s:', output=self._output)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 1784, in doc
    pager(render_doc(thing, title, forceload))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 1778, in render_doc
    return title % desc + '\n\n' + renderer.document(object, name)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 479, in document
    if inspect.ismodule(object): return self.docmodule(*args)
                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 1275, in docmodule
    contents.append(self.document(value, key, name))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 481, in document
    if inspect.isroutine(object): return self.docroutine(*args)
                                         ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/pydoc.py", line 1494, in docroutine
    signature = inspect.signature(object)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 3278, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 3026, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2518, in _signature_from_callable
    return _signature_from_builtin(sigcls, obj,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2327, in _signature_from_builtin
    return _signature_fromstr(cls, func, s, skip_bound_arg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2275, in _signature_fromstr
    p(name, default)
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2257, in p
    default_node = RewriteSymbolics().visit(default_node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2249, in visit_Name
    return wrap_value(node.id)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/kavi/.pyenv/versions/3.11.1/lib/python3.11/inspect.py", line 2227, in wrap_value
    raise RuntimeError()
RuntimeError

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: MacOS (intel)

Activity

  1. kbidlack
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Feb 8, 2023
  2. OTheDev commented on Feb 9, 2023

    @OTheDev
    OTheDev
    on Feb 9, 2023
    Contributor
    More actions

    This is a known issue. See #99003.

    It is fixed in 3.11.2 (:

  3. arhadthedev
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    topic-sqlite3
    on Feb 9, 2023
  4. arhadthedev commented on Feb 9, 2023

    @arhadthedev
    arhadthedev
    on Feb 9, 2023
    Member
    More actions

    It is fixed in 3.11.2 (:

    More details: #99003 (comment).

  5. arhadthedev commented on Feb 9, 2023

    @arhadthedev
    arhadthedev
    on Feb 9, 2023
    Member
    More actions

    Closing as a duplicate of gh-99003.

  6. arhadthedev
    closed this as not plannedon Feb 9, 2023
  7. arhadthedev commented on Feb 9, 2023

    @arhadthedev
    arhadthedev
    on Feb 9, 2023
    Member
    More actions

    I've brought it up in #83685 (comment) though; see there for further discussion.

    Reacted by Owain Davies and Kavi Bidlack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.