Patch for recent Python versions

Marco Atzeri marco.atzeri@gmail.com
Sat Oct 4 11:50:09 GMT 2025


On 27/04/2025 04:37, Keith Thompson via Cygwin wrote:
> I see that Cygwin only supports Python 3.9.16 (or 3.9.18 as a test
> version), which is a couple of years old.
> 
> I'm sure there's work to support newer versions, but I don't know
> the details.
> 
> I've succesfully built 3.13.3 and 3.14.0a7 from source, with the
> patch at the bottom of this email.
> 
> There are still some issues, including lack of support for asyncio
> due to the missing epoll API.  (And I'm curious why clockid_t is
> defined as unsigned long; it seems like overkill.)
> 
> Hope this is helpful.
> 
> commit c1e99d313386789d201a38c68f6d962f60324ace (v3.13.3_cygwin)
> Author: Keith Thompson <Keith.S.Thompson@gmail.com>
> Date:   2025-04-26 16:16:27 -0700
> 
>      clockid_t is unsigned long on Cygwin
> 
> diff --git Modules/timemodule.c Modules/timemodule.c
> index 49626d32fd3..a08fbfb57cc 100644
> --- Modules/timemodule.c
> +++ Modules/timemodule.c
> @@ -189,6 +189,8 @@ time_clockid_converter(PyObject *obj, clockid_t *p)
>       long long clk_id = PyLong_AsLongLong(obj);
>   #elif defined(__DragonFly__)
>       long clk_id = PyLong_AsLong(obj);
> +#elif defined(__CYGWIN__)
> +    unsigned long clk_id = PyLong_AsUnsignedLong(obj);
>   #else
>       int clk_id = PyLong_AsInt(obj);
>   #endif
> 

Thanks.

I will look on it


More information about the Cygwin mailing list