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 — gh-102114: Make dis print more concise tracebacks for syntax errors in str inputs by chgnrdv · Pull Request #102115 · python/cpython

Conversation

@chgnrdv

@chgnrdv chgnrdv commented Feb 21, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #102114

  • Issue: dis._try_compile: traceback printed on error in source argument is too wordy #102114

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chgnrdv
Make _try_compile print shorter traceback
2719179
This commit reworks code of '_try_compile' function so that it print shorter traceback if its 'source' argument contains indentation/syntax error
@bedevere-bot bedevere-bot added the awaiting review label Feb 21, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 21, 2023
dis._try_compile: traceback printed on error in source argument is too wordy #102114
Closed
@chgnrdv chgnrdv changed the title gh-102114: Make _try_compile print shorter traceback gh-102114: Make dis._try_compile print shorter traceback Feb 21, 2023
blurb-it Bot and others added 3 commits February 21, 2023 14:32
@blurb-it
📜🤖 Added by blurb_it.
2f29d43
@blurb-it
📜🤖 Added by blurb_it.
ca52d73
@chgnrdv
remove old NEWS entry file
e652f89
@arhadthedev arhadthedev added the stdlib Standard Library Python modules in the Lib/ directory label Feb 21, 2023
@chgnrdv
Merge branch 'main' into dis-less-wordy-traceback-on-error
72e4886
iritkatriel
iritkatriel requested changes Apr 4, 2023
View reviewed changes

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, your change makes sense. However, we would need a unit test covering this behaviour to prevent future regressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels Apr 4, 2023
@bedevere-bot

bedevere-bot commented Apr 4, 2023

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel iritkatriel added the 3.12 only security fixes label Apr 6, 2023
@chgnrdv
added test
413b681
iritkatriel
iritkatriel reviewed Apr 14, 2023
View reviewed changes
Comment thread Lib/test/test_dis.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

chgnrdv and others added 2 commits April 14, 2023 21:02
@chgnrdv @iritkatriel
Update Lib/test/test_dis.py
35a687e
Co-authored-by: Irit Katriel <[email protected]>
@iritkatriel
Merge branch 'main' into dis-less-wordy-traceback-on-error
f988c8d
iritkatriel
iritkatriel reviewed Apr 14, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2023-02-21-14-57-34.gh-issue-102114.uUDQzb.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel
iritkatriel approved these changes Apr 14, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels Apr 14, 2023
@chgnrdv
Update 2023-02-21-14-57-34.gh-issue-102114.uUDQzb.rst
0a97e85
iritkatriel
iritkatriel reviewed Apr 14, 2023
View reviewed changes
Comment thread Lib/dis.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel
iritkatriel reviewed Apr 14, 2023
View reviewed changes
Comment thread Lib/dis.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chgnrdv
get rid of 'c' variable
5ff58bb
@chgnrdv
chgnrdv requested a review from iritkatriel April 14, 2023 19:57
iritkatriel
iritkatriel approved these changes Apr 14, 2023
View reviewed changes

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's better.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel iritkatriel changed the title gh-102114: Make dis._try_compile print shorter traceback gh-102114: Make dis print more concise tracebacks for syntax errors in str inputs Apr 15, 2023
@iritkatriel
iritkatriel merged commit 2b6f5c3 into python:main Apr 15, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Apr 15, 2023
@ishaiv28 ishaiv28 mentioned this pull request Apr 15, 2023
gh-102114: Make dis print more concise tracebacks for syntax errors i… ishaiv28/cpython#1
Merged
carljm added a commit to carljm/cpython that referenced this pull request Apr 17, 2023
@carljm
Merge branch 'main' into superopt
5136459
* main:
  Remove `expert-*` from `project-updater` GH workflow (python#103579)
  pythongh-103583: Add codecs and maps to _codecs_* module state (python#103540)
  pythongh-48330: address review comments to PR-12271 (python#103209)
  pythongh-103527: Add multibytecodec.h as make dep for _codecs_* (python#103567)
  pythongh-103553: Improve `test_inspect`: add more assertions, remove unused (python#103554)
  pythonGH-103517: Improve tests for `pathlib.Path.walk()` (pythonGH-103518)
  pythongh-102114: Make dis print more concise tracebacks for syntax errors in str inputs (python#102115)
  pythonGH-78079: Fix UNC device path root normalization in pathlib (pythonGH-102003)
  pythongh-101517: Add regression test for a lineno bug in try/except* impacting pdb (python#103547)
  pythongh-103527: Add make deps for _codecs_* and _multibytecodec (python#103528)
  pythongh-103532: Fix reST syntax in NEWS entry (pythonGH-103544)
  pythongh-103532: Add NEWS entry (python#103542)
carljm added a commit to carljm/cpython that referenced this pull request Apr 17, 2023
@carljm
Merge branch 'superopt' into superopt_spec
079c65a
* superopt:
  update generated cases with new comment
  review comments
  Remove `expert-*` from `project-updater` GH workflow (python#103579)
  pythongh-103583: Add codecs and maps to _codecs_* module state (python#103540)
  pythongh-48330: address review comments to PR-12271 (python#103209)
  pythongh-103527: Add multibytecodec.h as make dep for _codecs_* (python#103567)
  pythongh-103553: Improve `test_inspect`: add more assertions, remove unused (python#103554)
  pythonGH-103517: Improve tests for `pathlib.Path.walk()` (pythonGH-103518)
  pythongh-102114: Make dis print more concise tracebacks for syntax errors in str inputs (python#102115)
  pythonGH-78079: Fix UNC device path root normalization in pathlib (pythonGH-102003)
  pythongh-101517: Add regression test for a lineno bug in try/except* impacting pdb (python#103547)
  pythongh-103527: Add make deps for _codecs_* and _multibytecodec (python#103528)
  pythongh-103532: Fix reST syntax in NEWS entry (pythonGH-103544)
  pythongh-103532: Add NEWS entry (python#103542)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

3.12 only security fixes stdlib Standard Library Python modules in the Lib/ directory

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

dis._try_compile: traceback printed on error in source argument is too wordy

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@chgnrdv @bedevere-bot @iritkatriel @arhadthedev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.