This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Segev Finer, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-07-05.06:44:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499237095.01.0.315723061315.issue30726@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-07-05 06:44:55vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Segev Finer
2017-07-05 06:44:55vstinnersetmessageid: <1499237095.01.0.315723061315.issue30726@psf.upfronthosting.co.za>
2017-07-05 06:44:55vstinnerlinkissue30726 messages
2017-07-05 06:44:54vstinnercreate