Skip to content

Conversation

matusvalo
Copy link
Contributor

Related to commit 4e9f730

@@ -51,46 +51,50 @@ def func_pure_implicit() -> cython.int:
def func_pure_noexcept() -> cython.int:
raise RuntimeError

def print_stderr(func):
def return_stderr(func):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def return_stderr(func):
def print_stderr(func):

func()
finally:
sys.stderr = old_stderr
return stderr.getvalue().strip()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return stderr.getvalue().strip()
return print(stderr.getvalue())

I was wondering about doing this, which I think would let us leave everything else unchanged.

@da-woods
Copy link
Contributor

I'll make an alternative PR will my suggestion for simplicity.

@matusvalo
Copy link
Contributor Author

I'll make an alternative PR will my suggestion for simplicity.

Feel free to close this PR if you prefer yours.

@da-woods
Copy link
Contributor

I've done #6105 which I think is a smaller change, so I'll merge that assuming it works. I've checked it locally though and it seems fine.

Thanks for looking into this quickly.

@matusvalo
Copy link
Contributor Author

Thank you @da-woods !

@matusvalo matusvalo closed this Mar 22, 2024
@matusvalo matusvalo deleted the revert_legacy_implicit_noexcept branch March 22, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants