STINNER Victor added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30726>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to