[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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

bpo-38991: Remove test.support.strip_python_stderr() #17490

Merged
merged 1 commit into from Dec 8, 2019

Conversation

Copy link
Member

vstinner commented Dec 6, 2019

test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.

https://bugs.python.org/issue38991

test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.
Copy link
Member Author

vstinner commented Dec 6, 2019

@gpshead, @pablogsal, @ezio-melotti: What do you think of removing the function and modify script_helper functions to no longer strip whitespaces? If plan to do both changes anyway :-)

Copy link
Member

gpshead commented Dec 7, 2019

This looks good assuming we don't want the testsuite to pass when -X showrefcount is set. do we?

Copy link
Member Author

vstinner commented Dec 7, 2019

This looks good assuming we don't want the testsuite to pass when -X showrefcount is set. do we?

It seems like the test suite pass with this change and -X showrefcount:
https://bugs.python.org/issue38991#msg357960

test.support.args_from_interpreter_flags() doesn't inherit -X showrefcount to child processes.

Or do you think that test.support.args_from_interpreter_flags() should be modified to inherit -X showrefcount?

I never used -X showrefcount. I'm not sure if anyone uses it.

--

Multiple tests fail if I modify Python to force showrefcount:

diff --git a/Python/initconfig.c b/Python/initconfig.c
index caa9bf5f56..800d91c558 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -603,6 +603,8 @@ _PyConfig_InitCompatConfig(PyConfig *config)
 #ifdef MS_WINDOWS
     config->legacy_windows_stdio = -1;
 #endif
+
+    config->show_ref_count = 1;
 }

gpshead approved these changes Dec 7, 2019
Copy link
Member

gpshead commented Dec 7, 2019

sounds like we're all good then, lets not inherit -X showrefcount, that'll just cause headaches :)

vstinner merged commit 6cac113 into python:master Dec 8, 2019
vstinner deleted the strip_python_stderr branch Dec 8, 2019
Copy link
Member Author

vstinner commented Dec 8, 2019

Thanks for your review @gpshead and @serhiy-storchaka ;-)

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.
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.

None yet

5 participants