diff --git a/arcade/__init__.py b/arcade/__init__.py index a4c812d3ea..f4ffcebdbb 100644 --- a/arcade/__init__.py +++ b/arcade/__init__.py @@ -60,10 +60,11 @@ def configure_logging(level: int | None = None): import pyglet # Enable HiDPI support -if os.environ.get("ARCADE_TEST"): - pyglet.options.dpi_scaling = "real" -else: - pyglet.options.dpi_scaling = "stretch" +# Note: This seems to have changed to 'scale_with_dpi' in pyglet +# if os.environ.get("ARCADE_TEST"): +# pyglet.options['dpi_scaling'] = "real" +# else: +# pyglet.options.dpi_scaling = "stretch" # Env variable shortcut for headless mode headless: Final[bool] = bool(os.environ.get("ARCADE_HEADLESS")) diff --git a/arcade/physics_engines.py b/arcade/physics_engines.py index eeb65ac7ae..9b7aa5c4ff 100644 --- a/arcade/physics_engines.py +++ b/arcade/physics_engines.py @@ -349,7 +349,7 @@ def walls(self, walls: SpriteList | Iterable[SpriteList] | None = None) -> None: def walls(self) -> None: self._walls.clear() - def update(self) -> list[SpriteType]: + def update(self) -> list[BasicSprite]: """Move :py:attr:`player_sprite` and return any colliding sprites. Returns: diff --git a/arcade/sound.py b/arcade/sound.py index 443e551c36..3cf687e817 100644 --- a/arcade/sound.py +++ b/arcade/sound.py @@ -13,11 +13,11 @@ from arcade.resources import resolve if os.environ.get("ARCADE_SOUND_BACKENDS"): - pyglet.options.audio = tuple( # type: ignore + pyglet.options["audio"] = tuple( # type: ignore v.strip() for v in os.environ["ARCADE_SOUND_BACKENDS"].split(",") ) else: - pyglet.options.audio = ("openal", "xaudio2", "directsound", "pulse", "silent") # type: ignore + pyglet.options["audio"] = ("openal", "xaudio2", "directsound", "pulse", "silent") # type: ignore import pyglet.media as media diff --git a/arcade/text.py b/arcade/text.py index fe404839fd..e307bdba9c 100644 --- a/arcade/text.py +++ b/arcade/text.py @@ -307,7 +307,7 @@ def __init__( color=Color.from_iterable(color), width=width, align=align, # type: ignore - bold=bold, + weight=pyglet.text.Weight.BOLD if bold else pyglet.text.Weight.NORMAL, italic=italic, multiline=multiline, rotation=rotation, @@ -585,11 +585,11 @@ def bold(self) -> bool | str: * ``"light"`` """ - return self._label.bold + return self._label.weight == pyglet.text.Weight.BOLD @bold.setter def bold(self, bold: bool | str): - self._label.bold = bold + self._label.weight = pyglet.text.Weight.BOLD if bold else pyglet.text.Weight.NORMAL @property def italic(self) -> bool | str: diff --git a/pyproject.toml b/pyproject.toml index 515e1b6f68..98c223bba5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,9 +24,9 @@ dependencies = [ # at the cost of slow download and constant pip install -I -e .[dev] # "pyglet@git+https://github.com/pyglet/pyglet.git@development#egg=pyglet", # Expected future dev preview release on PyPI (not yet released) - "pyglet == 2.1rc1", - "pillow~=11.0.0", - "pymunk~=6.9.0", + "pyglet == 2.1.0", + "pillow~=11.1.0", + "pymunk~=6.10.0", "pytiled-parser~=2.2.7", ] dynamic = ["version"] diff --git a/tests/unit/test_example_docstrings.py b/tests/unit/test_example_docstrings.py index 09f9e8137f..9bda1cd8f2 100644 --- a/tests/unit/test_example_docstrings.py +++ b/tests/unit/test_example_docstrings.py @@ -51,7 +51,7 @@ def check_submodules(parent_module_absolute_name: str) -> None: It is important to understand that module names and file paths are different things: * A module name is what Python sees the module's name as (``"arcade.color"``) - * A file path is the location on disk (``C:\\Users\\Reader\\python_project\game.py``) + * A file path is the location on disk (``C:\\Users\\Reader\\python_project\\game.py``) Args: parent_module_absolute_name: The absolute import name of the module to check.