cpython/Lib
Nick Coghlan 93602e3af7 [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169)
bpo-27286 fixed a problem where BUILD_MAP_UNPACK_WITH_CALL could
be emitted with an incorrect oparg value, causing the eval loop
to access the wrong stack entry when attempting to read the
function name.

The associated magic number change caused significant problems when
attempting to upgrade to 3.5.3 for anyone that relies on pre-cached
bytecode remaining valid across maintenance releases.

This patch restores the ability to import legacy bytecode generated
by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.

Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
and tests and integration by Nick Coghlan.
2017-03-08 16:41:01 +10:00
..
asyncio bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405) 2017-03-03 12:23:44 -05:00
collections Issue #29119: Fix weakref in OrderedDict.move_to_end(). Work by Andra Bogildea. 2016-12-31 12:01:59 -07:00
concurrent Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
ctypes Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#221) 2017-02-22 06:19:55 +00:00
curses Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox. 2016-12-28 10:16:06 +02:00
dbm Issue #28847: dbm.dumb now supports reading read-only files and no longer 2016-12-07 10:56:39 +02:00
distutils Fix spelling and grammar in code comments and documentation 2016-12-18 01:23:09 +00:00
email #19003: Only replace \r and/or \n line endings in email.generator. 2016-09-11 17:22:56 -04:00
encodings Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
ensurepip Upgrade pip to 9.0.1 and setuptools to 28.8.0 2016-11-15 21:17:43 -05:00
html Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
http Issue28010 - Make http.client.HTTPConnection.putrequest documentation consistent with the code. 2016-09-08 14:28:01 -07:00
idlelib Change some mercurial/ hg.python.org references. (#8) (#184) 2017-02-19 18:58:20 -08:00
importlib [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) 2017-03-08 16:41:01 +10:00
json Fixed the documentation of parse_constant argument in json.load(). 2016-11-12 22:47:16 +02:00
lib2to3 rm unused import 2016-12-05 22:30:55 -08:00
logging Issue #29220: Improved fix and test. 2017-01-11 17:35:36 +00:00
msilib Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
multiprocessing Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks. 2016-12-10 17:13:16 +01:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic
plat-linux
plat-netbsd1
plat-next3
plat-sunos5
plat-unixware7
pydoc_data Regenerated pydoc topics for 3.5.3rc1. 2017-01-01 22:09:56 -08:00
site-packages
sqlite3 Issue #29123: Make CheckSqlTimestamp more robust 2016-12-31 22:48:55 +03:00
test [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) 2017-03-08 16:41:01 +10:00
tkinter Issue 28923: Remove editor artifacts from Tix.py. 2016-12-21 23:59:47 -05:00
turtledemo Issue #27117: Make ColorDelegator htest and turtledemo work with dark theme. 2016-05-29 01:40:30 -04:00
unittest Fix unittest.mock._Call: don't ignore name (#307) 2017-02-26 16:06:11 +03:00
urllib Issue #29142: Fix suffixes in no_proxy handling in urllib. 2017-01-09 11:47:55 +08:00
venv Fixes #29213: regularised EOLs of venv scripts. 2017-02-02 19:25:24 +00:00
wsgiref Issue #24291: Avoid WSGIRequestHandler doing partial writes 2016-06-05 06:28:55 +00:00
xml Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes 2016-09-11 23:18:03 -07:00
xmlrpc bpo-29615: backport to 3.5 (#479) 2017-03-05 18:14:26 +02:00
__future__.py PEP 479: Change StopIteration handling inside generators. 2015-05-09 11:44:30 -04:00
__phello__.foo.py
_bootlocale.py
_collections_abc.py Issue #28376: The type of long range iterator is now registered as Iterator. 2016-10-08 22:04:12 +03:00
_compat_pickle.py Issue #26013: Added compatibility with broken protocol 2 pickles created 2016-01-18 21:35:22 +02:00
_compression.py
_dummy_thread.py
_markupbase.py
_osx_support.py Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
_pydecimal.py Issue #27348: Restore “Exception: None” formatting in traceback module 2016-09-22 09:37:39 +00:00
_pyio.py Change order of io.UnsupportedOperation base classes. 2016-12-07 13:31:20 +02:00
_sitebuiltins.py
_strptime.py Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by 2016-03-12 10:51:16 +02:00
_threading_local.py
_weakrefset.py
abc.py
aifc.py bpo-29110: Fix file object leak in aifc.open (GH-311) 2017-02-27 04:35:00 +09:00
antigravity.py Issue #28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. 2016-09-16 13:48:10 +02:00
argparse.py Issue #29290: argparse help messages won't wrap at non-breaking spaces. 2017-01-22 14:37:22 +08:00
ast.py Issue #25670: Remove duplicate getattr() from ast.NodeTransformer 2015-11-20 08:49:58 +01:00
asynchat.py
asyncore.py
base64.py Add Python version since deprecation in base64 methods. (#33) (#430) 2017-03-03 18:07:01 +03:00
bdb.py
binhex.py
bisect.py
bz2.py
calendar.py Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space 2016-10-25 15:00:52 +03:00
cgi.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
cgitb.py
chunk.py Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
cmd.py
code.py
codecs.py Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
codeop.py
colorsys.py
compileall.py Issue #28485: Check for negative workers even without ProcessPoolExecutor 2016-11-05 01:11:36 +00:00
configparser.py Fixes #24142: [configparser] always join multiline values to not leave the parser in an invalid state 2016-11-26 14:00:39 -08:00
contextlib.py bpo-27122: Fix comment to point to correct issue number (#50) 2017-02-12 19:18:00 +03:00
copy.py Issue #26202: copy.deepcopy() now correctly copies range() objects with 2016-01-28 21:43:35 +02:00
copyreg.py
cProfile.py
crypt.py
csv.py
datetime.py Issue #27626: Spelling fixes in docs, comments and internal names 2016-07-28 01:11:04 +00:00
decimal.py
difflib.py Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
dis.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
doctest.py doctest: fix _module_relative_path() error message 2016-03-25 12:50:36 +01:00
dummy_threading.py
enum.py issue26893: use mro() to examine class heirarchy 2016-05-01 10:03:53 -07:00
filecmp.py
fileinput.py Issue #15068: Avoid creating a reference loop in fileinput. 2016-03-08 23:35:35 +02:00
fnmatch.py
formatter.py Issue #25407: Drop the mention of the formatter module being removed 2015-10-16 12:09:33 -07:00
fractions.py Issue #27539: Fix unnormalised Fraction.__pow__ result for negative exponent and base. Thanks Vedran Čačić. 2016-08-22 10:50:53 +01:00
ftplib.py Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
functools.py Issue #28991: Fix obscure reentrancy bug in functools.lru_cache(). 2016-12-16 13:57:40 -08:00
genericpath.py
getopt.py Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
getpass.py getpass: update docstrings (GH-49) (GH-420) 2017-03-02 21:56:28 -08:00
gettext.py Issue #28563: Make plural form selection more lenient and accepting 2016-11-14 19:29:59 +02:00
glob.py Issue #25584: Added "escape" to the __all__ list in the glob module. 2015-11-09 23:18:19 +02:00
gzip.py Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
hashlib.py
heapq.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
hmac.py
imaplib.py #25591: improve imap tests. 2016-12-24 21:32:26 -05:00
imghdr.py
imp.py Issue #26844: Fix imp.find_module() to have the exception related to 2016-07-15 10:58:54 -07:00
inspect.py Issue #15812: Delete redundant max(start, 0) 2017-01-03 03:48:04 +03:00
io.py Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
ipaddress.py Issue #21386: Implement missing IPv4Address.is_global property 2016-06-11 22:11:47 +03:00
keyword.py
linecache.py
locale.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
lzma.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
macpath.py Issue #23780: Improved error message in os.path.join() with single argument. 2015-05-19 11:00:07 +03:00
macurl2path.py
mailbox.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
mailcap.py #14977: Make mailcap respect the order of the lines in the mailcap file. 2016-09-09 20:04:23 -04:00
mimetypes.py Issue #16329: Add .webm to mimetypes.types_map 2016-04-09 08:00:20 +03:00
modulefinder.py Issue #26881: Restored the name of scan_opcodes_25(). 2016-05-11 22:19:49 +03:00
netrc.py
nntplib.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
ntpath.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
nturl2path.py Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić. 2015-10-24 17:39:36 +03:00
numbers.py
opcode.py Issue #24400: Introduce a distinct type for 'async def' coroutines. 2015-06-22 12:19:30 -04:00
operator.py added matmul and imatmul to operator.__all__ 2015-06-07 19:21:01 +03:00
optparse.py Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
os.py Issue #28353: os.fwalk() no longer fails on broken links. 2016-10-25 14:28:38 +03:00
pathlib.py Issue #29416: Prevent infinite loop in pathlib.Path.mkdir 2017-02-04 14:54:56 -08:00
pdb.py Issue #20766: Fix references leaked by pdb in the handling of SIGINT handlers. 2016-10-12 20:13:24 +02:00
pickle.py Issue #17711: Fixed unpickling by the persistent ID with protocol 0. 2016-07-17 11:24:17 +03:00
pickletools.py Corrections for a/an in code comments and documentation 2016-05-08 13:53:41 +00:00
pipes.py
pkgutil.py [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) 2017-03-08 16:41:01 +10:00
platform.py [3.5] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) (#455) 2017-03-04 01:34:19 -05:00
plistlib.py Issue #28321: Fixed writing non-BMP characters with binary format in plistlib. 2016-10-04 20:04:30 +03:00
poplib.py #21804: Add RFC 6856 (UTF8) support to poplib. 2015-05-16 15:05:53 -04:00
posixpath.py #2466: ismount now recognizes mount points user can't access. 2016-08-18 21:27:48 -04:00
pprint.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
profile.py
pstats.py bpo-29554: Improve docs for pstat module and profile. (#88) (#228) 2017-02-22 04:55:03 +03:00
pty.py
py_compile.py Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
pyclbr.py Fix pyclbr to support importing packages 2016-03-17 09:06:41 +01:00
pydoc.py [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) 2017-03-08 16:41:01 +10:00
queue.py
quopri.py
random.py Improve docs for random.seed() 2016-09-04 11:17:28 -07:00
re.py
reprlib.py Issue #26634: recursive_repr() now sets __qualname__ of wrapper. 2016-04-26 09:30:44 +03:00
rlcompleter.py Issue #25660: Fix a unittest and rlcompleter when readline isn't available 2016-02-04 14:00:26 -05:00
runpy.py [backport to 3.5] - issue26896 - Disambiguate uses of "importer" with "finder". 2016-09-07 00:52:20 -07:00
sched.py
selectors.py Issue #27759: Fix selectors incorrectly retain invalid file descriptors. 2016-10-06 14:03:03 -04:00
shelve.py
shlex.py Closes #21999: Handled empty strings correctly when in POSIX mode. 2016-08-09 15:04:49 +01:00
shutil.py Issue #14061: Misc fixes and cleanups in archiving code in shutil. 2016-12-16 18:58:33 +02:00
signal.py Issue #25523: Further a-to-an corrections new in 3.5 2015-11-02 04:20:33 +00:00
site.py Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
smtpd.py #25328: add missing raise keyword in decode_data+SMTPUTF8 check. 2015-10-09 10:19:33 -04:00
smtplib.py Issue #27430: Fix typos, patch by scop. 2016-07-01 12:17:05 +03:00
sndhdr.py
socket.py Issue #26384: Fix UnboundLocalError in socket._sendfile_use_sendfile 2016-09-17 23:22:06 +03:00
socketserver.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
sre_compile.py
sre_constants.py
sre_parse.py Issue #26475: Fixed debugging output for regular expressions with the (?x) flag. 2016-03-06 09:15:47 +02:00
ssl.py Issues #27850 and #27766: Remove 3DES from ssl default cipher list and add ChaCha20 Poly1305. 2016-09-06 20:06:47 +02:00
stat.py
statistics.py Issue 26977, remove unneeded line in pvariance (duplicate call to _ss). 2016-05-11 11:50:13 +10:00
string.py Issue #26809: Add __all__ to string module. Patch by Emanuel Barry 2016-06-04 14:35:05 -05:00
stringprep.py
struct.py
subprocess.py Issue #29335: Fix subprocess.Popen.wait() when the child process has 2017-01-22 17:28:38 -08:00
sunau.py Corrected docstrings of audio modules. writeframes() accepts bytes, not str. 2015-07-10 22:13:40 +03:00
symbol.py Issue 24297: Update symbol.py. See also issue 24017. 2015-05-27 11:08:19 -04:00
symtable.py
sysconfig.py - Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars 2016-01-11 21:41:40 +01:00
tabnanny.py
tarfile.py Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar 2016-10-30 20:52:29 +02:00
telnetlib.py
tempfile.py Issue #26385: Cleanup NamedTemporaryFile if open() fails, by SilentGhost 2016-02-28 05:22:20 +00:00
textwrap.py Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces. 2016-10-25 14:44:54 +03:00
this.py
threading.py bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-329) 2017-02-27 11:46:37 +08:00
timeit.py Issue #24631: Fixed regression in the timeit modulu with multyline setup. 2015-07-15 22:11:36 +03:00
token.py PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
tokenize.py Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:36:29 +02:00
trace.py
traceback.py Issue #27348: Restore “Exception: None” formatting in traceback module 2016-09-22 09:37:39 +00:00
tracemalloc.py
tty.py
turtle.py Correct spelling in documentation and code comment 2016-09-10 10:38:28 +00:00
types.py Issue #24400: Resurrect inspect.isawaitable() 2015-07-03 13:11:35 -04:00
typing.py [3.5] bpo-28556: Update to typing: treat subscripted generics as proxies (GH-265) (GH-269) 2017-02-24 16:41:19 -08:00
uu.py
uuid.py Issue #19164: Improve exception message of uuid.UUID() 2016-03-20 16:49:10 +02:00
warnings.py Issue #18383: Avoid adding duplicate filters when warnings is reloaded 2016-05-26 09:10:55 +00:00
wave.py Corrected docstrings of audio modules. writeframes() accepts bytes, not str. 2015-07-10 22:13:40 +03:00
weakref.py Fix #29519: weakref spewing exceptions during interp finalization 2017-02-10 00:14:55 -08:00
webbrowser.py Issue #23262: The webbrowser module now supports Firefox 36+ and derived 2016-10-30 19:16:33 +02:00
xdrlib.py
zipapp.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
zipfile.py Issue #29094: Offsets in a ZIP file created with extern file object and modes 2017-01-01 19:00:30 +02:00