Message297705
Steve Dower: "The approach used to suppress this warning will also suppress other warnings that might be fixable. Hard to say it's definitely a good thing in this case, though in general I agree that selectively suppressing warnings that cannot be fixed is a good thing."
First of all, Modules/expat/ is a copy of https://github.com/libexpat/libexpat/. In the past, it contained significant patches. Today, it almost contains zero patch, the major addition is the pyexpatns.h file:
https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h
If someone considers that the following warning deserves a fix, please report it upstream:
Warning C4996 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. _elementtree C:\Users\Segev\prj\python\cpython\Modules\expat\xmlparse.c 796
I read the code, and I don't think that it deserves a fix. Using non-portable function _dupenv_s() makes the code a little bit more complex for a little benefit.
I agree that if libexpat is upgraded again, suppressing warnings can hide a future real bug. But right now, we embed a copy of libexpat 2.1.1 and I don't want to modify our downstream copy. |
|
Date |
User |
Action |
Args |
2017-07-05 06:44:55 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Segev Finer |
2017-07-05 06:44:55 | vstinner | set | messageid: <1499237095.01.0.315723061315.issue30726@psf.upfronthosting.co.za> |
2017-07-05 06:44:55 | vstinner | link | issue30726 messages |
2017-07-05 06:44:54 | vstinner | create | |
|