|
Meta tags:
description=Importing an extension module failed with UnicodeEncodeError if its path contained characters unencodable in UTF-8, e.g. surrogate escapes of a file name undecodable in the filesystem encoding. As a result, Python could not be built or run in a directory with such name.
The key of the extensions cache was built with _PyUnicode_AsUTF8NoNUL(). The raw content of the strings (UCS1, UCS2 or UCS4) is now used instead.
The rejection of embedded null characters, which was a side effect of the UTF-8 encoding, is now explicit in the extension module loader.
Issue: gh-155247;
Headings (most frequently used words):
for, navigation, uh, oh, gh, 155247, use, raw, string, content, the, extensions, cache, key, 155249, footer, diff, view, menu, repository, there, are, no, files, selected, viewing, filter, by, extension,
Text of the page (most frequently used words):
key (42), file (35), the (34), and (18), expand (17), github (16), path (16), size (16), line (15), void (15), const (15), this (14), null (14), characters (13), char (13), for (13), hidden (12), unicode (12), return (12), that (11), applied (11), all (11), name (11), show (11), 155247 (11), 2026 (10), module (10), struct (10), diff (10), extensions (10), pyobject (10), info (9), open (9), python (9), cannot (8), changes (8), reload (8), number (8), bidirectional (8), hashtable_key (8), size_t (8), raw (8), serhiy (8), storchaka (8), you (7), suggestion (7), suggestions (7), code (7), error (7), down (7), content (7), cache (7), sign (7), not (6), while (6), comments (6), loading (6), learn (6), about (6), view (6), static (6), str2 (6), str1 (6), str1_len (6), extension (6), spec (6), can (5), security (5), change (5), string (5), contains (5), what (5), review (5), more (5), key2 (5), key1 (5), size1 (5), len1 (5), kind2 (5), kind1 (5), assert (5), use (5), py_ssize_t (5), import (5), with (5), issue (5), _testsinglephase (5), test (5), commits (5), your (5), please (4), pull (4), there (4), filename (4), goto (4), _pyunicode_asutf8nonul (4), include (4), original (4), text (4), may (4), interpreted (4), compiled (4), differently (4), than (4), appears (4), below (4), editor (4), reveals (4), desktop (4), delete (4), edit (4), additions (4), hashtable_destroy_key (4), hashtable_destroy_str (4), hashtable_key_from_2_strings (4), int (4), strlen (4), size2 (4), memcpy (4), unsigned (4), str2_len (4), str2_data (4), str1_data (4), undecodable (4), build (4), next (4), rst (4), files (4), support (4), copilot (4), community (3), navigation (3), request (3), merge (3), from (3), add (3), batch (3), commit (3), was (3), page (3), retry (3), pyunicode_get_length (3), newcontext (3), importdl (3), htsep (3), hashtable (3), value (3), pymem_rawmalloc (3), def (3), ptr (3), data (3), sizeof (3), clear (3), sep (3), strings (3), utf (3), deletions (3), failed (3), fix (3), misc (3), news (3), core_and_builtins (3), extkey (3), self (3), __file__ (3), importlib (3), util (3), windows (3), origin (3), subdir (3), os_helper (3), lib (3), test_import (3), __init__ (3), hide (3), whitespace (3), nbsp (3), filter (3), nov (3), main (3), into (3), aug (3), 155249 (3), merged (3), account (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), contact (2), status (2), privacy (2), terms (2), footer (2), must (2), supported (2), single (2), one (2), viewing (2), because (2), made (2), toggle (2), _py_ext_module_loader_info_init (2), _py_ext_module_loader_info (2), p_info (2), _extensions_cache_find_unlocked (2), alloc (2), del_extensions_cache_value (2), hashtable_compare_key (2), hashtable_hash_key (2), hashtable_compare_str (2), hashtable_hash_str (2), pymem_rawfree (2), py_hashbuffer (2), pyunicode_data (2), padding (2), bytes (2), size_max (2), len2 (2), pyunicode_kind (2), encoding (2), 1300 (2), class (2), script (2), __name__ (2), its (2), fsencode (2), join (2), are (2), testfn_undecodable (2), tempdir (2), requires (2), skipunless (2), unittest (2), 1293 (2), selected (2), apply (2), split (2), unified (2), load (2), jump (2), branch (2), select (2), tree (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, now, check, back, later, queued, multi, pending, reviews, has, been, marked, resolved, outdated, existing, order, create, valid, applying, deleted, lines, only, per, subset, closed, invalid, were, annotations, notes, oops, something, went, wrong, pyunicode_encodefsdefault, filename_encoded, ms_windows, ifndef, embedded, character, pyexc_valueerror, pyerr_setstring, pyunicode_findchar, 151, 152, pyunicode_asutf8, 134, 135, pycore_unicodeobject, _py_singleton, pycore_global_objects, _py_id, pycore_runtime, _pyerr_formatfromcause, pycore_pyerrors, deletion, bool, undef, 1602, 1619, _extensions_cache_clear_all, extensions_lock_release, finally_oldvalue, 1558, 1575, _extensions_cache_set, entry, else, p_key, 1420, 1437, 1410, 1427, _py_hashtable_new_full, _py_hashtable_allocator_t, _extensions_cache_init, define, endif, 1383, 1401, _find_cached_def, pymoduledef, memcmp, strcmp, py_uhash_t, memset, hashed, compared, pyerr_nomemory, xxx, buffer, temp, every, case, but, set, make, sure, byte, won, cause, overflow, followed, both, total, surrogates, filesystem, used, contain, lone, two, directory, such, which, impossible, run, unicodeencodeerror, exc, previously, importing, whose, unencodable, pass, test_create_builtin, assert_python_ok, script_helper, loader, exec_module, module_from_spec, spec_from_file_location, fsdecode, dedent, textwrap, removed, subprocess, stays, loaded, copyfile, shutil, basename, paths, skiptest, oserror, except, mkdir, try, temp_dir, encodable, test_import_from_undecodable_path, names, none, create_dynamic, _imp, abc, conversations, filters, viewed, types, e5be097, remote, tracking, upstream, dc41683, 7d20c51, faa4640, cb57ba8, hold, shift, click, range, changed, checks, conversation, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, maintainers, have, question, project, new, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, 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, work, hosting, collaboration, platform, menu, skip,
|