FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-94398: TaskGroup: Fail create_task() during shutdown by gvanrossum · Pull Request #94400 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eed2413
GH-94398: TaskGroup: Fail create_task() during shutdown
gvanrossum Jun 29, 2022
0453e5e
📜🤖 Added by blurb_it.
blurb-it[bot] Jun 29, 2022
35b5645
Shorter sleep (even though it's aborted)
gvanrossum Jun 29, 2022
193623f
Use :class:`asyncio.TaskGroup` in Blurb.
ambv Jun 30, 2022
41302b0
gh-82006: IDLE doc improvements (#94349)
terryjreedy Jun 27, 2022
8699848
GH-89988: Fix memory leak in pickle.Pickler dispatch_table lookup (GH…
kumaraditya303 Jun 28, 2022
fee1b9f
gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347)
tiran Jun 28, 2022
01f25f3
gh-86404: [doc] Fix missing space in idle documentation. (GH-94366)
JulienPalard Jun 28, 2022
4c130ea
Generalize build_msi GitHub action (GH-94201)
arhadthedev Jun 28, 2022
8603119
gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation (GH-94200)
vstinner Jun 28, 2022
98082d0
gh-87995: Make MappingProxyType hashable (GH-94252)
serhiy-storchaka Jun 28, 2022
0282cf9
Add docs for decorated object and field specifier params (GH-94354)
debonte Jun 28, 2022
5e9d3b6
gh-94018: Remove trailing spaces in _sanitize_windows_name (GH-94040)
Rygone Jun 28, 2022
b5942e9
gh-61585: Clarify import scope in modules tutorial (GH-93455)
slateny Jun 28, 2022
8e1bce0
gh-94172: Remove ssl.PROTOCOL_SSLv2 dead code (#94312)
vstinner Jun 28, 2022
3daebfe
gh-93939: Create and install scripts in Makefile (GH-94324)
tiran Jun 28, 2022
7613609
gh-88116: Avoid undefined behavior when decoding varints in code obje…
pablogsal Jun 28, 2022
e2a0a60
Fix typos in comments (#94305)
yutotnh Jun 28, 2022
975a0cf
gh-94395: Remove unneeded module state from mmap (#94396)
erlend-aasland Jun 29, 2022
bf43498
gh-94404: makesetup: use correct CFLAGS and macOS workaround (GH-94405)
tiran Jun 29, 2022
2e919ba
gh-94026: Buffer regrtest worker stdout in temporary file (GH-94253)
tiran Jun 29, 2022
3fa27d3
gh-86404: [doc] Two 'make suspicious' false positives. (GH-94407)
JulienPalard Jun 29, 2022
1479a39
gh-94401: Remove unneeded overlapped module state (#94403)
Jun 29, 2022
6e77150
gh-94404: Use module CFLAGS before PY_STDMODULE_CFLAGS (GH-94413)
tiran Jun 29, 2022
c172b62
Delete unused PC/empty.c (GH-94418)
arhadthedev Jun 29, 2022
26a62e4
gh-94401: Remove unneeded bz2 module state (#94402)
Jun 29, 2022
be02d89
Docs: Update SyntaxError message in REPL example for list comprehensi…
csabella Jun 29, 2022
6a6b87d
bpo-92336: [doc] clarify that the dfile is read by the traceback disp…
iritkatriel Jun 29, 2022
9771d0a
gh-92336: linecache.getline should not raise exceptions on decoding e…
iritkatriel Jun 30, 2022
b966d66
gh-94332: make it safe to call assemble_free when assemble_init has n…
iritkatriel Jun 30, 2022
25c5af5
Delete DOS-only PC/testpy.py (GH-94419)
arhadthedev Jun 30, 2022
2d55fea
GH-94329: Don't raise on excessive stack consumption (GH-94421)
markshannon Jun 30, 2022
6a5a45f
gh-89038: [doc] update dis.findlinestarts documentation for changes r…
iritkatriel Jun 30, 2022
c9920dd
gh-91719: Reload opcode on unknown error so that C can optimize the d…
neonene Jun 30, 2022
9eb94f3
gh-93491: Fix PEP 11 tier detection for FreeBSD (GH-94441)
tiran Jun 30, 2022
159a057
GH-90908: Document asyncio.TaskGroup (GH-94359)
gvanrossum Jun 30, 2022
5b9817d
Document the new behavior
gvanrossum Jun 30, 2022
32cfb35
Merge branch 'main' into task-group-abort
gvanrossum Jun 30, 2022
File filter

Filter by extension

Filter by extension .c  (1) .py  (1) .rst  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
GH-89988: Fix memory leak in pickle.Pickler dispatch_table lookup (GH…
  • Loading branch information
kumaraditya303 authored and gvanrossum committed Jun 30, 2022
commit 8699848858c6612aac3d9c8e080758d370cb950f
23 changes: 23 additions & 0 deletions Lib/test/test_pickle.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,29 @@ def persistent_id(obj):
return obj
check(PersPickler)

@support.cpython_only
def test_custom_pickler_dispatch_table_memleak(self):
# See https://github.com/python/cpython/issues/89988

class Pickler(self.pickler):
def __init__(self, *args, **kwargs):
self.dispatch_table = table
super().__init__(*args, **kwargs)

class DispatchTable:
pass

table = DispatchTable()
pickler = Pickler(io.BytesIO())
self.assertIs(pickler.dispatch_table, table)
table_ref = weakref.ref(table)
self.assertIsNotNone(table_ref())
del pickler
del table
support.gc_collect()
self.assertIsNone(table_ref())


@support.cpython_only
def test_unpickler_reference_cycle(self):
def check(Unpickler):
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix memory leak in :class:`pickle.Pickler` when looking up :attr:`dispatch_table`. Patch by Kumar Aditya.
4 changes: 3 additions & 1 deletion Modules/_pickle.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4761,7 +4761,9 @@ _pickle_Pickler___init___impl(PicklerObject *self, PyObject *file,
{
return -1;
}

if (self->dispatch_table != NULL) {
return 0;
}
if (_PyObject_LookupAttr((PyObject *)self, &_Py_ID(dispatch_table),
&self->dispatch_table) < 0) {
return -1;
Expand Down

Back | FazBrowse Home | New Git URL