Closed poedator closed 1 year ago
On Tue, Jul 25, 2023 at 4:13 PM Poedator @.***> wrote:
I am trying to install winloop and fail: winloop from sources 0.0.7.2 python 3.10 pip 23.2 conda cython 3.0.0 Win 10.
When calling python setup.py build_ext --inplace I get error (trace below). same error when installing by pip install winloop. just it gets einloop 0.0.6/
(py10) C:\petals\winloop>python setup.py build_ext --inplace Compiling winloop\loop.pyx because it changed. [1/1] Cythonizing winloop\loop.pyx warning: winloop\includes/consts.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:8:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:10:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:13:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:16:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:21:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:24:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:25:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:8:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:10:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:13:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:16:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:21:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:24:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:25:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/stream.pyx:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:364:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:365:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:366:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:367:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 warning: winloop\handles/udp.pyx:351:8: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See cython/cython#4310 https://github.com/cython/cython/issues/4310 Error compiling Cython file:
...
cdef _call_later(self, uint64_t delay, object callback, object args, object context): return TimerHandle(self, callback, args, delay, context)
cdef void _handle_exception(self, object ex): ^
winloop\loop.pyx:719:9: Signature not compatible with previous declaration Error compiling Cython file:
... cdef _call_soon_handle(self, Handle handle)
cdef _call_later(self, uint64_t delay, object callback, object args, object context)
cdef void _handle_exception(self, object ex) noexcept ^
winloop\loop.pxd:149:31: Previous declaration is here warning: winloop\handles/basetransport.pyx:214:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UVBaseTransport'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here warning: winloop\handles/stream.pyx:284:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UVStream'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here warning: winloop\handles/udp.pyx:135:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UDPTransport'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here Error compiling Cython file:
...
=== overloads ===
cdef _new_socket(self) cdef size_t _get_write_buffer_size(self) noexcept
cdef bint _is_reading(self) ^
winloop\handles/basetransport.pxd:54:25: C method '_is_reading' is declared but not defined Traceback (most recent call last): File "C:\petals\winloop\setup.py", line 91, in do_installation() File "C:\petals\winloop\setup.py", line 57, in do_installation ext_modules=cythonize(ext), File "c:\conda\envs\py10\lib\site-packages\Cython\Build\Dependencies.py", line 1134, in cythonize cythonize_one(*args) File "c:\conda\envs\py10\lib\site-packages\Cython\Build\Dependencies.py", line 1301, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: winloop\loop.pyx
—
It seems that Cython has changed the way they did things since 3.0 is now out. I will look into fixing this all when I have the time to and I’ll let you know my findings. In the meantime it would be a good idea to create a workflow that can check for compiler errors. Thank you for finding this for me.
Reply to this email directly, view it on GitHub https://github.com/Vizonex/Winloop/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3K7GGXJEZXT3DXSXB2BXYLXSAZIXANCNFSM6AAAAAA2XUTOCI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@poedator I may have made a temporary fix and that's to drop the _is_reading() noexcept
Keyword on it which may have been the reason for your problem. Let me update the library with these changes I'm looking for some more fixes to uploading all the Wheels to pypi first then I'll actually update this library afterwards but until then those DEF
Keywords look to be like a new threat/problem in the future so I'll contact the uvloop devs about this change as well to see what both of our libraries can implement to fix the compiler warnings.
@poedator
https://github.com/Vizonex/Winloop/commit/273dd899b5ec8d5355ed3cf142739a760d1176d7
See if cloning and compiling the main branch fixes your issue, I'll handle dropping the DEF
Keywords soon as I can, seems to be deprecated by the main Cython Devs due to changes from Pyrex https://github.com/cython/cython/issues/4310
@poedator I found the real problem and I fixed it now let me change a few things. turns out we need to keep some of the noexcept keywords but I'll just have to upload my files to github so I don't have to make a bunch of mini pull-requests...
@poedator I'll mark this as Completed when you can tell me that your end compiled the library correctly.
Hi, @Vizonex ! Thank you for your quick response and fixes. I pulled https://github.com/Vizonex/Winloop/commit/a1394ead53ef0117fbd8a20d33f5ddcf9bbd4dae and was able to compile and install it. Had to update to Visual Studio-2022, for 2019 was missing 'io.h'.
Check out the compilation output and test results here: https://gist.github.com/poedator/14a1c2c0fd0e784b5a3227a7f63e7a54
1) there were warnings from compiler - you may want to act on them.
2) I ran the test code from this repo front page test result was Ran 2 tests in 2.173s
. Not sure it this was good or not - ehere to check the Asyncio Event Loop Policy?
On Tue, Aug 1, 2023 at 12:06 PM Poedator @.***> wrote:
Hi, @Vizonex https://github.com/Vizonex! Thank you for your quick response and fixes. I pulled a1394ea https://github.com/Vizonex/Winloop/commit/a1394ead53ef0117fbd8a20d33f5ddcf9bbd4dae and was able to compile and install it. Had to update to Visual Studio-2022, for 2019 was missing 'io.h'.
Check out the compilation output and test results here: https://gist.github.com/poedator/14a1c2c0fd0e784b5a3227a7f63e7a54
- there were warnings from compiler - you may want to act on them.
- I ran the test code from this repo front page test result was Ran 2 tests in 2.173s. Not sure it this was good or not - ehere to check the Asyncio Event Loop Policy?
— Reply to this email directly, view it on GitHub https://github.com/Vizonex/Winloop/issues/4#issuecomment-1660753275, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3K7GGTXKEB4GWSRC2AEIG3XTEZPPANCNFSM6AAAAAA2XUTOCI . You are receiving this because you were mentioned.Message ID: @.***>
Thank you I’ll be sure to add the missing
io.h
I compiled it myself without it on python version 3.9.15 but I’ll be sure to add it in for other builds as well, I’ll close this issue shortly.
I noticed that after installation frou sources the winloop
module does not appear in pip list
output. It also makes my VS Code complain. Yet it is importable in python. Not a blocker, but you may want to take a look.
I am trying to install winloop and fail: winloop from sources 0.0.7.2 python 3.10 pip 23.2 conda cython 3.0.0 Win 10.
When calling
python setup.py build_ext --inplace
I get error (trace below). same error when installing bypip install winloop
. just it gets einloop 0.0.6/(py10) C:\petals\winloop>python setup.py build_ext --inplace Compiling winloop\loop.pyx because it changed. [1/1] Cythonizing winloop\loop.pyx warning: winloop\includes/consts.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:8:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:10:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:13:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:16:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:21:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:24:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:25:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:8:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:10:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:13:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:16:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:21:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:24:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\includes/consts.pxi:25:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/stream.pyx:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:364:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:365:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:366:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/process.pyx:367:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: winloop\handles/udp.pyx:351:8: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
Error compiling Cython file:
...
winloop\loop.pyx:719:9: Signature not compatible with previous declaration
Error compiling Cython file:
... cdef _call_soon_handle(self, Handle handle)
winloop\loop.pxd:149:31: Previous declaration is here warning: winloop\handles/basetransport.pyx:214:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UVBaseTransport'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here warning: winloop\handles/stream.pyx:284:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UVStream'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here warning: winloop\handles/udp.pyx:135:9: Compatible but non-identical C method '_is_reading' not redeclared in definition part of extension type 'UDPTransport'. This may cause incorrect vtables to be generated. warning: winloop\handles/basetransport.pxd:54:25: Previous declaration is here
Error compiling Cython file:
...
=== overloads ===
winloop\handles/basetransport.pxd:54:25: C method '_is_reading' is declared but not defined Traceback (most recent call last): File "C:\petals\winloop\setup.py", line 91, in
do_installation()
File "C:\petals\winloop\setup.py", line 57, in do_installation
ext_modules=cythonize(ext),
File "c:\conda\envs\py10\lib\site-packages\Cython\Build\Dependencies.py", line 1134, in cythonize
cythonize_one(*args)
File "c:\conda\envs\py10\lib\site-packages\Cython\Build\Dependencies.py", line 1301, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: winloop\loop.pyx