Skip to content

Conversation

@vstinner
Copy link
Member

Writing warnings to stderr causes many test failures and the warning
cannot be disabled.

@vstinner
Copy link
Member Author

@ncoghlan: So Nick, what do you think? :-)

Writing warnings to stderr causes many test failures in the Python
test suite, warning which could only be disabled when building Python
but not at runtime.

Remove also --with(out)-c-locale-warning option of configure and
PY_WARN_ON_C_LOCALE define.
@vstinner
Copy link
Member Author

I don't understand the AppVeyor failure :-( I'm not sure that it's related to my PR.

======================================================================
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 188, in test_s_option
    self.assertIn(usersite, sys.path)
AssertionError: 'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python37\\site-packages' not found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python37.zip', 'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 'C:\\projects\\cpython\\lib\\site-packages']

@ncoghlan
Copy link
Contributor

I'm fine with making the stderr warnings opt-in at runtime via PYTHONCOERCECLOCALE=warn, but I'm not a fan of removing them entirely.

With the off-by-default runtime switch, you could still remove the compile time option, though.

Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

I'm not a fan of this approach, so I'll put together an alternative PR that instead adds PYTHONCOERCECLOCALE=warn as a runtime guard for both the successful coercion warning and for the coercion-failed-or-was-not-attempted warning, while remove the build time option.

@ncoghlan
Copy link
Contributor

Competing proposal: #2260

@ncoghlan
Copy link
Contributor

@Haypo +1'ed #2260, so closing this in favour of that PR.

@ncoghlan ncoghlan closed this Jun 17, 2017
@vstinner
Copy link
Member Author

vstinner commented Jun 17, 2017 via email

@vstinner vstinner deleted the pep538_warn branch August 10, 2017 23:40
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.

3 participants