summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-01-26 08:02:00 (GMT)
committerGitHub <noreply@github.com>2019-01-26 08:02:00 (GMT)
commitd8080c01195cc9a19af752bfa04d98824dd9fb15 (patch)
tree75ab01426d6a329ad2987f58b5261443a0ee7c0e /Misc
parentadad9e68013aac166c84ffe4e23f3a5464f41840 (diff)
downloadcpython-d8080c01195cc9a19af752bfa04d98824dd9fb15.zip
cpython-d8080c01195cc9a19af752bfa04d98824dd9fb15.tar.gz
cpython-d8080c01195cc9a19af752bfa04d98824dd9fb15.tar.bz2
bpo-35780: Fix errors in lru_cache() C code (GH-11623)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-01-19-17-01-43.bpo-35780.CLf7fT.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-01-19-17-01-43.bpo-35780.CLf7fT.rst b/Misc/NEWS.d/next/Library/2019-01-19-17-01-43.bpo-35780.CLf7fT.rst
new file mode 100644
index 0000000..d444882
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-01-19-17-01-43.bpo-35780.CLf7fT.rst
@@ -0,0 +1,11 @@
+Fix lru_cache() errors arising in recursive, reentrant, or
+multi-threaded code. These errors could result in orphan links and in
+the cache being trapped in a state with fewer than the specified maximum
+number of links. Fix handling of negative maxsize which should have
+been treated as zero. Fix errors in toggling the "full" status flag.
+Fix misordering of links when errors are encountered. Sync-up the C
+code and pure Python code for the space saving path in functions with a
+single positional argument. In this common case, the space overhead of
+an lru cache entry is reduced by almost half. Fix counting of cache
+misses. In error cases, the miss count was out of sync with the actual
+number of times the underlying user function was called.