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 johnboy2
Recipients johnboy2, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-05-23.23:40:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621813200.62.0.269776219006.issue44220@roundup.psfhosted.org>
In-reply-to
Content
The symbol "PyStructSequence_UnnnamedField" is not *explicitly* marked for export, causing it to be omitted from python3x.dll on Windows -- and thus unavailable to Windows extension modules.

Attempting to use this symbol then fails at link time:
  test.obj : error LNK2001: unresolved external symbol PyStructSequence_UnnamedField
  build\lib.win-amd64-3.7\test.cp39-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals

The fact that the symbol is missing can also be demonstrated via ctypes:
  import ctypes
  from pathlib import Path
  import sys

  python_dll = ctypes.CDLL(str(Path(sys.executable).parent / 'python3.dll'))

  # These don't raise at all
  python_dll.PyTuple_Type
  python_dll.PyStructSequence_New

  # Raises AttributeError
  python_dll.PyStructSequence_UnnamedField
History
Date User Action Args
2021-05-23 23:40:00johnboy2setrecipients: + johnboy2, paul.moore, tim.golden, zach.ware, steve.dower
2021-05-23 23:40:00johnboy2setmessageid: <1621813200.62.0.269776219006.issue44220@roundup.psfhosted.org>
2021-05-23 23:40:00johnboy2linkissue44220 messages
2021-05-23 23:40:00johnboy2create