Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions 11 Lib/codeop.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ def _maybe_compile(compiler, source, filename, symbol):
except SyntaxError as e:
err2 = e

if code:
return code
if not code1 and repr(err1) == repr(err2):
raise err1
try:
if code:
return code
if not code1 and repr(err1) == repr(err2):
raise err1
finally:
err1 = err2 = None

def _compile(source, filename, symbol):
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
Expand Down
2 changes: 2 additions & 0 deletions 2 Lib/ctypes/macholib/dyld.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def framework_find(fn, executable_path=None, env=None):
return dyld_find(fn, executable_path=executable_path, env=env)
except ValueError:
raise error
finally:
error = None

def test_dyld_find():
env = {}
Expand Down
6 changes: 5 additions & 1 deletion 6 Lib/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,11 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
sock.close()

if err is not None:
raise err
try:
raise err
finally:
# Break explicitly a reference cycle
err = None
else:
raise error("getaddrinfo returns an empty list")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Break cycle generated when saving an exception in socket.py, codeop.py and
dyld.py as they keep alive not only the exception but user objects through
the ``__traceback__`` attribute. Patch by Mario Corchero.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.