[issue24643] VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h
New submission from James Salter: For python 3.5, PC/pyconfig.h contains the following for vs2015 support: /* VS 2015 defines these names with a leading underscore */ #if _MSC_VER >= 1900 #define timezone _timezone #define daylight _daylight #define tzname _tzname #endif This breaks any python extension code that includes pyconfig.h and then defines any function or variable called 'timezone', 'daylight', or 'tzname'. My breaking case is a conflict with from the Windows 10 kit (for me: c:\program files (x86)\Windows Kits\10\include\10.0.10056.0\ucrt\sys\timeb.h). This is used during compilation of gevent, which includes that file via libev/ev_win32.c. timeb.h contains this innocent structure: struct __timeb32 { __time32_t time; unsigned short millitm; short timezone; short dstflag; }; I think we need a different approach that doesn't conflict with common english variable names and in particular other windows SDK includes. -- components: Extension Modules messages: 246803 nosy: James Salter priority: normal severity: normal status: open title: VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h type: behavior versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue24643> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24673] distutils/_msvccompiler does not remove /DLL during link(CCompiler.EXECUTABLE)
New submission from James Salter: Encountered trying to build numpy with python 3.5b3, visual studio 2015. >From distutils/_msvccompiler.py:MSVCCompiler.link: if self._need_link(objects, output_filename): ldflags = (self.ldflags_shared_debug if debug else self.ldflags_shared) if target_desc == CCompiler.EXECUTABLE: ldflags = ldflags[1:] But self.ldflags_shared = [ '/nologo', '/DLL', '/INCREMENTAL:NO' ] self.ldflags_shared_debug = [ '/nologo', '/DLL', '/INCREMENTAL:no', '/DEBUG:FULL' ] Which leads to a DLL being created instead of a .exe. I have attached a patch that explicitly removes '/DLL' rather than trimming by index. -- components: Distutils files: _msvccompiler_link.patch keywords: patch messages: 246976 nosy: James Salter, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils/_msvccompiler does not remove /DLL during link(CCompiler.EXECUTABLE) type: compile error versions: Python 3.5 Added file: http://bugs.python.org/file39959/_msvccompiler_link.patch ___ Python tracker <http://bugs.python.org/issue24673> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading
James Salter added the comment: This also affects py2exe, which dynamically generates stub .pyc loaders inside a ZIP which then load .pyd modules outside the ZIP with the same name. Windows 8, x64, visual studio 2015 enterprise. It is simple enough to work around by doing a del sys.modules[modname] prior to the load_dynamic call, but obviously this goes against the documented behaviour. -- nosy: +James Salter ___ Python tracker <http://bugs.python.org/issue24748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com