python / typeshed

Collection of library stubs for Python, with static types
Other
4.39k stars 1.77k forks source link

No such file or directory: 'stubdefaulter' when running `create_baseline_stubs.py` #13094

Closed dokterbob closed 4 days ago

dokterbob commented 5 days ago

When generating baseline stubs for a new package based on CONTRIBUTING.md:

(.venv) drbob@seahorse typeshed % scripts/create_baseline_stubs.py python-socketio
Using detected package "socketio" for project "python-socketio"
Suggestion: Try again with --package argument if that's not what you wanted
Running stubgen: stubgen -o stubs/python-socketio -p socketio
Processed 31 modules
Generated files under stubs/python-socketio/socketio/
Running stubdefaulter: stubdefaulter --packages stubs/python-socketio
Traceback (most recent call last):
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 250, in <module>
    main()
    ~~~~^^
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 232, in main
    run_stubdefaulter(stub_dir)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 59, in run_stubdefaulter
    subprocess.run(["stubdefaulter", "--packages", stub_dir])
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
         ~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1036, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1966, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'stubdefaulter'

Full log:

drbob@seahorse typeshed % python3 -m venv .venv
drbob@seahorse typeshed % source .venv/bin/activate
(.venv) drbob@seahorse typeshed % python
Python 3.13.0 (main, Oct  7 2024, 05:02:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
(.venv) drbob@seahorse typeshed % pip install -U pip
Requirement already satisfied: pip in ./.venv/lib/python3.13/site-packages (24.2)
Collecting pip
  Using cached pip-24.3.1-py3-none-any.whl.metadata (3.7 kB)
Using cached pip-24.3.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.2
    Uninstalling pip-24.2:
      Successfully uninstalled pip-24.2
Successfully installed pip-24.3.1
(.venv) drbob@seahorse typeshed % pip install -r requirements-tests.txt
Ignoring pytype: markers 'platform_system != "Windows" and python_version >= "3.10" and python_version < "3.13"' don't match your environment
Ignoring grpcio-tools: markers 'python_version < "3.13"' don't match your environment
Ignoring stubdefaulter: markers 'python_version < "3.13"' don't match your environment
Processing ./lib (from -r requirements-tests.txt (line 27))
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting mypy==1.13.0 (from -r requirements-tests.txt (line 3))
  Downloading mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl.metadata (2.1 kB)
Collecting pyright==1.1.389 (from -r requirements-tests.txt (line 4))
  Using cached pyright-1.1.389-py3-none-any.whl.metadata (6.7 kB)
Collecting aiohttp==3.10.11 (from -r requirements-tests.txt (line 9))
  Downloading aiohttp-3.10.11-cp313-cp313-macosx_10_13_x86_64.whl.metadata (7.7 kB)
Collecting mypy-protobuf==3.6.0 (from -r requirements-tests.txt (line 13))
  Downloading mypy_protobuf-3.6.0-py3-none-any.whl.metadata (466 bytes)
Collecting packaging==24.1 (from -r requirements-tests.txt (line 14))
  Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting pathspec>=0.11.1 (from -r requirements-tests.txt (line 15))
  Using cached pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Collecting pre-commit (from -r requirements-tests.txt (line 16))
  Downloading pre_commit-4.0.1-py2.py3-none-any.whl.metadata (1.3 kB)
Collecting ruff==0.7.1 (from -r requirements-tests.txt (line 18))
  Downloading ruff-0.7.1-py3-none-macosx_10_12_x86_64.whl.metadata (25 kB)
Collecting termcolor>=2.3 (from -r requirements-tests.txt (line 20))
  Downloading termcolor-2.5.0-py3-none-any.whl.metadata (6.1 kB)
Collecting tomli==2.0.2 (from -r requirements-tests.txt (line 21))
  Using cached tomli-2.0.2-py3-none-any.whl.metadata (10.0 kB)
Collecting tomlkit==0.13.2 (from -r requirements-tests.txt (line 22))
  Downloading tomlkit-0.13.2-py3-none-any.whl.metadata (2.7 kB)
Collecting typing_extensions>=4.12.0rc1 (from -r requirements-tests.txt (line 23))
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting uv==0.4.26 (from -r requirements-tests.txt (line 24))
  Downloading uv-0.4.26-py3-none-macosx_10_12_x86_64.whl.metadata (11 kB)
Collecting mypy-extensions>=1.0.0 (from mypy==1.13.0->-r requirements-tests.txt (line 3))
  Using cached mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Collecting nodeenv>=1.6.0 (from pyright==1.1.389->-r requirements-tests.txt (line 4))
  Using cached nodeenv-1.9.1-py2.py3-none-any.whl.metadata (21 kB)
Collecting aiohappyeyeballs>=2.3.0 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Using cached aiohappyeyeballs-2.4.3-py3-none-any.whl.metadata (6.1 kB)
Collecting aiosignal>=1.1.2 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Using cached aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB)
Collecting attrs>=17.3.0 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Using cached attrs-24.2.0-py3-none-any.whl.metadata (11 kB)
Collecting frozenlist>=1.1.1 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Downloading frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl.metadata (13 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Downloading multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl.metadata (5.0 kB)
Collecting yarl<2.0,>=1.12.0 (from aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Downloading yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl.metadata (67 kB)
Collecting protobuf>=4.25.3 (from mypy-protobuf==3.6.0->-r requirements-tests.txt (line 13))
  Using cached protobuf-5.28.3-cp38-abi3-macosx_10_9_universal2.whl.metadata (592 bytes)
Collecting types-protobuf>=4.24 (from mypy-protobuf==3.6.0->-r requirements-tests.txt (line 13))
  Downloading types_protobuf-5.28.3.20241030-py3-none-any.whl.metadata (2.3 kB)
Collecting cfgv>=2.0.0 (from pre-commit->-r requirements-tests.txt (line 16))
  Downloading cfgv-3.4.0-py2.py3-none-any.whl.metadata (8.5 kB)
Collecting identify>=1.0.0 (from pre-commit->-r requirements-tests.txt (line 16))
  Downloading identify-2.6.2-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting pyyaml>=5.1 (from pre-commit->-r requirements-tests.txt (line 16))
  Downloading PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl.metadata (2.1 kB)
Collecting virtualenv>=20.10.0 (from pre-commit->-r requirements-tests.txt (line 16))
  Downloading virtualenv-20.27.1-py3-none-any.whl.metadata (4.5 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit->-r requirements-tests.txt (line 16))
  Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
Collecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit->-r requirements-tests.txt (line 16))
  Using cached filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit->-r requirements-tests.txt (line 16))
  Using cached platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
Collecting idna>=2.0 (from yarl<2.0,>=1.12.0->aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting propcache>=0.2.0 (from yarl<2.0,>=1.12.0->aiohttp==3.10.11->-r requirements-tests.txt (line 9))
  Downloading propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl.metadata (7.7 kB)
Downloading mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl (11.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.1/11.1 MB 6.7 MB/s eta 0:00:00
Using cached pyright-1.1.389-py3-none-any.whl (18 kB)
Downloading aiohttp-3.10.11-cp313-cp313-macosx_10_13_x86_64.whl (393 kB)
Downloading mypy_protobuf-3.6.0-py3-none-any.whl (16 kB)
Using cached packaging-24.1-py3-none-any.whl (53 kB)
Downloading ruff-0.7.1-py3-none-macosx_10_12_x86_64.whl (10.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 7.2 MB/s eta 0:00:00
Using cached tomli-2.0.2-py3-none-any.whl (13 kB)
Downloading tomlkit-0.13.2-py3-none-any.whl (37 kB)
Downloading uv-0.4.26-py3-none-macosx_10_12_x86_64.whl (13.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.2/13.2 MB 7.2 MB/s eta 0:00:00
Using cached pathspec-0.12.1-py3-none-any.whl (31 kB)
Downloading pre_commit-4.0.1-py2.py3-none-any.whl (218 kB)
Downloading termcolor-2.5.0-py3-none-any.whl (7.8 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached aiohappyeyeballs-2.4.3-py3-none-any.whl (14 kB)
Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Using cached attrs-24.2.0-py3-none-any.whl (63 kB)
Downloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Downloading frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl (52 kB)
Downloading identify-2.6.2-py2.py3-none-any.whl (98 kB)
Downloading multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl (29 kB)
Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Using cached nodeenv-1.9.1-py2.py3-none-any.whl (22 kB)
Using cached protobuf-5.28.3-cp38-abi3-macosx_10_9_universal2.whl (414 kB)
Downloading PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl (181 kB)
Downloading types_protobuf-5.28.3.20241030-py3-none-any.whl (68 kB)
Downloading virtualenv-20.27.1-py3-none-any.whl (3.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 11.0 MB/s eta 0:00:00
Downloading yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl (93 kB)
Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
Using cached filelock-3.16.1-py3-none-any.whl (16 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
Downloading propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl (45 kB)
Building wheels for collected packages: ts_utils
  Building wheel for ts_utils (pyproject.toml) ... done
  Created wheel for ts_utils: filename=ts_utils-0.0.0-py3-none-any.whl size=9231 sha256=14baada177e61eff8dcbd390bc50cdda6e6c075800ca5296a7fd3e12b563da77
  Stored in directory: /private/var/folders/nf/_b_ryz1s1zb2s69zxq2rrlh00000gn/T/pip-ephem-wheel-cache-8ufquuti/wheels/00/2d/32/d7e3a21f208c4a8070a33090d86b7d4485b97c106ecbd54e91
Successfully built ts_utils
Installing collected packages: ts_utils, distlib, uv, typing_extensions, types-protobuf, tomlkit, tomli, termcolor, ruff, pyyaml, protobuf, propcache, platformdirs, pathspec, packaging, nodeenv, mypy-extensions, multidict, idna, identify, frozenlist, filelock, cfgv, attrs, aiohappyeyeballs, yarl, virtualenv, pyright, mypy-protobuf, mypy, aiosignal, pre-commit, aiohttp
scripts/create_baseline_stubs.pySuccessfully installed aiohappyeyeballs-2.4.3 aiohttp-3.10.11 aiosignal-1.3.1 attrs-24.2.0 cfgv-3.4.0 distlib-0.3.9 filelock-3.16.1 frozenlist-1.5.0 identify-2.6.2 idna-3.10 multidict-6.1.0 mypy-1.13.0 mypy-extensions-1.0.0 mypy-protobuf-3.6.0 nodeenv-1.9.1 packaging-24.1 pathspec-0.12.1 platformdirs-4.3.6 pre-commit-4.0.1 propcache-0.2.0 protobuf-5.28.3 pyright-1.1.389 pyyaml-6.0.2 ruff-0.7.1 termcolor-2.5.0 tomli-2.0.2 tomlkit-0.13.2 ts_utils-0.0.0 types-protobuf-5.28.3.20241030 typing_extensions-4.12.2 uv-0.4.26 virtualenv-20.27.1 yarl-1.18.0
(.venv) drbob@seahorse typeshed % pip install python-socketio
Collecting python-socketio
  Using cached python_socketio-5.11.4-py3-none-any.whl.metadata (3.2 kB)
Collecting bidict>=0.21.0 (from python-socketio)
  Using cached bidict-0.23.1-py3-none-any.whl.metadata (8.7 kB)
Collecting python-engineio>=4.8.0 (from python-socketio)
  Using cached python_engineio-4.10.1-py3-none-any.whl.metadata (2.2 kB)
Collecting simple-websocket>=0.10.0 (from python-engineio>=4.8.0->python-socketio)
  Using cached simple_websocket-1.1.0-py3-none-any.whl.metadata (1.5 kB)
Collecting wsproto (from simple-websocket>=0.10.0->python-engineio>=4.8.0->python-socketio)
  Using cached wsproto-1.2.0-py3-none-any.whl.metadata (5.6 kB)
Collecting h11<1,>=0.9.0 (from wsproto->simple-websocket>=0.10.0->python-engineio>=4.8.0->python-socketio)
  Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
Using cached python_socketio-5.11.4-py3-none-any.whl (76 kB)
Using cached bidict-0.23.1-py3-none-any.whl (32 kB)
Using cached python_engineio-4.10.1-py3-none-any.whl (57 kB)
Using cached simple_websocket-1.1.0-py3-none-any.whl (13 kB)
Using cached wsproto-1.2.0-py3-none-any.whl (24 kB)
Using cached h11-0.14.0-py3-none-any.whl (58 kB)
Installing collected packages: h11, bidict, wsproto, simple-websocket, python-engineio, python-socketio
Successfully installed bidict-0.23.1 h11-0.14.0 python-engineio-4.10.1 python-socketio-5.11.4 simple-websocket-1.1.0 wsproto-1.2.0
(.venv) drbob@seahorse typeshed % scripts/create_baseline_stubs.py python-socketio
Using detected package "socketio" for project "python-socketio"
Suggestion: Try again with --package argument if that's not what you wanted
Running stubgen: stubgen -o stubs/python-socketio -p socketio
Processed 31 modules
Generated files under stubs/python-socketio/socketio/
Running stubdefaulter: stubdefaulter --packages stubs/python-socketio
Traceback (most recent call last):
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 250, in <module>
    main()
    ~~~~^^
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 232, in main
    run_stubdefaulter(stub_dir)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/Users/drbob/Development/typeshed/scripts/create_baseline_stubs.py", line 59, in run_stubdefaulter
    subprocess.run(["stubdefaulter", "--packages", stub_dir])
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
         ~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1036, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1966, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'stubdefaulter'

Resolved by manually installing stubdefaulter:

(.venv) drbob@seahorse typeshed % pip install stubdefaulter
Collecting stubdefaulter
  Downloading stubdefaulter-0.1.0-py3-none-any.whl.metadata (764 bytes)
Collecting libcst (from stubdefaulter)
  Downloading libcst-1.5.1-cp313-cp313-macosx_10_13_x86_64.whl.metadata (17 kB)
Requirement already satisfied: termcolor>=2 in ./.venv/lib/python3.13/site-packages (from stubdefaulter) (2.5.0)
Requirement already satisfied: tomli in ./.venv/lib/python3.13/site-packages (from stubdefaulter) (2.0.2)
Collecting typeshed-client>=2.2.0 (from stubdefaulter)
  Using cached typeshed_client-2.7.0-py3-none-any.whl.metadata (7.9 kB)
Collecting importlib-resources>=1.4.0 (from typeshed-client>=2.2.0->stubdefaulter)
  Using cached importlib_resources-6.4.5-py3-none-any.whl.metadata (4.0 kB)
Requirement already satisfied: typing-extensions>=4.5.0 in ./.venv/lib/python3.13/site-packages (from typeshed-client>=2.2.0->stubdefaulter) (4.12.2)
Requirement already satisfied: pyyaml>=5.2 in ./.venv/lib/python3.13/site-packages (from libcst->stubdefaulter) (6.0.2)
Downloading stubdefaulter-0.1.0-py3-none-any.whl (10 kB)
Using cached typeshed_client-2.7.0-py3-none-any.whl (624 kB)
Downloading libcst-1.5.1-cp313-cp313-macosx_10_13_x86_64.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 6.4 MB/s eta 0:00:00
Using cached importlib_resources-6.4.5-py3-none-any.whl (36 kB)
Installing collected packages: libcst, importlib-resources, typeshed-client, stubdefaulter
Successfully installed importlib-resources-6.4.5 libcst-1.5.1 stubdefaulter-0.1.0 typeshed-client-2.7.0
(.venv) drbob@seahorse typeshed % scripts/create_baseline_stubs.py python-socketio
Using detected package "socketio" for project "python-socketio"
Suggestion: Try again with --package argument if that's not what you wanted
Error: stubs/python-socketio/socketio already exists (delete it first)
(.venv) drbob@seahorse typeshed % rm -rf stubs/python-socketio/socketio
(.venv) drbob@seahorse typeshed % scripts/create_baseline_stubs.py python-socketio
Using detected package "socketio" for project "python-socketio"
Suggestion: Try again with --package argument if that's not what you wanted
Running stubgen: stubgen -o stubs/python-socketio -p socketio
Processed 31 modules
Generated files under stubs/python-socketio/socketio/
Running stubdefaulter: stubdefaulter --packages stubs/python-socketio
Processing socketio.base_server... added 0 defaults
Processing socketio.namespace... added 0 defaults
Processing socketio.manager... added 0 defaults
Processing socketio.packet... added 1 defaults
Processing socketio.async_simple_client... added 0 defaults
Processing socketio.msgpack_packet... Could not import socketio.msgpack_packet: ModuleNotFoundError: "No module named 'msgpack'"
added 0 defaults
Processing socketio.base_manager... added 0 defaults
Processing socketio.async_pubsub_manager... added 0 defaults
Processing socketio.kafka_manager... added 0 defaults
Processing socketio... added 0 defaults
Processing socketio.async_manager... added 0 defaults
Processing socketio.client... added 0 defaults
Processing socketio.exceptions... added 0 defaults
Processing socketio.admin... added 0 defaults
Processing socketio.middleware... added 0 defaults
Processing socketio.pubsub_manager... added 0 defaults
Processing socketio.redis_manager... added 0 defaults
Processing socketio.async_server... added 0 defaults
Processing socketio.async_namespace... added 0 defaults
Processing socketio.async_admin... added 0 defaults
Processing socketio.zmq_manager... added 0 defaults
Processing socketio.server... added 0 defaults
Processing socketio.async_client... added 0 defaults
Processing socketio.simple_client... added 0 defaults
Processing socketio.async_aiopika_manager... added 0 defaults
Processing socketio.async_redis_manager... added 0 defaults
Processing socketio.base_namespace... added 0 defaults
Processing socketio.base_client... added 0 defaults
Processing socketio.asgi... added 0 defaults
Processing socketio.kombu_manager... added 0 defaults
Processing socketio.tornado... added 0 defaults

--- Added 1 defaults; encountered 0 errors ---
Running Ruff: ruff check stubs/python-socketio --fix-only
Fixed 19 errors.
Running Black: black stubs/python-socketio
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Initializing environment for https://github.com/psf/black-pre-commit-mirror.
[INFO] Initializing environment for https://github.com/pycqa/flake8.
[INFO] Initializing environment for https://github.com/pycqa/flake8:flake8-noqa==1.4.0,flake8-pyi==24.9.0.
[INFO] Installing environment for https://github.com/psf/black-pre-commit-mirror.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
black....................................................................Passed
Writing stubs/python-socketio/METADATA.toml
Updating pyrightconfig.stricter.json

Done!

Suggested next steps:
 1. Manually review the generated stubs in stubs/python-socketio
 2. Optionally run tests and autofixes (see tests/README.md for details)
 3. Commit the changes on a new branch and create a typeshed PR (don't force-push!)

Perhaps stubdefaulter should be added to requirements-tests.txt, or the docs should mention it's requirements for creating baseline stubs?

AlexWaygood commented 4 days ago

Thanks for the report! Sorry for the bother here.

Perhaps stubdefaulter should be added to requirements-tests.txt, or the docs should mention it's requirements for creating baseline stubs?

It's actually already listed, but only on Python <3.13, because the last time we attempted to install it on Python 3.13 there weren't any py313 wheels available for libCST yet:

https://github.com/python/typeshed/blob/fadb539f12646b066f35f6c21e91f12c9fda191d/requirements-tests.txt#L19

Not sure if that's changed yet; possibly we can remove the environment marker now?

srittau commented 4 days ago

Not sure if that's changed yet; possibly we can remove the environment marker now?

And if not, we should prevent create_baseline_stubs.py from running with an appropriate error message. (E.g. "... not supported on Python 3.13.")

AlexWaygood commented 4 days ago

Indeed: we added the environment marker on October 6, in https://github.com/python/typeshed/commit/0aa51868264178b49a9881730c2843aea24f48dc, but libCST added wheels for Python 3.13 in v1.5.0 on October 10: https://github.com/Instagram/LibCST/releases/tag/v1.5.0.

So we can just remove the environment marker now.