8000 gh-130163: Fix usage of borrow references from _PySys_GetAttr by sergey-miryanov · Pull Request #130282 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-130163: Fix usage of borrow references from _PySys_GetAttr #130282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Prev Previous commit
Next Next commit
Fix tests for input
  • Loading branch information
sergey-miryanov committed Feb 22, 2025
commit e65b17c4d13fe6af41f2674e04b66d80b0649a7c
26 changes: 13 additions & 13 deletions Lib/test/test_sys_getattr.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ def __repr__(self):
del stdout
return "CrashStdout"

class CrashStderr:
def __init__(self):
self.stderr = sys.stderr
setattr(sys, "stderr", FakeIO())
class CrashStderr:
def __init__(self):
self.stderr = sys.stderr
setattr(sys, "stderr", FakeIO())

def __repr__(self):
stderr = sys.stderr
setattr(sys, "stderr", self.stderr)
del stderr
return "CrashStderr"

def audit(event, args):
if event == 'builtins.input':
repr(args)
def __repr__(self):
stderr = sys.stderr
setattr(sys, "stderr", self.stderr)
del stderr
return "CrashStderr"

def audit(event, args):
if event == 'builtins.input':
repr(args)

def main():
{0}
Expand Down
Loading
0