simonpercivall / orderedset

Ordered Set implementation in Cython
Other
74 stars 14 forks source link

Support for 3.10 missing #34

Closed kayhayen closed 2 years ago

kayhayen commented 2 years ago

Hello,

I am using orderedset for Nuitka (https://nuitka.net/), however building it from Source for Windows fails in this way:

Pardon the German in here, it basically says "unresolved symbol":

  _orderedset.obj : error LNK2001: Nicht aufgel”stes externes Symbol "_PyGen_Send".
  build\lib.win-amd64-3.10\orderedset\_orderedset.cp310-win_amd64.pyd : fatal error LNK1120: 1 nicht aufgel”ste Externe
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120

This seems no more exported. Do you have any plans to support 3.10?

Thanks in advance, Kay Hayen

regolith commented 2 years ago

I had a similar error building on python 3.10.1 on Macos Big Sur and finding this stackoverflow post led me to try

pip install cython

which fixed this issue with building orderedset on my mac.

my error was:

    lib/orderedset/_orderedset.c:17433:19: error: implicit declaration of function '_PyGen_Send' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
tbarbette commented 2 years ago

I still have this issue after installing cython?

kayhayen commented 2 years ago

This is not maintained anymore, and not going to work, installing cython cannot fix the source code, which uses private API no more available.

For Nuitka I use this:

https://github.com/Nuitka/Nuitka/blob/develop/requirements-devel.txt

# Only for re-export, pylint: disable=unused-import

try:
    from orderedset import OrderedSet
except ImportError:
    try:
        from ordered_set import OrderedSet
    except ImportError:
        from .OrderedSetFallback import OrderedSet

The last catch is a pure Python implementation, the package names are different, but this abstracts it. If you only care for Python3.7 or higher, from ordered_set import OrderedSet will be good enough. See the requirements file of Nuitka for the package names there.