cpython/Lib/test
Miss Islington (bot) 26ee788118
[3.11] gh-87720 Fix additional header refolding-quoting edge case (GH-134271) (#159065)
gh-87720 Fix additional header refolding-quoting edge case (GH-134271)

In this case, the higher level syntactic unit fit on the remainder of
the line in un-encoded format, and that higher level unit was
not a ptext or vtext, so the encoding check failed.  To fix this, we
look inside the current unit to see if has anything that was
originally encoded.
(cherry picked from commit 5a22a62b96)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2026-10-25 12:37:37 -07:00
..
audiodata
certdata [3.11] gh-160040: Distrust compromised eMudhra intermediate CA keys (CVE-2026-115557) (GH-160042) (GH-160572) 2026-10-24 16:10:44 -07:00
cjkencodings
configdata
crashers
data
decimaltestdata
dtracedata
encoded_modules
imghdrdata
leakers
libregrtest [3.11] [3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (GH-117250) (#117251) 2024-03-26 08:18:10 +00:00
regrtestdata/import_from_tests
sndhdrdata
subprocessdata
support [3.11] gh-157190: Fix tarfile data/tar filter bypass via hard link to a symlink (GH-157191) (#158455) 2026-09-30 00:40:33 +01:00
test_asyncio [3.11] gh-156793: Validate SSLContext.wrap_bio() parameters like wrap_socket() (GH-158503) (#158532) 2026-10-01 01:30:27 +01:00
test_capi
test_concurrent_futures [3.11] gh-116682: stdout may be empty in test_cancel_futures_wait_false (GH-116683) (#116693) 2024-03-13 00:29:03 +00:00
test_cppext
test_dataclasses [3.11] gh-105866: fix dataclass with slots=True, weakref_slot=True (GH-105870) (GH-116979) 2024-03-19 11:57:45 +01:00
test_doctest
test_email [3.11] gh-87720 Fix additional header refolding-quoting edge case (GH-134271) (#159065) 2026-10-25 12:37:37 -07:00
test_future_stmt
test_gdb [3.11] gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) (GH-160201) (#160651) 2026-10-25 11:09:38 -07:00
test_import
test_importlib [3.11] gh-117178: Recover lazy loading of self-referential modules (GH-117179) (#117320) 2024-03-28 11:17:10 +00:00
test_inspect [3.11] gh-116785: Fix direct invocation of test_inspect (GH-116787) (#116795) 2024-03-14 10:25:48 +00:00
test_json
test_module
test_multiprocessing_fork
test_multiprocessing_forkserver
test_multiprocessing_spawn
test_peg_generator
test_pydoc
test_sqlite3
test_tomllib [3.11] gh-149231: tomllib: Limit the number of parts in a key (GH-149233) (GH-149815) (#154943) 2026-08-10 18:09:33 +01:00
test_tools [3.11] gh-115421: List all test/ subdirs in Makefile, and test them (GH-115813) 2024-03-11 12:02:05 +01:00
test_warnings
test_zoneinfo
tokenizedata
tracedmodules
typinganndata
xmltestdata
ziptestdata
.ruff.toml
__init__.py
__main__.py
_test_atexit.py
_test_eintr.py
_test_embed_set_config.py
_test_embed_structseq.py
_test_multiprocessing.py [3.11] gh-88118: Fix some test_multiprocessing flakiness. (GH-116434) (GH-116441) 2024-03-06 22:20:37 +00:00
_test_venv_multiprocessing.py
archiver_tests.py
audiotest.au
audiotests.py
audit-tests.py
autotest.py
bisect_cmd.py [3.11] [3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (GH-117250) (#117251) 2024-03-26 08:18:10 +00:00
clinic.test.c
cmath_testcases.txt
curses_tests.py
datetimetester.py
dis_module.py
empty.vbs
exception_hierarchy.txt
floating_points.txt
fork_wait.py
formatfloat_testcases.txt
ieee754.txt
imp_dummy.py
list_tests.py [3.11] gh-120384: gh-120298: Fix array-out-of-bounds & use after free list (GH-121345) 2025-10-31 15:19:07 +01:00
lock_tests.py
mailcap.txt
mapping_tests.py
math_testcases.txt
memory_watchdog.py
mime.types
mock_socket.py
mp_fork_bomb.py
mp_preload.py
multibytecodec_support.py
pickletester.py
profilee.py
pstats.pck
pyclbr_input.py
pythoninfo.py [3.11] gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (GH-145589) (GH-145809) (#148616) 2026-08-12 23:57:07 +01:00
randv2_32.pck
randv2_64.pck
randv3.pck
re_tests.py
recursion.tar
regrtest.py
relimport.py
reperf.py
seq_tests.py
signalinterproctester.py
Sine-1000Hz-300ms.aif
ssl_servers.py
ssltests.py
string_tests.py
test___all__.py [3.11] gh-135374: Adjust test for setuptools' replacement of distutils (GH-138796) 2025-09-24 15:41:24 +02:00
test__locale.py
test__opcode.py
test__osx_support.py
test__xxsubinterpreters.py
test_abc.py
test_abstract_numbers.py
test_aifc.py
test_argparse.py
test_array.py
test_asdl_parser.py
test_ast.py
test_asyncgen.py
test_asynchat.py
test_asyncore.py
test_atexit.py
test_audioop.py
test_audit.py
test_augassign.py
test_base64.py
test_baseexception.py [3.11] chore: fix typos (GH-116345) (#116375) 2024-03-05 20:33:59 +00:00
test_bdb.py
test_bigaddrspace.py
test_bigmem.py
test_binascii.py
test_binop.py
test_bisect.py
test_bool.py
test_buffer.py
test_bufio.py
test_builtin.py
test_bytes.py
test_bz2.py [3.11] gh-150599: Prevent bz2 decompressor reuse after errors (#150600) (#151132) 2026-08-10 20:53:04 +01:00
test_c_locale_coercion.py
test_calendar.py
test_call.py
test_cgi.py
test_cgitb.py
test_charmapcodec.py
test_check_c_globals.py
test_class.py
test_clinic.py [3.11] [3.12] gh-117347: Fix test_clinic side effects (GH-117363) (GH-117365) (#117366) 2024-03-29 11:21:56 +00:00
test_cmath.py
test_cmd.py
test_cmd_line.py [3.11] gh-116858: Add @cpython_only to several tests in test_cmd_line (GH-116859) (#116890) 2024-03-16 09:29:11 +00:00
test_cmd_line_script.py
test_code.py
test_code_module.py
test_codeccallbacks.py [3.11] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134341) 2025-06-02 17:52:52 +02:00
test_codecencodings_cn.py
test_codecencodings_hk.py
test_codecencodings_iso2022.py
test_codecencodings_jp.py
test_codecencodings_kr.py
test_codecencodings_tw.py
test_codecmaps_cn.py
test_codecmaps_hk.py
test_codecmaps_jp.py
test_codecmaps_kr.py
test_codecmaps_tw.py
test_codecs.py [3.11] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) (GH-156020) (#156931) 2026-10-01 01:29:41 +01:00
test_codeop.py
test_collections.py
test_colorsys.py
test_compare.py
test_compile.py
test_compileall.py
test_complex.py
test_configparser.py [3.11] gh-156353: Fix configparser space delimiter parsing (GH-156382) (#156561) 2026-10-01 01:30:23 +01:00
test_contains.py
test_context.py
test_contextlib.py
test_contextlib_async.py
test_copy.py
test_copyreg.py
test_coroutines.py
test_cprofile.py
test_crashers.py
test_crypt.py
test_csv.py [3.11] gh-98820: Fix quadratic time in csv.Sniffer for quoted fields (GH-154867) (#155538) 2026-08-11 17:06:40 +01:00
test_ctypes.py
test_curses.py
test_datetime.py
test_dbm.py
test_dbm_dumb.py
test_dbm_gnu.py
test_dbm_ndbm.py
test_decimal.py [3.11] gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (#117326) (#117331) 2024-03-28 17:53:43 +00:00
test_decorators.py
test_defaultdict.py
test_deque.py
test_descr.py
test_descrtut.py
test_devpoll.py
test_dict.py
test_dict_version.py
test_dictcomps.py
test_dictviews.py
test_difflib.py
test_difflib_expect.html
test_dis.py
test_distutils.py
test_docxmlrpc.py
test_dtrace.py
test_dynamic.py
test_dynamicclassattribute.py
test_eintr.py
test_embed.py
test_ensurepip.py
test_enum.py [3.11] gh-116600: [Enum] fix global Flag repr (GH-116615) (#116630) 2024-03-11 17:36:15 -07:00
test_enumerate.py
test_eof.py
test_epoll.py
test_errno.py
test_except_star.py
test_exception_group.py
test_exception_hierarchy.py
test_exception_variations.py
test_exceptions.py
test_extcall.py
test_faulthandler.py
test_fcntl.py
test_file.py
test_file_eintr.py
test_filecmp.py
test_fileinput.py
test_fileio.py
test_fileutils.py
test_finalization.py
test_float.py
test_flufl.py
test_fnmatch.py
test_fork1.py
test_format.py [3.11] gh-158446: Reject float format precision near INT_MAX (GH-158474) (#158480) 2026-10-01 01:29:11 +01:00
test_fractions.py
test_frame.py
test_frozen.py
test_fstring.py
test_ftplib.py [3.11] gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648) (#149796) 2026-06-27 19:57:53 +02:00
test_funcattrs.py
test_functools.py [3.11] gh-115264: Fix test_functools with -00 mode (GH-115276) (#116706) 2024-03-13 07:05:41 +00:00
test_gc.py
test_generator_stop.py
test_generators.py
test_genericalias.py
test_genericclass.py
test_genericpath.py [3.11] gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952) (GH-140848) 2025-10-31 18:15:08 +01:00
test_genexps.py
test_getopt.py
test_getpass.py
test_getpath.py
test_gettext.py
test_glob.py [3.11] gh-117127: glob tests: Reopen dir_fd to pick up directory changes (GH-117128) (GH-117149) 2024-03-22 10:21:53 +00:00
test_global.py
test_grammar.py
test_graphlib.py
test_grp.py
test_gzip.py
test_hash.py
test_hashlib.py
test_heapq.py
test_hmac.py
test_html.py
test_htmlparser.py [3.11] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031) (#153042) 2026-08-10 20:53:23 +01:00
test_http_cookiejar.py [3.11] gh-160300: Reject cookies with a negative version in http.cookiejar (GH-160301) (#160649) 2026-10-25 12:35:37 -07:00
test_http_cookies.py [3.11] gh-145599, CVE 2026-3644: Reject control characters in http.cookies.Morsel.update() (GH-145600) (#146026) 2026-06-28 23:16:33 +01:00
test_httplib.py [3.11] gh-150743: Limit trailer lines and interim responses read by http.client (GH-150749) (#152528) 2026-06-28 22:50:25 +02:00
test_httpservers.py [3.11] gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-142216) (#142298) 2026-01-25 17:10:45 +00:00
test_idle.py
test_imaplib.py [3.11] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#129357) 2025-02-19 14:16:30 +01:00
test_imghdr.py
test_imp.py [3.11] gh-116831: Fixes tests for c extension in WASI for Python 3.11 (GH-116831) (#116933) 2024-03-18 07:03:01 +01:00
test_index.py
test_int.py
test_int_literal.py
test_interpreters.py
test_io.py [3.11] gh-87846: test_io: Ignore OpenWrapper in test___all__ (#126478) 2024-11-06 13:39:30 +00:00
test_ioctl.py
test_ipaddress.py [3.11] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (GH-135091) 2025-06-03 16:24:20 +02:00
test_isinstance.py
test_iter.py
test_iterlen.py
test_itertools.py
test_keyword.py
test_keywordonlyarg.py
test_kqueue.py
test_largefile.py
test_launcher.py
test_lib2to3.py
test_linecache.py
test_list.py [3.11] gh-120384: gh-120298: Fix array-out-of-bounds & use after free list (GH-121345) 2025-10-31 15:19:07 +01:00
test_listcomps.py
test_lltrace.py
test_locale.py
test_logging.py [3.11] gh-90535: Fix support of interval>1 in logging.TimedRotatingFileHandler (GH-116220) (GH-116893) 2024-03-18 19:47:53 +02:00
test_long.py
test_longexp.py
test_lzma.py
test_mailbox.py
test_mailcap.py
test_marshal.py
test_math.py
test_memoryio.py
test_memoryview.py
test_metaclass.py
test_mimetypes.py [3.11] gh-159428: Don't read mimetypes.knownfiles by default on Windows (GH-159445) (#159573) 2026-10-25 12:37:12 -07:00
test_minidom.py [3.11] gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146) (#142212) 2026-01-25 17:10:53 +00:00
test_mmap.py
test_modulefinder.py
test_msilib.py
test_multibytecodec.py
test_multiprocessing_main_handling.py
test_named_expressions.py
test_netrc.py
test_nis.py
test_nntplib.py
test_ntpath.py [3.11] gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952) (GH-140848) 2025-10-31 18:15:08 +01:00
test_numeric_tower.py
test_opcache.py
test_opcodes.py
test_openpty.py
test_operator.py [3.11] gh-83845: Add tests for operator module (GH-115883) (#117254) 2024-03-26 09:50:40 +00:00
test_optparse.py
test_ordered_dict.py
test_os.py [3.11] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118739) 2024-05-24 02:13:18 +02:00
test_ossaudiodev.py
test_osx_env.py
test_pathlib.py [3.11] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277) (GH-117280) 2024-03-27 08:57:08 +00:00
test_patma.py
test_pdb.py [3.11] gh-90095: Ignore empty lines and comments in .pdbrc (GH-116834) (#116855) 2024-03-15 09:55:44 +00:00
test_peepholer.py
test_pep646_syntax.py
test_pickle.py
test_picklebuffer.py
test_pickletools.py
test_pipes.py
test_pkg.py
test_pkgutil.py
test_platform.py [3.11] gh-116491: Improve test_win32_ver (GH-116506) (#116709) 2024-03-13 07:37:01 +00:00
test_plistlib.py [3.11] gh-119342: Fix a potential denial of service in plistlib (GH-119343) (#142150) 2026-03-02 22:55:04 +00:00
test_poll.py
test_popen.py
test_poplib.py
test_positional_only_arg.py
test_posix.py [3.11] gh-117061: Fix test_posix.test_sched_setaffinity() on RHEL9 (GH-117126) (#117138) 2024-03-21 22:37:16 +00:00
test_posixpath.py [3.11] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) (GH-135068) 2025-06-03 16:58:39 +02:00
test_pow.py
test_pprint.py
test_print.py
test_profile.py
test_property.py
test_pstats.py
test_pty.py
test_pulldom.py
test_pwd.py
test_py_compile.py
test_pyclbr.py
test_pyexpat.py [3.11] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368) (GH-151401) (#155346) 2026-08-09 17:32:33 +01:00
test_queue.py
test_quopri.py
test_raise.py
test_random.py
test_range.py
test_re.py
test_readline.py
test_regrtest.py [3.11] [3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (GH-117250) (#117251) 2024-03-26 08:18:10 +00:00
test_repl.py
test_reprlib.py
test_resource.py
test_richcmp.py
test_rlcompleter.py
test_robotparser.py
test_runpy.py
test_sax.py [3.11] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117245) 2024-03-26 02:08:28 +00:00
test_sched.py
test_scope.py
test_script_helper.py
test_secrets.py
test_select.py
test_selectors.py
test_set.py
test_setcomps.py
test_shelve.py
test_shlex.py
test_shutil.py [3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (#149071) 2026-08-09 17:32:23 +01:00
test_signal.py
test_site.py
test_slice.py
test_smtpd.py
test_smtplib.py
test_smtpnet.py
test_sndhdr.py
test_socket.py [3.11] gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (GH-145589) (GH-145809) (#148616) 2026-08-12 23:57:07 +01:00
test_socketserver.py
test_sort.py
test_source_encoding.py
test_spwd.py
test_ssl.py [3.11] gh-160040: Distrust compromised eMudhra intermediate CA keys (CVE-2026-115557) (GH-160042) (GH-160572) 2026-10-24 16:10:44 -07:00
test_stable_abi_ctypes.py
test_startfile.py
test_stat.py
test_statistics.py
test_strftime.py
test_string.py
test_string_literals.py
test_stringprep.py
test_strptime.py
test_strtod.py
test_struct.py
test_structseq.py
test_subclassinit.py
test_subprocess.py [3.11] gh-90872: Fix subprocess.Popen.wait() for negative timeout (#116989) (#117003) 2024-03-19 14:21:42 +00:00
test_sunau.py
test_sundry.py [3.11] gh-135374: Adjust test for setuptools' replacement of distutils (GH-138796) 2025-09-24 15:41:24 +02:00
test_super.py
test_support.py
test_symtable.py
test_syntax.py [3.11] gh-109120: Fix syntax error in handlinh of incorrect star expressions… (#117464) 2024-04-03 11:37:39 +01:00
test_sys.py [3.11] gh-106883: Make test_current_frames_exceptions_deadlock faster (#131182) 2025-03-14 01:59:59 +00:00
test_sys_setprofile.py
test_sys_settrace.py
test_sysconfig.py
test_syslog.py
test_tabnanny.py
test_tarfile.py [3.11] gh-160097: Reject links replacing the destination in tarfile.tar_filter (GH-160098) (#160343) 2026-10-25 11:15:45 -07:00
test_tcl.py
test_telnetlib.py
test_tempfile.py [3.11] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118739) 2024-05-24 02:13:18 +02:00
test_termios.py
test_textwrap.py
test_thread.py
test_threadedtempfile.py
test_threading.py
test_threading_local.py
test_threadsignals.py [3.11] gh-71052: Use raise_signal in ThreadSignals.test_signals (GH-116423) (#116617) 2024-03-11 21:01:13 +00:00
test_time.py
test_timeit.py
test_timeout.py
test_tix.py
test_tk.py
test_tokenize.py
test_trace.py
test_traceback.py
test_tracemalloc.py
test_ttk_guionly.py
test_ttk_textonly.py
test_tty.py
test_tuple.py
test_turtle.py
test_type_annotations.py
test_type_cache.py
test_type_comments.py
test_typechecks.py
test_types.py
test_typing.py [3.11] gh-117110: Fix subclasses of typing.Any with custom constructors (GH-117111) (#117358) 2024-03-29 00:38:13 +00:00
test_ucn.py
test_unary.py
test_unicode.py
test_unicode_file.py
test_unicode_file_functions.py
test_unicode_identifiers.py
test_unicodedata.py [3.11] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) (GH-156020) (#156931) 2026-10-01 01:29:41 +01:00
test_unittest.py
test_univnewlines.py
test_unpack.py
test_unpack_ex.py
test_unparse.py
test_urllib.py [3.11] gh-143925: Reject control characters in data: URL mediatypes (#144114) 2026-01-25 17:05:19 +00:00
test_urllib2.py [3.11] gh-155694: Scope HTTPPasswordMgr credentials by URL scheme (GH-155696) (#155972) 2026-10-01 01:27:46 +01:00
test_urllib2_localnet.py
test_urllib2net.py
test_urllib_response.py
test_urllibnet.py
test_urlparse.py [3.11] gh-105704: Disallow square brackets ([ and ]) in domain names for parsed URLs (GH-129418) (#129528) 2025-02-19 14:13:52 +01:00
test_userdict.py
test_userlist.py
test_userstring.py
test_utf8_mode.py
test_utf8source.py
test_uu.py
test_uuid.py
test_venv.py [3.11] gh-124651: Quote template strings in venv activation scripts (GH-124712) (GH-126185) (#126269) 2024-11-01 13:11:47 +00:00
test_wait3.py
test_wait4.py
test_wave.py
test_weakref.py
test_weakset.py
test_webbrowser.py [3.11] gh-148169: Fix webbrowser %action substitution bypass of dash-prefix check (GH-148170) (#148520) 2026-04-13 22:41:51 +01:00
test_winconsoleio.py
test_winreg.py
test_winsound.py
test_with.py
test_wsgiref.py [3.11] gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (#144371) (#145672) 2026-05-17 11:33:30 -07:00
test_xdrlib.py
test_xml_dom_minicompat.py
test_xml_etree.py [3.11] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) (#154813) 2026-08-10 20:53:19 +01:00
test_xml_etree_c.py
test_xmlrpc.py
test_xmlrpc_net.py
test_xxlimited.py
test_xxtestfuzz.py
test_yield_from.py
test_zipapp.py
test_zipfile.py [3.11] gh-156002: Bound zipfile decompression for bzip2/LZMA/Zstandard (GH-156003) (GH-156362) (#156740) 2026-10-01 01:30:19 +01:00
test_zipfile64.py
test_zipimport.py
test_zipimport_support.py
test_zlib.py [3.11] gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes (GH-125042) (#125577) 2024-10-22 12:11:14 +01:00
testcodec.py
testtar.tar
testtar.tar.xz
tf_inherit_check.py
time_hashlib.py
win_console_handler.py
xmltests.py
zip_cp437_header.zip
zipdir.zip
zipdir_backslash.zip [3.11] gh-117084: Fix ZIP file extraction for directory entry names with backslashes on Windows (GH-117129) (GH-117162) (GH-117165) 2024-03-22 19:24:27 +00:00