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
Platform: Windows-11-10.0.22631-SP0
System: Windows
System Version: 10.0.22631
Processor: Intel64 Family 6 Model 167 Stepping 1, GenuineIntel SSE2: Yes AVX2: Yes NEON: No
Architecture: Bits: 64bit Linkage: WindowsPE
Python: CPython 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)]
pygame version: 2.5.3.dev1
SDL versions: Linked: 2.30.11 Compiled: 2.30.11
SDL Mixer versions: Linked: 2.8.0 Compiled: 2.8.0
SDL Font versions: Linked: 2.24.0 Compiled: 2.24.0
SDL Image versions: Linked: 2.9.0 Compiled: 2.9.0
Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
Display Driver: Display Not Initialized
Mixer Driver: Mixer Not Initialized
Linux (Fedora 41)
Platform: Linux-6.11.5-300.t2.fc41.x86_64-x86_64-with-glibc2.40
System: Linux
System Version: #1 SMP PREEMPT_DYNAMIC Fri Oct 25 05:44:11 UTC 2024
Processor: SSE2: Yes AVX2: Yes NEON: No
Architecture: Bits: 64bit Linkage: ELF
Python: CPython 3.13.1 (main, Dec 9 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)]
pygame version: 2.5.3.dev1
SDL versions: Linked: 2.30.11 Compiled: 2.30.11
SDL Mixer versions: Linked: 2.8.0 Compiled: 2.8.0
SDL Font versions: Linked: 2.22.0 Compiled: 2.22.0
SDL Image versions: Linked: 2.8.4 Compiled: 2.8.4
Freetype versions: Linked: 2.13.3 Compiled: 2.13.3
Display Driver: Display Not Initialized
Mixer Driver: Mixer Not Initialized
Current behavior:
Locally running python dev.py stubs (and by extension, python dev.py all) may give an error about stub vs implementation discrepancies. pygame-ce was installed with pip install .
The stub issues causing the fail seem to be valid, and are only inside of _sdl2 modules.
Expected behavior:
There are no discrepancies and the checks pass.
Or, the checks fail in CI checks on GitHub because of the discrepancies.
Steps to reproduce:
Clone the pygame-ce repo or a fork, locally. Open the directory
Create a venv with python -m venv .venv
Install pygame-ce with pip install ., using the venv interpreter.
Run python dev.py stubs
Observe the errors, and check that they are correct
Stack trace/error output/other error logs
Windows
$ python dev.py stubs
[dev.py] Using python 'C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe'
[dev.py] Checking pip version
[dev.py] > C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe -m pip -V
pip 24.2 from C:\Users\user\development\pygame-ce\.venv\Lib\site-packages\pip (python 3.13)
[dev.py] Determined pip version: 24.2
[dev.py] Installing dependencies
[dev.py] > C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe -m pip install -v numpy mypy==1.13.0
Using pip 24.2 from C:\Users\user\development\pygame-ce\.venv\Lib\site-packages\pip (python 3.13)
Requirement already satisfied: numpy in c:\users\user\development\pygame-ce\.venv\lib\site-packages (2.2.1)
Requirement already satisfied: mypy==1.13.0 in c:\users\user\development\pygame-ce\.venv\lib\site-packages (1.13.0)
Requirement already satisfied: typing-extensions>=4.6.0 in c:\users\user\development\pygame-ce\.venv\lib\site-packages (from mypy==1.13.0) (4.12.2)
Requirement already satisfied: mypy-extensions>=1.0.0 in c:\users\user\development\pygame-ce\.venv\lib\site-packages (from mypy==1.13.0) (1.0.0)
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
[dev.py] Generating and testing type stubs (with mypy)
[dev.py] > C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe buildconfig/stubs/gen_stubs.py
pygame-ce \ 2.5.3.dev1 (SDL 2.30.11, Python 3.13.0)
[dev.py] > C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe buildconfig/stubs/stubcheck.py
Using mypy invocation: `C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe -m mypy typing_sample_app.py` (version: mypy 1.13.0 (compiled: yes))
Success: no issues found in 1 source file
Using stubtest invocation: `C:\Users\user\development\pygame-ce\.venv\Scripts\python.exe -m mypy.stubtest` (version: stubtest.py 1.13.0)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "low_frequency"
Stub: in file C:\Users\user\development\pygame-ce\buildconfig\stubs\pygame\_sdl2\controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "high_frequency"
Stub: in file C:\Users\user\development\pygame-ce\buildconfig\stubs\pygame\_sdl2\controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "duration"
Stub: in file C:\Users\user\development\pygame-ce\buildconfig\stubs\pygame\_sdl2\controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.touch.get_device is inconsistent, stub argument "index" should be positional-only (rename with a leading double underscore, i.e. "__object")
Stub: in file C:\Users\user\development\pygame-ce\buildconfig\stubs\pygame\_sdl2\touch.pyi:4
def (index: builtins.int) -> builtins.int
Runtime:
def (object, /)
error: pygame._sdl2.touch.get_num_fingers is inconsistent, stub argument "device_id" should be positional-only (rename with a leading double underscore, i.e. "__object")
Stub: in file C:\Users\user\development\pygame-ce\buildconfig\stubs\pygame\_sdl2\touch.pyi:5
def (device_id: builtins.int) -> builtins.int
Runtime:
def (object, /)
Found 5 errors (checked 177 modules)
[dev.py] Process exited with error code 1
Linux
(.venv) ↪ python dev.py stubs
[dev.py] Using python '/home/user/development/pygame-ce/.venv/bin/python'
[dev.py] Checking pip version
[dev.py] > /home/user/development/pygame-ce/.venv/bin/python -m pip -V
pip 24.3.1 from /home/user/development/pygame-ce/.venv/lib64/python3.13/site-packages/pip (python 3.13)
[dev.py] Determined pip version: 24.3.1
[dev.py] Installing dependencies
[dev.py] > /home/user/development/pygame-ce/.venv/bin/python -m pip install -v numpy mypy==1.13.0
Using pip 24.3.1 from /home/user/development/pygame-ce/.venv/lib64/python3.13/site-packages/pip (python 3.13)
Requirement already satisfied: numpy in ./.venv/lib64/python3.13/site-packages (2.2.2)
Requirement already satisfied: mypy==1.13.0 in ./.venv/lib64/python3.13/site-packages (1.13.0)
Requirement already satisfied: typing-extensions>=4.6.0 in ./.venv/lib64/python3.13/site-packages (from mypy==1.13.0) (4.12.2)
Requirement already satisfied: mypy-extensions>=1.0.0 in ./.venv/lib64/python3.13/site-packages (from mypy==1.13.0) (1.0.0)
[dev.py] Generating and testing type stubs (with mypy)
[dev.py] > /home/user/development/pygame-ce/.venv/bin/python buildconfig/stubs/gen_stubs.py
pygame-ce 2.5.3.dev1 (SDL 2.30.11, Python 3.13.1)
[dev.py] > /home/user/development/pygame-ce/.venv/bin/python buildconfig/stubs/stubcheck.py
Using mypy invocation: `/home/user/development/pygame-ce/.venv/bin/python -m mypy typing_sample_app.py` (version: mypy 1.13.0 (compiled: yes))
Success: no issues found in 1 source file
Using stubtest invocation: `/home/user/development/pygame-ce/.venv/bin/python -m mypy.stubtest` (version: stubtest.py 1.13.0)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "low_frequency"
Stub: in file /home/user/development/pygame-ce/buildconfig/stubs/pygame/_sdl2/controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "high_frequency"
Stub: in file /home/user/development/pygame-ce/buildconfig/stubs/pygame/_sdl2/controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.controller.Controller.stop_rumble is inconsistent, runtime does not have argument "duration"
Stub: in file /home/user/development/pygame-ce/buildconfig/stubs/pygame/_sdl2/controller.pyi:29
def (self: pygame._sdl2.controller.Controller, low_frequency: builtins.float, high_frequency: builtins.float, duration: builtins.int) -> builtins.bool
Runtime:
def (self, /)
error: pygame._sdl2.touch.get_device is inconsistent, stub argument "index" should be positional-only (rename with a leading double underscore, i.e. "__object")
Stub: in file /home/user/development/pygame-ce/buildconfig/stubs/pygame/_sdl2/touch.pyi:4
def (index: builtins.int) -> builtins.int
Runtime:
def (object, /)
error: pygame._sdl2.touch.get_num_fingers is inconsistent, stub argument "device_id" should be positional-only (rename with a leading double underscore, i.e. "__object")
Stub: in file /home/user/development/pygame-ce/buildconfig/stubs/pygame/_sdl2/touch.pyi:5
def (device_id: builtins.int) -> builtins.int
Runtime:
def (object, /)
Found 5 errors (checked 177 modules)
[dev.py] Process exited with error code 1
The text was updated successfully, but these errors were encountered:
Thanks for the bug report! These seem to be actually valid issues that are correctly caught by stubtest on your end. I could not reproduce these fails locally for reasons beyond me, and neither could CI.
I have put up a PR to fix the issue, please review and check if that fixes the errors raised on your end
Environment (2):
main
branch, at commit: 565cae6Windows 11
Linux (Fedora 41)
Current behavior:
Locally running
python dev.py stubs
(and by extension,python dev.py all
) may give an error about stub vs implementation discrepancies.pygame-ce
was installed withpip install .
The stub issues causing the fail seem to be valid, and are only inside of
_sdl2
modules.Expected behavior:
There are no discrepancies and the checks pass.
Or, the checks fail in CI checks on GitHub because of the discrepancies.
Steps to reproduce:
python -m venv .venv
pygame-ce
withpip install .
, using the venv interpreter.python dev.py stubs
Stack trace/error output/other error logs
WindowsLinux
The text was updated successfully, but these errors were encountered: