[issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\

2018-12-06 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\

2018-12-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 49cedc51a68b4cd2525c14ab02bd1a483d8be389 by Victor Stinner in 
branch '2.7':
bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819)
https://github.com/python/cpython/commit/49cedc51a68b4cd2525c14ab02bd1a483d8be389


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\

2018-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +10063
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\

2018-11-30 Thread STINNER Victor


New submission from STINNER Victor :

The compilation of Modules\zlib\ on Python 2.7 emits a lot of warnings: see 
AppVeyor logs above. I propose to define _CRT_SECURE_NO_WARNINGS in the 
pythoncore project to make these warnings quiet, to spot more easily new 
warnings.

Attached PR adds _CRT_SECURE_NO_WARNINGS to Python 2.7 pythoncore project.

In the master branch, the following project also set _CRT_SECURE_NO_WARNINGS:

* PCbuild/_decimal.vcxproj
* PCbuild/_elementtree.vcxproj
* PCbuild/_ssl.vcxproj
* PCbuild/pyexpat.vcxproj

Note: In the master branch, encode_current_locale() of Python/fileutils.c also 
uses wcstombs(), but no warning is emitted, whereas the C file is compiled by 
the pythoncore project which doesn't define _CRT_SECURE_NO_WARNINGS.


AppVeyor logs:

[00:01:51] ..\Modules\zlib\gzlib.c(193): warning C4996: 'wcstombs': This 
function or variable may be unsafe. Consider using wcstombs_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\stdlib.h(534) : see declaration of 'wcstombs'
[00:01:51] ..\Modules\zlib\gzlib.c(208): warning C4996: 'wcstombs': This 
function or variable may be unsafe. Consider using wcstombs_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\stdlib.h(534) : see declaration of 'wcstombs'
[00:01:51] ..\Modules\zlib\gzlib.c(214): warning C4996: '_snprintf': This 
function or variable may be unsafe. Consider using _snprintf_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\stdio.h(358) : see declaration of '_snprintf'
[00:01:51] ..\Modules\zlib\gzlib.c(245): warning C4996: '_wopen': This function 
or variable may be unsafe. Consider using _wsopen_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\io.h(276) : see declaration of '_wopen'
[00:01:51] ..\Modules\zlib\gzlib.c(245): warning C4996: 'open': The POSIX name 
for this item is deprecated. Instead, use the ISO C++ conformant name: _open. 
See online help for details. [C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\io.h(316) : see declaration of 'open'
[00:01:51] ..\Modules\zlib\gzlib.c(296): warning C4996: '_snprintf': This 
function or variable may be unsafe. Consider using _snprintf_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\stdio.h(358) : see declaration of '_snprintf'
[00:01:51] ..\Modules\zlib\gzlib.c(612): warning C4996: '_snprintf': This 
function or variable may be unsafe. Consider using _snprintf_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\stdio.h(358) : see declaration of '_snprintf'
[00:01:51]   gzread.c
[00:01:51] ..\Modules\zlib\gzread.c(35): warning C4996: 'read': The POSIX name 
for this item is deprecated. Instead, use the ISO C++ conformant name: _read. 
See online help for details. [C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\io.h(317) : see declaration of 'read'
[00:01:51] ..\Modules\zlib\gzread.c(41): warning C4996: 'strerror': This 
function or variable may be unsafe. Consider using strerror_s instead. To 
disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\string.h(126) : see declaration of 'strerror'
[00:01:51] ..\Modules\zlib\gzread.c(651): warning C4996: 'close': The POSIX 
name for this item is deprecated. Instead, use the ISO C++ conformant name: 
_close. See online help for details. 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:01:51]   C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\include\io.h(306) : see declaration of 'close'
[00:01:51]   gzwrite.c
[00:01:51] ..\Modules\zlib\gzwrite.c(89): warning C4996: 'write': The POSIX 
name for this item is deprecated. Instead, use the ISO C++ conformant name: 
_write. See online help for details.