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
This issue seems to be specific to MacOS. Encountered while testing with mypy / mypyc.
The traceback below is with Python 3.13.1 (v3.13.1:06714517797, Dec 3 2024, 14:00:22) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin, however a slightly different error is also reproducible in CI with Python 3.9. See link below.
Oh right, PyConfig.use_system_logger will only be available on Python 3.13.2 which is not available yet! I just removed the member in 03043e3. I modified the CI to test more Python versions on macOS.
however a slightly different error is also reproducible in CI with Python 3.9. See link below.
I cannot reproduce the Python 3.9 error. Can you please retry with updated pythoncapi_compat.h?
If you still have the bug, you may try to replace Py_ARRAY_LENGTH(config_spec) with sizeof(config_spec) / sizeof(config_spec[0]).
By the way, I'm curious, why do you update pythoncapi_compat.h?
Oh, I see that Py_ARRAY_LENGTH() is still causing troubles after PyConfig.use_system_logger removal. I wrote 4c53701 to replace Py_ARRAY_LENGTH() with sizeof().
By the way, I'm curious, why do you update pythoncapi_compat.h?
Did you mean the fix I applied manually in the PR? That was just #130.
Aside from that another maybe better name for the mypy PR would be "Sync pythoncapi_compat.h" :)
Activity
vstinner commentedon Jan 26, 2025
Oh right,
PyConfig.use_system_loggerwill only be available on Python 3.13.2 which is not available yet! I just removed the member in 03043e3. I modified the CI to test more Python versions on macOS.I cannot reproduce the Python 3.9 error. Can you please retry with updated pythoncapi_compat.h?
If you still have the bug, you may try to replace
Py_ARRAY_LENGTH(config_spec)withsizeof(config_spec) / sizeof(config_spec[0]).By the way, I'm curious, why do you update
pythoncapi_compat.h?vstinner commentedon Jan 26, 2025
Oh, I see that
Py_ARRAY_LENGTH()is still causing troubles afterPyConfig.use_system_loggerremoval. I wrote 4c53701 to replacePy_ARRAY_LENGTH()withsizeof().cdce8p commentedon Jan 26, 2025
Looks good now. Thanks for the quick fixes!
Did you mean the fix I applied manually in the PR? That was just #130.
Aside from that another maybe better name for the mypy PR would be "Sync pythoncapi_compat.h" :)
vstinner commentedon Jan 26, 2025
If you don't need new functions, you don't have to update pythoncapi_compat.h.
But I'm glad that you did it, to report regressions :-)
Good. You're welcome.
cdce8p commentedon Jan 26, 2025
True.
Always good to stay on top of it. Especially with mypyc you never know when you're going to need one of these ;)