|
Meta tags:
description=This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following:
Suppress caret if it points left of text
Allow caret pointing just past end of line
If caret points past end of line, clip to just past end of line
The syntax error formatting code in traceback.py was mostly rewritten; small, subtle changes were applied to the C code in pythonrun.c.
There s still a difference when the text contains embedded newlines. Neither handles these very well, and I don t think the case occurs in practice.
htt????/bugs.python.org/issue40612
Automerge-Triggered-By: @gvanrossum;
Headings (most frequently used words):
uh, oh, this, for, may, 15, 2020, choose, reason, hiding, comment, gvanrossum, loading, navigation, there, ammaraskar, bpo, 40612, fix, syntaxerror, edge, cases, in, traceback, formatting, 20072, footer, edited, was, an, error, while, please, reload, page, diff, view, menu, repository, are, no, files, selected, viewing, filter, by, extension,
Text of the page (most frequently used words):
the (61), text (59), this (54), file (53), self (52), offset (44), line (35), err (32), syntaxerror (30), comment (30), for (27), there (23), was (23), code (21), and (21), #reason (21), may (21), while (20), all (20), len (20), 2020 (19), that (18), error (18), #traceback (18), reload (17), assertequal (17), github (16), loading (16), msg (16), show (16), def (16), find (15), hidden (15), characters (15), unicode (15), choose (14), learn (14), hiding (14), copy (14), please (13), expand (13), more (13), gvanrossum (13), page (12), diff (12), applied (11), open (11), fix (11), caret (10), none (10), hide (10), quality (10), number (10), bidirectional (10), you (9), not (9), right (9), from (9), changes (9), will (9), problem (9), expected (9), cannot (8), suggestions (8), resolved (8), outdated (8), tok (8), caretspace (8), test (8), suggestion (7), comments (7), add (7), print (7), reactions (7), sorry (7), something (7), went (7), wrong (7), here (7), what (7), low (7), duplicate (7), off (7), topic (7), abuse (7), spam (7), displayed (7), describe (7), others (7), member (7), markdown (7), link (7), review (7), about (7), view (7), bpo (7), 40612 (7), yield (7), lib (7), append (7), sign (7), change (6), pyfile_writestring (6), inl (6), char (6), aaa (6), python (6), with (6), parser (6), your (6), place (6), format (6), assertin (6), support (6), security (5), down (5), whitespace (5), pythonrun (5), just (5), buf (5), try (5), exec (5), lineno (5), character (5), syntax (5), err_ret (5), pyobject (5), original (5), contains (5), interpreted (5), compiled (5), differently (5), than (5), appears (5), below (5), editor (5), reveals (5), desktop (5), delete (5), edit (5), edge (5), cases (5), ltext (5), lstrip (5), commits (5), can (4), pull (4), one (4), return (4), newline (4), int (4), null (4), const (4), strip (4), based (4), like (4), nbbb (4), nccc (4), ccc (4), have (4), author (4), another (4), compile (4), except (4), into (4), filename (4), additions (4), deletions (4), formatting (4), misc (4), news (4), next (4), rst (4), stype (4), rtext (4), foo (4), badline (4), files (4), copilot (4), community (3), navigation (3), request (3), has (3), must (3), batch (3), commit (3), end (3), strlen (3), break (3), py_ssize_t (3), newlines (3), most (3), convert (3), raise (3), last (3), stdin (3), module (3), master (3), issue (3), example (3), ammaraskar (3), exception (3), unexpected (3), after (3), continuation (3), new (3), also (3), old (3), see (3), cpython (3), relative (3), text_obj (3), message (3), library (3), goirem (3), else (3), found (3), get_report (3), test_traceback (3), test_cmd_line_script (3), apply (3), nbsp (3), filter (3), 20072 (3), merged (3), account (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), time (2), contact (2), status (2), privacy (2), terms (2), footer (2), merge (2), been (2), lines (2), single (2), only (2), viewing (2), invalid (2), because (2), toggle (2), strchr (2), skip (2), length (2), looks (2), does (2), import (2), print_exception (2), bbb (2), recent (2), call (2), branch (2), did (2), research (2), question (2), regression (2), doesn (2), but (2), seems (2), advanced (2), source (2), edited (2), when (2), read (2), out (2), index (2), start (2), cur (2), col_offset (2), why (2), pointing (2), should (2), remove (2), pyunicode_asutf8 (2), print_error_text (2), 554 (2), printed (2), join (2), isspace (2), spaces (2), rstrip (2), string (2), exactly (2), where (2), exceptions (2), _format_syntax_error (2), 569 (2), unittest (2), exp (2), range (2), test_message_none (2), splitlines (2), pegen (2), arguably (2), better (2), need (2), blocks (2), are (2), get_exception_format (2), count (2), additional (2), third (2), 633 (2), selected (2), split (2), unified (2), failed (2), load (2), retry (2), jump (2), extension (2), issues (2), select (2), tree (2), insights (2), projects (2), actions (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, share, personal, information, manage, cookies, docs, 2026, inc, now, check, back, later, queued, multi, pending, reviews, marked, existing, order, create, valid, applying, deleted, supported, per, subset, closed, were, made, annotations, notes, write, don, points, left, make, sure, past, embedded, clip, calculate, excluding, trailing, leading, adjusting, both, versions, formatter, invoked, thing, messes, output, then, first, okay, serious, due, people, using, tried, still, skips, through, never, oldparser, guess, case, aah, yes, continuations, thought, had, misunderstanding, gets, solve, dilemma, suppressing, set, zero, meaning, unknown, fwiw, weird, occur, perhaps, good, mean, opposite, occurs, quick, current, tokenizer, how, copies, entire, till, field, strncpy, pyobject_malloc, inp, 425, 431, 4a12d12, parsetok, would, object, ever, being, know, any, produces, such, syntaxerrors, whereby, tempted, say, eventually, since, always, provide, offsets, fyi, mentioned, parsers, 121, thread, size_t, pointer, static, void, parse_syntax_error, detail, available, non, space, likes, tabs, kept, alignment, column, stripped, min, str, internal, helper, _format_final_exc_line, _str, issubclass, exc_type, format_exception_only, class, pyexcreportingtests, baseexceptionreportingtests, testcase, elif, test_syntax_error_various_offsets, 679, 678, treated, specially, 666, 665, 10186, test_syntax_error_offset_at_eol, use_old_parser, skipif, skip_if_new_parser, check_zero_div, inner_raise, marker, 656, 655, outer_raise, derived, baseexception, formatted, test_base_exception, indentationerror, syntax_error_bad_indentation2, indent, test_bad_indentation, exc, bad, test_nocaret, syntax_error_with_caret_non_ascii, test_caret, empty, expression, allowed, stderr, test_syntaxerror_multi_line_fstring, addition, deletion, conversations, clear, filters, viewed, types, f93a54c, pep, 31641ff, debug, calls, 1c7e6bb, thorough, 6df7662, rebase, 72e5b93, refactor, ea1c6f2, blurb, b951b0f, 87e78b5, hold, shift, click, changed, checks, conversation, miss, islington, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, project, items, requests, dismiss, alert, switched, accounts, appearance, settings, search, pricing, event, talks, workshops, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, ons, trust, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, latest, improvements, across, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, content,
|