|
Meta tags:
description=EditorWindow.focus_in_event calls last_mtime on every event,
which passed the open file path to os.path.getmtime with no guard. When
another program deleted or renamed the file, refocusing the IDLE window
let a FileNotFoundError escape the Tk event handler. last_mtime now
returns the last known mtime when the path is inaccessible, so refocusing
no longer raises and does not prompt to reload a file that is gone.
See PR discussion for more.
(cherry picked from commit 6af40a6)
Co-authored-by: tonghuaroot (童话) tonghuaroot@gmail.com
Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Issue: gh-153480;
Headings (most frequently used words):
uh, oh, gh, navigation, 15, 153480, stop, idle, crashing, when, file, open, in, the, editor, is, deleted, 153481, 158264, footer, diff, view, menu, repository, there, are, no, files, selected, for, viewing, filter, by, extension,
Text of the page (most frequently used words):
self (53), file (44), stub (27), the (25), #editor (20), mtime (20), this (17), github (16), def (16), and (16), open (14), reload (13), line (12), mock (12), types (12), applied (11), that (10), while (10), idle (10), last_mtime (10), simplenamespace (10), not (9), cannot (9), show (9), hidden (9), characters (9), unicode (9), none (9), event (9), filename (9), import (9), for (9), you (8), from (8), deleted (8), all (8), loading (8), diff (8), path (8), 2026 (7), suggestion (7), suggestions (7), code (7), changes (7), there (7), was (7), close (7), text (7), 153480 (7), return (7), sign (7), please (6), when (6), number (6), bidirectional (6), assertisnone (6), with (6), dialog (6), idlelib (6), security (5), comments (5), error (5), page (5), window (5), save (5), another (5), what (5), learn (5), about (5), view (5), issue (5), unittest (5), deleted_file_event (5), choice (5), support (5), lib (5), commits (5), your (5), can (4), pull (4), change (4), does (4), review (4), more (4), next (4), rst (4), set_saved (4), save_as (4), _run_choice (4), simpledialog (4), askyesno (4), gone (4), expand (4), files (4), stop (4), crashing (4), copilot (4), community (3), navigation (3), now (3), request (3), has (3), resolved (3), add (3), batch (3), commit (3), retry (3), original (3), contains (3), may (3), interpreted (3), compiled (3), differently (3), than (3), appears (3), below (3), reveals (3), desktop (3), delete (3), edit (3), misc (3), news (3), edmt1x (3), additions (3), deletions (3), assert_not_called (3), before (3), make_stub (3), tempfile (3), getmtime (3), terryjreedy (3), idle_test (3), test_editor (3), else (3), hide (3), whitespace (3), filter (3), 158264 (3), 153481 (3), merged (3), python (3), account (3), quality (3), tab (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), queued (2), merge (2), been (2), marked (2), must (2), single (2), only (2), one (2), viewing (2), toggle (2), ignore (2), program (2), fix (2), reprompt (2), assert_called_once_with (2), focusin (2), return_value (2), focus_in_event (2), exercise (2), unbound (2), class (2), testcase (2), touch (2), join (2), temporarydirectory (2), down (2), test (2), conversation (2), nthis (2), work (2), 1120 (2), selected (2), apply (2), split (2), unified (2), failed (2), load (2), jump (2), nbsp (2), extension (2), oct (2), into (2), backport (2), 6af40a6 (2), select (2), tree (2), miss (2), islington (2), insights (2), projects (2), actions (2), repository (2), cpython (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, time, share, personal, information, manage, cookies, docs, inc, right, check, back, later, multi, pending, reviews, outdated, existing, order, create, valid, applying, lines, supported, per, subset, closed, invalid, because, were, made, annotations, notes, oops, something, went, wrong, asks, whether, elsewhere, traceback, failing, start, opening, which, exist, yet, main, verbosity, __name__, __main__, test_ignore_choice_clears_mtime, cancelled, leaves, test_save_as_choice_clears_mtime_and_saves, cleared, asserttrue, called, test_close_choice_closes_window, patch, object, test_focus_in_routes_deleted_to_dialog, lambda, handling, methods, mocked, deletedfileeventtest, test_no_filename_returns_none, such, read, attribute, __init__, calls, set, test_not_yet_created_filename, remove, test_deleted_file_returns_none, assertequal, test_existing_file_returns_mtime, method, gui, needed, lastmtimetest, rmenu_check_cut, normal, 321, 325, test_rmenu_check_copy, requires, collections, namedtuple, pathlib, comment, thread, coverage, load_standard_extensions, extensions, load_extensions, elif, cancel, default, buttons, longer, exists, title, successful, restores, via, true, sub, reopen, old, showing, delivered, buffer, instead, offering, could, fail, forget, renamed, ask, false, loadfile, ndo, want, parent, script, modified, reloading, stat, except, oserror, try, _close, are, conversations, clear, filters, viewed, branch, a357576, tonghuaroot, sep, delet, e4e0133, hold, shift, click, range, changed, checks, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, have, question, project, new, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, talks, workshops, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, 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, hosting, collaboration, platform, menu, skip, content,
|