Skip to content

emu-app-config fails in 5.0.36 (not compatible with python 3.10) #74

Description

@a1291762

This has a similar root cause as #71, but apparently needs a separate issue so here it is.

pebble-tool 5.0.35 works in MacOS (26.5.1), which has python 3.10. But pebble-tool 5.0.36 does not. Specifically, when running emu-app-config, it fails like so.

[Thirteen:~/src/pebble/shd] [master] link$ pebble emu-app-config --emulator flint --vnc
Traceback (most recent call last):
  File "/Users/link/.local/bin/pebble", line 10, in <module>
    sys.exit(run_tool())
  File "/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.10/site-packages/pebble_tool/__init__.py", line 59, in run_tool
    args.func(args)
  File "/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.10/site-packages/pebble_tool/commands/base.py", line 47, in <lambda>
    parser.set_defaults(func=lambda x: cls()(x))
  File "/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.10/site-packages/pebble_tool/commands/emucontrol.py", line 125, in __call__
    browser.open_config_page(config_url, self.handle_config_close)
  File "/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.10/site-packages/pebble_tool/util/browser.py", line 36, in open_config_page
    with tempfile.NamedTemporaryFile(dir=os.path.expanduser("~"),
TypeError: NamedTemporaryFile() got an unexpected keyword argument 'delete_on_close'

This doc suggests that for python 3.10, there is no delete_on_close argument.
https://docs.python.org/3.10/library/tempfile.html#tempfile.NamedTemporaryFile

The Pebble SDK says that pebble-tool requires python 3.10, which is what MacOS ships with.
https://developer.repebble.com/sdk/

I do happen to have other python versions available, due to installing stuff via HomeBrew. So I can do this:

uv tool install pebble-tool@v5.0.36 --python 3.13

That avoids this particular error, but using python 3.13 with pebble tool (either 5.0.35 or 5.0.36) shows these warnings instead.

[Thirteen:~/src/pebble/shd] [master] link$ pebble emu-app-config --emulator flint --vnc
/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/__init__.py:103: SyntaxWarning: invalid escape sequence '\*'
  :param \*\*kwargs: Initial values for any properties on the object.
/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:192: SyntaxWarning: invalid escape sequence '\ '
  :param contents: A :class:`dict` mapping values of ``determinant`` to either :class:`Field`\ s or
/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:427: SyntaxWarning: invalid escape sequence '\ '
  Represents a list of :class:`.PebblePacket`\ s, each of which is prefixed with a byte indicating its length.
/Users/link/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:482: SyntaxWarning: invalid escape sequence '\ '
  Represents a list of either :class:`PebblePacket`\ s or :class:`Field`\ s with either a fixed number of entries,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions