You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've built asyncpg in Fedora Linux with Cython 3.0.5 successfully, although with quite a few warnings.
Build warnings
asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyLong_AbsNeg’:
asyncpg/pgproto/pgproto.c:46832:97: warning: unsigned conversion from ‘int’ to ‘uintptr_t’ {aka ‘long unsigned int’} changes value from ‘-4’ to ‘18446744073709551612’ [-Wsign-conversion]
46832 | ((PyLongObject*)copy)->long_value.lv_tag = ((PyLongObject*)copy)->long_value.lv_tag & ~_PyLong_SIGN_MASK;
| ^
In file included from /usr/include/python3.12/internal/pycore_frame.h:9,
from asyncpg/pgproto/pgproto.c:49619:
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_varint’:
/usr/include/python3.12/internal/pycore_code.h:362:12: warning: conversion from ‘unsigned int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Wconversion]
362 | *ptr = val;
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_signed_varint’:
/usr/include/python3.12/internal/pycore_code.h:375:30: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
375 | return write_varint(ptr, val);
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_location_entry_start’:
/usr/include/python3.12/internal/pycore_code.h:382:12: warning: conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Wconversion]
382 | *ptr = 128 | (code << 3) | (length - 1);
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘adaptive_counter_bits’:
/usr/include/python3.12/internal/pycore_code.h:423:45: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion]
423 | return (value << ADAPTIVE_BACKOFF_BITS) |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
424 | (backoff & ((1<
asyncpg/protocol/protocol.c: In function ‘__Pyx_PyUnicode_AsDouble_WithSpaces’:
asyncpg/protocol/protocol.c:4194:58: warning: conversion to ‘long unsigned int’ from ‘Py_ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
4194 | char number = (char) PyMem_Malloc((length + 1) * sizeof(char));
| ^
In file included from /usr/include/python3.12/internal/pycore_frame.h:9,
from asyncpg/protocol/protocol.c:105482:
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_varint’:
/usr/include/python3.12/internal/pycore_code.h:362:12: warning: conversion from ‘unsigned int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Wconversion]
362 | *ptr = val;
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_signed_varint’:
/usr/include/python3.12/internal/pycore_code.h:375:30: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
375 | return write_varint(ptr, val);
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘write_location_entry_start’:
/usr/include/python3.12/internal/pycore_code.h:382:12: warning: conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Wconversion]
382 | *ptr = 128 | (code << 3) | (length - 1);
| ^~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘adaptive_counter_bits’:
/usr/include/python3.12/internal/pycore_code.h:423:45: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion]
423 | return (value << ADAPTIVE_BACKOFF_BITS) |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
424 | (backoff & ((1<<ADAPTIVE_BACKOFF_BITS)-1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/internal/pycore_code.h: In function ‘adaptive_counter_backoff’:
/usr/include/python3.12/internal/pycore_code.h:446:26: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
446 | unsigned int value = (1 << backoff) - 1;
| ^
/usr/include/python3.12/internal/pycore_code.h:447:34: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
447 | return adaptive_counter_bits(value, backoff);
| ^~~~~
/usr/include/python3.12/internal/pycore_code.h:447:41: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
447 | return adaptive_counter_bits(value, backoff);
| ^~~~~~~
asyncpg/protocol/protocol.c: In function ‘__Pyx__PyBytes_AsDouble’:
asyncpg/protocol/protocol.c:108361:58: warning: conversion to ‘long unsigned int’ from ‘Py_ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
108361 | char number = (char) PyMem_Malloc((digits + 1) * sizeof(char));
| ^
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -Iasyncpg/pgproto -Iasyncpg/pgproto/ -I/usr/include/python3.12 -c asyncpg/protocol/record/recordobj.c -o build/temp.linux-x86_64-cpython-312/asyncpg/protocol/record/recordobj.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion
asyncpg/protocol/record/recordobj.c: In function ‘record_dealloc’:
asyncpg/protocol/record/recordobj.c:101:5: warning: ‘UsingDeprecatedTrashcanMacro’ is deprecated [-Wdeprecated-declarations]
101 | Py_TRASHCAN_SAFE_BEGIN(o)
| ^~~~~~~~~~~~~~~~~~~~~~
Activity
befeleme commentedon Nov 13, 2023
We've built asyncpg in Fedora Linux with Cython 3.0.5 successfully, although with quite a few warnings.
Build warnings
Allow Cython 3 (fix MagicStack#1083)
kloczek commentedon Nov 13, 2023
After trimming build dependencies using below patch
Looks like build is OK.
Closing.
musicinmybrain commentedon Mar 28, 2024
Just noting that the upper-bound excluding Cython 3.x is still present in
master
:asyncpg/pyproject.toml
Line 62 in 1aab209
asyncpg/setup.py
Line 28 in 1aab209
Allow Cython 3 (fix MagicStack#1083)
Allow Cython 3 (#1101)