cpython/Lib
Serhiy Storchaka 22bbb0c4c7
[3.10] gh-98740: Fix validation of conditional expressions in RE (GH-98764) (GH-99046)
In very rare circumstances the JUMP opcode could be confused with the
argument of the opcode in the "then" part which doesn't end with the
JUMP opcode. This led to incorrect detection of the final JUMP opcode
and incorrect calculation of the size of the subexpression.

NOTE: Changed return value of functions _validate_inner() and
_validate_charset() in Modules/_sre/sre.c.  Now they return 0 on success,
-1 on failure, and 1 if the last op is JUMP (which usually is a failure).
Previously they returned 1 on success and 0 on failure.
(cherry picked from commit e9ac890c02)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-11-03 12:18:50 +02:00
..
asyncio gh-98703: Fix asyncio proactor_events calling _call_connection_lost multiple times (GH-98704) 2022-10-26 20:03:58 -07:00
collections Fix minor details in the Counter docs (GH-31029) (GH-31072) 2022-02-01 23:28:07 -06:00
concurrent [3.10] gh-95166: cancel map waited on future on timeout (GH-95169) (GH-95375) 2022-07-29 14:36:58 +02:00
ctypes [3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675) 2022-03-04 01:12:06 +01:00
curses
dbm
distutils
email gh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201) 2022-07-24 23:39:00 -07:00
encodings
ensurepip [3.10] gh-98331: Update bundled pip to 22.3 (GH-98332) (gh-98399) 2022-10-18 16:36:23 +01:00
html Add source for character mappings (GH-92014) (#92389) 2022-05-06 12:58:16 +02:00
http Document that MozillaCookieJar works for curl's cookie files (GH-91852) 2022-10-03 16:00:40 -07:00
idlelib gh-97527: IDLE - fix buggy macosx patch (GH-98313) 2022-10-16 08:33:33 -07:00
importlib gh-93353: Fix importlib.resources._tempfile() finalizer (GH-93377) 2022-06-13 10:52:50 -07:00
json gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961) 2022-09-25 01:20:53 -07:00
lib2to3 bpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035) 2022-01-31 12:03:40 -08:00
logging [3.10] gh-90195: Unset logger disabled flag when configuring it. (GH-96530) (GH-96533) 2022-09-03 15:10:04 +01:00
msilib
multiprocessing [3.10] gh-97514: Don't use Linux abstract sockets for multiprocessing (GH-98501) (GH-98503) 2022-10-20 16:55:51 -07:00
pydoc_data Python 3.10.8 2022-10-11 12:21:44 +01:00
site-packages
sqlite3 [3.10] gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (GH-9621) (#94015) 2022-06-20 02:14:57 +02:00
test [3.10] gh-98740: Fix validation of conditional expressions in RE (GH-98764) (GH-99046) 2022-11-03 12:18:50 +02:00
tkinter [3.10] Add more tkinter.Canvas tests (GH-98475) (#98477) 2022-10-28 12:10:41 +02:00
turtledemo gh-91212: Fixed flickering when the tracer is turned off (GH-95129) 2022-09-29 00:09:16 -07:00
unittest [3.10] gh-98624 Add mutex to unittest.mock.NonCallableMock (GH-98688) (#98798) 2022-10-28 12:16:53 +02:00
urllib gh-96035: Make urllib.parse.urlparse reject non-numeric ports (GH-98273) 2022-10-20 14:29:21 -07:00
venv [3.10] gh-93858: Prevent error when activating venv in nested fish instances (GH-93931) (GH-98403) 2022-10-18 16:39:06 +01:00
wsgiref gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961) 2022-09-25 01:20:53 -07:00
xml gh-96175: add missing self._localName assignment in xml.dom.minidom.Attr (GH-96176) 2022-08-23 09:42:10 -07:00
xmlrpc
zoneinfo
__future__.py
__phello__.foo.py
_aix_support.py
_bootsubprocess.py
_collections_abc.py [3.10] gh-98852: Fix subscription of types.GenericAlias instances (GH-98920) (GH-98969) 2022-11-01 20:14:38 +02:00
_compat_pickle.py
_compression.py
_markupbase.py
_osx_support.py
_py_abc.py
_pydecimal.py
_pyio.py bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631) 2022-03-04 10:33:57 -08:00
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
aifc.py
antigravity.py
argparse.py gh-91832: Add 'required' attr to argparse.Action repr (GH-91841) 2022-04-28 08:27:17 -07:00
ast.py gh-95588: Drop the safety claim from ast.literal_eval docs. (GH-95919) 2022-10-01 18:24:55 -07:00
asynchat.py [3.10] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891) (#31997) 2022-03-20 22:38:01 +02:00
asyncore.py [3.10] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891) (#31997) 2022-03-20 22:38:01 +02:00
base64.py
bdb.py bpo-30419: DOC: Update missing information in bdb docs (GH-1687) 2022-09-02 10:49:23 -07:00
binhex.py
bisect.py
bz2.py
calendar.py bpo-46266: Add calendar day of week constants to __all__ (GH-30412) (GH-30424) 2022-01-23 02:00:11 +01:00
cgi.py
cgitb.py
chunk.py
cmd.py
code.py
codecs.py gh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion to binary mode (GH-94370) 2022-10-21 16:28:25 -07:00
codeop.py gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132) 2022-09-25 01:21:21 -07:00
colorsys.py
compileall.py
configparser.py [3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084) 2022-02-02 10:41:30 -08:00
contextlib.py
contextvars.py
copy.py gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93632) 2022-06-10 15:59:39 +02:00
copyreg.py
cProfile.py
crypt.py gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742) 2022-08-30 00:59:56 -07:00
csv.py
dataclasses.py [3.10] gh-96151: Use a private name for passing builtins to dataclass. This now allows for a field named BUILTIN (gh-98143) (gh-98899) 2022-10-31 10:59:18 -04:00
datetime.py Check result of utc_to_seconds and skip fold probe in pure Python (GH-91582) 2022-05-14 08:01:53 -07:00
decimal.py
difflib.py Correct method name typo (GH-91970) 2022-04-27 15:19:43 -07:00
dis.py
doctest.py [3.10] bpo-28249: fix lineno location for empty DocTest instances (GH-30498) (#92981) 2022-05-19 21:16:57 +02:00
enum.py
filecmp.py
fileinput.py gh-93157: Fix fileinput didn't support errors in inplace mode (GH-95128) 2022-07-23 20:02:40 -07:00
fnmatch.py gh-89973: Fix re.error in the fnmatch module. (GH-93072) 2022-06-05 02:39:03 -07:00
fractions.py
ftplib.py
functools.py [3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) 2021-12-25 16:12:32 +02:00
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
graphlib.py
gzip.py
hashlib.py
heapq.py
hmac.py
imaplib.py
imghdr.py
imp.py
inspect.py GH-96073: Fix wild replacement in inspect.formatannotation (GH-96074) 2022-10-07 12:56:29 -07:00
io.py
ipaddress.py bpo-46415: Use f-string for ValueError in ipaddress.ip_{address,network,interface} helper functions (GH-30642) 2022-05-03 05:37:17 -07:00
keyword.py
linecache.py gh-92336: linecache.getline should not raise exceptions on decoding errors (GH-94410) 2022-06-30 02:46:27 -07:00
locale.py
lzma.py
mailbox.py
mailcap.py [3.10] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) (GH-93543) 2022-09-20 13:12:35 +02:00
mimetypes.py bpo-20392: Fix inconsistency with uppercase file extensions in mimetypes.guess_type (GH-30229) 2022-03-15 08:14:19 -07:00
modulefinder.py
netrc.py
nntplib.py
ntpath.py bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-93674) 2022-06-10 17:36:02 +01:00
nturl2path.py
numbers.py gh-68163: Correct conversion of Rational instances to float (GH-25619) (GH-96557) 2022-09-04 13:40:24 +01:00
opcode.py
operator.py
optparse.py
os.py gh-57179: Add note on symlinks for os.walk (GH-94799) 2022-10-07 20:15:08 -07:00
pathlib.py gh-93156 - fix negative indexing into absolute pathlib.PurePath().parents (GH-93273) 2022-06-03 14:53:00 -07:00
pdb.py gh-93696: Locate frozen module source with __file__ (GH-93697) 2022-10-25 06:48:41 -07:00
pickle.py gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93632) 2022-06-10 15:59:39 +02:00
pickletools.py
pipes.py
pkgutil.py
platform.py
plistlib.py Fix typo in error message in plistlib (GH-97540) 2022-09-28 11:32:59 -07:00
poplib.py
posixpath.py [3.10] gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650). (GH-95786) 2022-08-08 18:09:06 +03:00
pprint.py
profile.py
pstats.py [3.10] Fix type annotation of pstats.FunctionProfile.ncalls (GH-96741) (#96836) 2022-10-05 14:57:26 -07:00
pty.py
py_compile.py
pyclbr.py
pydoc.py [3.10] bpo-40296: Fix supporting generic aliases in pydoc (GH-30253). (GH-31976) 2022-03-18 20:46:31 +02:00
queue.py gh-90879: Fix missing parameter for put_nowait() (GH-91514) 2022-04-14 02:18:31 -07:00
quopri.py
random.py
re.py
reprlib.py
rlcompleter.py
runpy.py bpo-26792: Improve docstrings of runpy module run_functions (GH-30729) 2022-04-29 11:45:43 -07:00
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py gh-94844: Add pathlib support to shutil archive management (GH-94846) 2022-07-20 09:24:33 -07:00
signal.py [3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080) 2021-12-13 12:14:51 +02:00
site.py
smtpd.py [3.10] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891) (#31997) 2022-03-20 22:38:01 +02:00
smtplib.py
sndhdr.py
socket.py Remove the execution bit to some socket-related files. (GH-93368) 2022-06-01 00:31:31 -07:00
socketserver.py
sre_compile.py [3.10] gh-91575: Update case-insensitive matching in re to the latest Unicode version (GH-91580). (GH-91661) 2022-04-22 21:44:05 +03:00
sre_constants.py [3.10] gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070) (GH-92073) 2022-04-30 15:33:39 +03:00
sre_parse.py [3.10] gh-91700: Validate the group number in conditional expression in RE (GH-91702) (GH-91831) 2022-04-22 21:09:30 +03:00
ssl.py bpo-46604: fix function name in ssl module docstring (GH-31064) 2022-05-03 09:24:39 -07:00
stat.py
statistics.py Fix double-space in exception message (GH-29955) 2021-12-08 03:07:27 -08:00
string.py
stringprep.py
struct.py
subprocess.py Add note on capture_output arg to subprocess.run() docstring (GH-98012) 2022-10-07 10:54:54 -07:00
sunau.py
symtable.py Change list to view object (GH-93661) 2022-06-11 04:13:38 -07:00
sysconfig.py
tabnanny.py gh-97639: Remove tokenize.NL check from tabnanny (GH-97640) 2022-10-03 19:07:10 -07:00
tarfile.py gh-91387: Strip trailing slash from tarfile longname directories (GH-32423) 2022-06-21 11:09:55 -07:00
telnetlib.py
tempfile.py gh-83499: Fix closing file descriptors in tempfile (GH-93874) 2022-06-26 01:17:19 -07:00
textwrap.py
this.py
threading.py fix threading.Event.isSet() docstring (GH-96297) 2022-08-26 22:30:41 -07:00
timeit.py
token.py
tokenize.py
trace.py
traceback.py bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29826) 2021-11-29 10:07:24 +00:00
tracemalloc.py
tty.py
turtle.py gh-91212: Fixed flickering when the tracer is turned off (GH-95129) 2022-09-29 00:09:16 -07:00
types.py bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) 2021-12-05 13:26:37 -08:00
typing.py [3.10] gh-94245: Fix pickling and copying of typing.Tuple[()] (GH-94260) 2022-06-25 18:45:46 +03:00
uu.py
uuid.py gh-98415: Fix uuid.getnode() ifconfig implementation (GH-98423) 2022-11-02 12:22:19 -07:00
warnings.py
wave.py
weakref.py
webbrowser.py
xdrlib.py
zipapp.py
zipfile.py [3.10] gh-83245: Raise BadZipFile instead of ValueError when reading a corrupt ZIP file (GH-32291) (GH-93140) 2022-05-25 00:57:56 -07:00
zipimport.py