René's URL Explorer Experiment


Title: Prompt broken when launching `bpython.embed()` from ipdb · Issue #907 · bpython/bpython · GitHub

Open Graph Title: Prompt broken when launching `bpython.embed()` from ipdb · Issue #907 · bpython/bpython

X Title: Prompt broken when launching `bpython.embed()` from ipdb · Issue #907 · bpython/bpython

Description: Description BPython prompt breaks when executing .embed() from ipdb context. New lines are not shown after input, prompt text is altered by IPython and not reset by bpython, dict outputs do not show, and with long dict the prompt is repe...

Open Graph Description: Description BPython prompt breaks when executing .embed() from ipdb context. New lines are not shown after input, prompt text is altered by IPython and not reset by bpython, dict outputs do not sho...

X Description: Description BPython prompt breaks when executing .embed() from ipdb context. New lines are not shown after input, prompt text is altered by IPython and not reset by bpython, dict outputs do not sho...

Opengraph URL: https://github.com/bpython/bpython/issues/907

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Prompt broken when launching `bpython.embed()` from ipdb","articleBody":"## Description\r\nBPython prompt breaks when executing `.embed()` from ipdb context.\r\nNew lines are not shown after input, prompt text is altered by IPython and not reset by bpython, dict outputs do not show, and with long dict the prompt is repeated after the actual data.\r\n\r\nPossible fix would be to reset readline and Python repl settings when entering embedded bpython.\r\nVersions:\r\n```sh\r\n$ python -c 'print(__import__(\"bpython\").__version__)'\r\n0.21\r\n$ python -c 'print(__import__(\"IPython\").__version__)'\r\n7.26.0\r\n```\r\n\r\n## Steps to reproduce\r\n```sh\r\n$ python -c 'from IPython.terminal.debugger import set_trace; set_trace()'\r\n--Return--\r\nNone\r\n> \u003cstring>(1)\u003cmodule>()\r\n\r\nipdb> import bpython; bpython.embed()\r\n\r\nIn : # When short text is typed, no newline is printed\r\nIn : # Next line wriitten input is `123`\r\nIn : 123123\r\nIn : # Dicts get cut off when cursor is at last character\r\nIn : # Next line input is `{'foo': 'bar'}\u003cENTER>`\r\nIn : {'foo': 'bar'{'foo': 'bar'}\r\nIn : # With long dicts the output is placed without newline and the prompt repeated after the output without new line and some text is cut off at the end.\r\nIn : # Next line `locals()` is inputted and enter pressed.\r\nIn : locals(){'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': None, '__spec__': None, '__builtins__': {'__name__': 'builtins', '__doc__': \"Built-in functions, exceptions, and other objects.\\n\\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.\", '__package__': '', '__loader__': \u003cclass '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=\u003cclass '_frozen_importlib.BuiltinImporter'>, origin='built-in'), '__build_class__': \u003cbuilt-in function __build_class__>, '__import__': \u003cbuilt-in function __import__>, 'abs': \u003cbuilt-in function abs>, 'all': \u003cbuilt-in function all>, 'any': \u003cbuilt-in function any>, 'ascii': \u003cbuilt-in function ascii>, 'bin': \u003cbuilt-in function bin>, 'breakpoint': \u003cbuilt-in function breakpoint>, 'callable': \u003cbuilt-in function callable>, 'chr': \u003cbuilt-in function chr>, 'compile': \u003cbuilt-in function compile>, 'delattr': \u003cbuilt-in function delattr>, 'dir': \u003cbuilt-in function dir>, 'divmod': \u003cbuilt-in function divmod>, 'eval': \u003cbuilt-in function eval>, 'exec': \u003cbuilt-in function exec>, 'format': \u003cbuilt-in function format>, 'getattr': \u003cbuilt-in function getattr>, 'globals': \u003cbuilt-in function globals>, 'hasattr': \u003cbuilt-in function hasattr>, 'hash': \u003cbuilt-in function hash>, 'hex': \u003cbuilt-in function hex>, 'id': \u003cbuilt-in function id>, 'input': \u003cbuilt-in function input>, 'isinstance': \u003cbuilt-in function isinstance>, 'issubclass': \u003cbuilt-in function issubclass>, 'iter': \u003cbuilt-in function iter>, 'len': \u003cbuilt-in function len>, 'locals': \u003cbuilt-in function locals>, 'max': \u003cbuilt-in function max>, 'min': \u003cbuilt-in function min>, 'next': \u003cbuilt-in function next>, 'oct': \u003cbuilt-in function oct>, 'ord': \u003cbuilt-in function ord>, 'pow': \u003cbuilt-in function pow>, 'print': \u003cbuilt-in function print>, 'repr': \u003cbuilt-in function repr>, 'round': \u003cbuilt-in function round>, 'setattr': \u003cbuilt-in function setattr>, 'sorted': \u003cbuilt-in function sorted>, 'sum': \u003cbuilt-in function sum>, 'vars': \u003cbuilt-in function vars>, 'None': None, 'Ellipsis': Ellipsis, 'NotImplemented': NotImplemented, 'False': False, 'True': True, 'bool': \u003cclass 'bool'>, 'memoryview': \u003cclass 'memoryview'>, 'bytearray': \u003cclass 'bytearray'>, 'bytes': \u003cclass 'bytes'>, 'classmethod': \u003cclass 'classmethod'>, 'complex': \u003cclass 'complex'>, 'dict': \u003cclass 'dict'>, 'enumerate': \u003cclass 'enumerate'>, 'filter': \u003cclass 'filter'>, 'float': \u003cclass 'float'>, 'frozenset': \u003cclass 'frozenset'>, 'property': \u003cclass 'property'>, 'int': \u003cclass 'int'>, 'list': \u003cclass 'list'>, 'map': \u003cclass 'map'>, 'object': \u003cclass 'object'>, 'range': \u003cclass 'range'>, 'reversed': \u003cclass 'reversed'>, 'set': \u003cclass 'set'>, 'slice': \u003cclass 'slice'>, 'staticmethod': \u003cclass 'staticmethod'>, 'str': \u003cclass 'str'>, 'super': \u003cclass 'super'>, 'tuple': \u003cclass 'tuple'>, 'type': \u003cclass 'type'>, 'zip': \u003cclass 'zip'>, '__debug__': True, 'BaseException': \u003cclass 'BaseException'>, 'Exception': \u003cclass 'Exception'>, 'TypeError': \u003cclass 'TypeError'>, 'StopAsyncIteration': \u003cclass 'StopAsyncIteration'>, 'StopIteration': \u003cclass 'StopIteration'>, 'GeneratorExit': \u003cclass 'GeneratorExit'>, 'SystemExit': \u003cclass 'SystemExit'>, 'KeyboardInterrupt': \u003cclass 'KeyboardInterrupt'>, 'ImportError': \u003cclass 'ImportError'>, 'ModuleNotFoundError': \u003cclass 'ModuleNotFoundError'>, 'OSError': \u003cclass 'OSError'>, 'EnvironmentError': \u003cclass 'OSError'>, 'IOError': \u003cclass 'OSError'>, 'EOFError': \u003cclass 'EOFError'>, 'RuntimeError': \u003cclass 'RuntimeError'>, 'RecursionError': \u003cclass 'RecursionError'>, 'NotImplementedError': \u003cclass 'NotImplementedError'>, 'NameError': \u003cclass 'NameError'>, 'UnboundLocalError': \u003cclass 'UnboundLocalError'>, 'AttributeError': \u003cclass 'AttributeError'>, 'SyntaxError': \u003cclass 'SyntaxError'>, 'IndentationError': \u003cclass 'IndentationError'>, 'TabError': \u003cclass 'TabError'>, 'LookupError': \u003cclass 'LookupError'>, 'IndexError': \u003cclass 'IndexError'>, 'KeyError': \u003cclass 'KeyError'>, 'ValueError': \u003cclass 'ValueError'>, 'UnicodeError': \u003cclass 'UnicodeError'>, 'UnicodeEncodeError': \u003cclass 'UnicodeEncodeError'>, 'UnicodeDecodeError': \u003cclass 'UnicodeDecodeError'>, 'UnicodeTranslateError': \u003cclass 'UnicodeTranslateError'>, 'AssertionError': \u003cclass 'AssertionError'>, 'ArithmeticError': \u003cclass 'ArithmeticError'>, 'FloatingPointError': \u003cclass 'FloatingPointError'>, 'OverflowError': \u003cclass 'OverflowError'>, 'ZeroDivisionError': \u003cclass 'ZeroDivisionError'>, 'SystemError': \u003cclass 'SystemError'>, 'ReferenceError': \u003cclass 'ReferenceError'>, 'MemoryError': \u003cclass 'MemoryError'>, 'BufferError': \u003cclass 'BufferError'>, 'Warning': \u003cclass 'Warning'>, 'UserWarning': \u003cclass 'UserWarning'>, 'DeprecationWarning': \u003cclass 'DeprecationWarning'>, 'PendingDeprecationWarning': \u003cclass 'PendingDeprecationWarning'>, 'SyntaxWarning': \u003cclass 'SyntaxWarning'>, 'RuntimeWarning': \u003cclass 'RuntimeWarning'>, 'FutureWarning': \u003cclass 'FutureWarning'>, 'ImportWarning': \u003cclass 'ImportWarning'>, 'UnicodeWarning': \u003cclass 'UnicodeWarning'>, 'BytesWarning': \u003cclass 'BytesWarning'>, 'ResourceWarning': \u003cclass 'ResourceWarning'>, 'ConnectionError': \u003cclass 'ConnectionError'>, 'BlockingIOError': \u003cclass 'BlockingIOError'>, 'BrokenPipeError': \u003cclass 'BrokenPipeError'>, 'ChildProcessError': \u003cclass 'ChildProcessError'>, 'ConnectionAbortedError': \u003cclass 'ConnectionAbortedError'>, 'ConnectionRefusedError': \u003cclass 'ConnectionRefusedError'>, 'ConnectionResetError': \u003cclass 'ConnectionResetError'>, 'FileExistsError': \u003cclass 'FileExistsError'>, 'FileNotFoundError': \u003cclass 'FileNotFoundError'>, 'IsADirectoryError': \u003cclass 'IsADirectoryError'>, 'NotADirectoryError': \u003cclass 'NotADirectoryError'>, 'InterruptedError': \u003cclass 'InterruptedError'>, 'PermissionError': \u003cclass 'PermissionError'>, 'ProcessLookupError': \u003cclass 'ProcessLookupError'>, 'TimeoutError': \u003cclass 'TimeoutError'>, 'open': \u003cbuilt-in function open>, 'copyright': Copyright (c) 2001-2021 Python Software Foundation.\r\nAll Rights Reserved.\r\n\r\nCopyright (c) 2000 BeOpen.com.\r\nAll Rights Reserved.\r\n\r\nCopyright (c) 1995-2001 Corporation for National Research Initiatives.\r\nAll Rights Reserved.\r\n\r\nCopyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\r\nAll Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\r\n    for supporting Python development.  See www.python.org for more information., 'license': Type license() to see the full license text, 'help': Type help() for interactive help, or help(object) for help about object., '__IPYTHON__': True, 'display': \u003cfunction display at 0x7f1ee1591d30>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit}, 'help': Type help() for interactive help, or help(object) for help about object., 'atexit': \u003cmodule 'atexit' (built-in)>, 'os': \u003cmodule 'osIn : locals()\r\nIn: # Next line `exit()` is inputted\r\nIn : exit()\r\nipdb> quit\r\nTraceback (most recent call last):\r\n  File \"\u003cstring>\", line 1, in \u003cmodule>\r\n  File \"/usr/lib/python3.9/bdb.py\", line 92, in trace_dispatch\r\n    return self.dispatch_return(frame, arg)\r\n  File \"/usr/lib/python3.9/bdb.py\", line 154, in dispatch_return\r\n    if self.quitting: raise BdbQuit\r\nbdb.BdbQuit\r\n```\r\nWhen dicts are inputted as 1st or 2nd rows without writing a comment first, those are not printed to output. In this case `{'foo': 'bar'}` is written to the first BPython prompt.\r\n```sh\r\n\r\n$ python -c 'from IPython.terminal.debugger import set_trace; set_trace()'\r\n--Return--\r\nNone\r\n> \u003cstring>(1)\u003cmodule>()\r\n\r\nipdb> import bpython; bpython.embed()\r\n\r\nIn : {'foo': 'bar'}\r\nIn : exit()\r\nIn : exit()\r\nipdb> quit\r\nTraceback (most recent call last):\r\n  File \"\u003cstring>\", line 1, in \u003cmodule>\r\n  File \"/usr/lib/python3.9/bdb.py\", line 92, in trace_dispatch\r\n    return self.dispatch_return(frame, arg)\r\n  File \"/usr/lib/python3.9/bdb.py\", line 154, in dispatch_return\r\n    if self.quitting: raise BdbQuit\r\nbdb.BdbQuit\r\n```\r\nThe `{'foo: 'bar'}` flashes just after the input without a new line and then immediately disappears.\r\n","author":{"url":"https://github.com/Jaakkonen","@type":"Person","name":"Jaakkonen"},"datePublished":"2021-08-16T22:11:31Z","url":"https://github.com/bpython/bpython/issues/907"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4da5089f-cbf8-bdb4-50ec-7a3890456a45
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9B56:2C69FC:1526B0B:1C196B1:6B01FDB0
html-safe-nonce7d2d46ad3021ebb85d34408843575ab2f753e4e2bd070b13b47b18d7fbf55b52
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjU2OjJDNjlGQzoxNTI2QjBCOjFDMTk2QjE6NkIwMUZEQjAiLCJ2aXNpdG9yX2lkIjoiOTEyOTEyODE3MjU2OTM2MTg0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac716c583ad97de9ca08e0d3de6f7d506cd31139a6c318e0aeccfef5ff7e5331c0
hovercard-subject-tagissue:972137940
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bpython/bpython/907/issue_layout
twitter:imagehttps://opengraph.githubassets.com/482f5a95d1dc90f2c6178f7ffea98cb2a94a883214fc1cd0d795750808749be6/bpython/bpython/issues/907
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/482f5a95d1dc90f2c6178f7ffea98cb2a94a883214fc1cd0d795750808749be6/bpython/bpython/issues/907
og:image:altDescription BPython prompt breaks when executing .embed() from ipdb context. New lines are not shown after input, prompt text is altered by IPython and not reset by bpython, dict outputs do not sho...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJaakkonen
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/bpython/bpython git https://github.com/bpython/bpython.git
octolytics-dimension-user_id8071396
octolytics-dimension-user_loginbpython
octolytics-dimension-repository_id21508865
octolytics-dimension-repository_nwobpython/bpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21508865
octolytics-dimension-repository_network_root_nwobpython/bpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/bpython/bpython/issues/907#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbpython%2Fbpython%2Fissues%2F907
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbpython%2Fbpython%2Fissues%2F907
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=bpython%2Fbpython
Reloadhttps://github.com/bpython/bpython/issues/907
Reloadhttps://github.com/bpython/bpython/issues/907
Reloadhttps://github.com/bpython/bpython/issues/907
bpythonhttps://github.com/bpython
bpythonhttps://github.com/bpython/bpython
Codehttps://github.com/bpython/bpython
Issues126 (126)https://github.com/bpython/bpython/issues
Pull requests6 (6)https://github.com/bpython/bpython/pulls
Actionshttps://github.com/bpython/bpython/actions
Projectshttps://github.com/bpython/bpython/projects
Wikihttps://github.com/bpython/bpython/wiki
Security and qualityhttps://github.com/bpython/bpython/security
Insightshttps://github.com/bpython/bpython/insights
https://github.com/bpython/bpython
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/907
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/907
Prompt broken when launching bpython.embed() from ipdbhttps://github.com/bpython/bpython/issues/907#top
https://github.com/Jaakkonen
Jaakkonenhttps://github.com/Jaakkonen
on Aug 16, 2021https://github.com/bpython/bpython/issues/907#issue-972137940
Sign up for freehttps://github.com/signup?return_to=https://github.com/bpython/bpython/issues/907
Sign in to commenthttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/907
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.