From dca51fb0de0efdd4abb5cc1e521f233c1c613d26 Mon Sep 17 00:00:00 2001 From: Paul V Craven Date: Thu, 8 Oct 2026 12:14:24 -0500 Subject: [PATCH] Fix small docs errors found while triaging issues - Python 3.9 -> 3.10 in the install, SBC and contributing guides, and a release checklist note listing everywhere the minimum appears (#1302). - ShapeElementList: link pyglet.shapes, "in a back" -> "in a batch" (#2608). - gui/1_layouts example: use the bundled Liberation Sans instead of a CSS-style list of fonts most systems don't have (#2743). - create_text_sprite: drop the stale warning that the sprite draws as a black box with another texture atlas; text sprites keep their image since #2923 (#1883). - performance tips: "due to since" typo. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 5 +++++ CONTRIBUTING.md | 2 +- RELEASE_CHECKLIST.md | 3 +++ arcade/examples/gui/1_layouts.py | 3 ++- arcade/shape_list.py | 5 +++-- arcade/text.py | 6 ++---- doc/get_started/install.rst | 4 ++-- doc/programming_guide/gles_raspi_and_sbc.rst | 2 +- doc/programming_guide/performance_tips.rst | 4 ++-- 9 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b131218ce..8a0fc438f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,11 @@ Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page. - Added `arcade.sweep_line(start, end, sprite_list)`, which returns a `SweepInfo` for the first sprite a line hits (its `fraction`, `distance`, and surface `normal`), or `None`. It's `sweep_sprite` for a point: for lasers, hitscan weapons, or seeing what's in the way. Added the `sprite_laser_mirrors` example, where a laser bounces off rotating mirrors using the normal. ### Misc Changes +- Docs fixes: + - The install guide, SBC guide and contributing guide said Arcade needs Python 3.9; it needs 3.10. The release checklist now lists everywhere the minimum version appears ([#1302](https://github.com/pythonarcade/arcade/issues/1302)). + - `ShapeElementList`'s docstring links to `pyglet.shapes`, and says "batch" where it said "back" ([#2608](https://github.com/pythonarcade/arcade/issues/2608)). + - The `gui/1_layouts` example uses the bundled Liberation Sans instead of fonts most systems don't have ([#2743](https://github.com/pythonarcade/arcade/issues/2743)). + - `create_text_sprite()` no longer warns that its sprite draws as a black box in a sprite list with a different texture atlas. That stopped being true in 4.0, when text sprites started keeping their image ([#1883](https://github.com/pythonarcade/arcade/issues/1883)). - Sped up `arcade.draw_text()`. It no longer flushes OpenGL after every call (an unchanged call went from 76 to 15 µs), and several lines drawn in the same style each keep their own cached label instead of re-laying out one label every call (5 static lines went from 1.24 ms to 0.08 ms per frame). Any number of lines can share a style. A line whose text changes reuses its own label from the previous frame, found by the clock's tick count, instead of making a new one. - Sped up `arcade.Text` updates. Setting a property to the value it already has no longer lays out the text again (for example `font_size`, `bold`, or `width` went from about 165 µs to under 1 µs), and a `with text:` block only lays out the text if something in it needs a new layout. An unchanged `arcade.TextPool` frame with 5 lines went from 760 µs to 6 µs. - Added a "Drawing Text" page to the programming guide: choosing between `draw_text`, `Text`, `TextPool`, and `create_text_sprite`, what's slow and fast to change, batches, fonts (names, font files, and the bundled Kenney and Liberation fonts), and styles. Updated the text section of the performance tips, and the `draw_text` warning and docstring, which overstated how slow it is. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f2d8dab1e..8829bdc021 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Check that you are using a supported version of Python. Inspect the `pyproject.t The rest of this guide assumes you've already done the following: -1. [Installed Python 3.9+ with pip](https://wiki.python.org/moin/BeginnersGuide/Download) +1. [Installed Python 3.10+ with pip](https://wiki.python.org/moin/BeginnersGuide/Download) 2. [Installed git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) 3. [Forked the repo on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) 4. [Cloned your fork locally](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) diff --git a/RELEASE_CHECKLIST.md b/RELEASE_CHECKLIST.md index 166dae3c5d..c241109043 100644 --- a/RELEASE_CHECKLIST.md +++ b/RELEASE_CHECKLIST.md @@ -1,6 +1,9 @@ # Release Checklist 1. Check for updated libraries, and if we need to pin a more recent version. + * If the minimum Python version changed, update it everywhere: `requires-python` in `pyproject.toml`, + the version check in `arcade/__init__.py`, `doc/get_started/install.rst`, + `doc/programming_guide/gles_raspi_and_sbc.rst` and `CONTRIBUTING.md`. 2. Run `ruff arcade` 3. Run `mypy arcade` 4. In docs folder, type `make clean` then `make html` and confirm no warnings/errors. diff --git a/arcade/examples/gui/1_layouts.py b/arcade/examples/gui/1_layouts.py index f7d4bc8e29..86b1631ed7 100644 --- a/arcade/examples/gui/1_layouts.py +++ b/arcade/examples/gui/1_layouts.py @@ -18,6 +18,7 @@ from arcade.gui import UIAnchorLayout, UIImage, UITextArea arcade.resources.load_kenney_fonts() +arcade.resources.load_liberation_fonts() DESCRIPTION = """How to place widgets on the screen? @@ -105,7 +106,7 @@ def __init__(self): text_area = ScrollableTextArea( text=DESCRIPTION, text_color=arcade.uicolor.WHITE_CLOUDS, - font_name=("Lato", "proxima-nova", "Helvetica Neue", "Arial", "sans-serif"), + font_name=("Liberation Sans", "Arial"), font_size=12, size_hint=(0.5, 0.8), ) diff --git a/arcade/shape_list.py b/arcade/shape_list.py index b6c784e509..045f8f44fe 100644 --- a/arcade/shape_list.py +++ b/arcade/shape_list.py @@ -829,9 +829,10 @@ def create_ellipse_filled_with_colors( class ShapeElementList(Generic[TShape]): """ A ShapeElementList is a list of shapes that can be drawn together - in a back for better performance. ShapeElementLists are suited for + in a batch for better performance. ShapeElementLists are suited for drawing a large number of shapes that are static. If you need to - move a lot of shapes it's better to use pyglet's shape system. + move a lot of shapes it's better to use pyglet's shapes + (:py:mod:`pyglet.shapes`). Adding new shapes is fast, but removing them is slow. diff --git a/arcade/text.py b/arcade/text.py index 9dc2ed0394..e450a7067e 100644 --- a/arcade/text.py +++ b/arcade/text.py @@ -1077,10 +1077,8 @@ def create_text_sprite( It then creates a sprite referencing the newly created texture, and positions it accordingly, and that is final result that is returned from the function. - If you are providing a custom texture atlas, something important to keep in mind is - that the resulting Sprite can only be added to SpriteLists which use that atlas. If - it is added to a SpriteList which uses a different atlas, you will likely just see - a black box drawn in its place. + The sprite can be added to SpriteLists that use any texture atlas, not just the one + it was drawn in. Args: text: Initial text to display. Can be an empty string diff --git a/doc/get_started/install.rst b/doc/get_started/install.rst index 34c8e7223d..876c673e72 100644 --- a/doc/get_started/install.rst +++ b/doc/get_started/install.rst @@ -19,7 +19,7 @@ Requirements ------------ Arcade requires a desktop, laptop, or compatible Single-Board Computer (SBC) with: -#. Python 3.9 or higher +#. Python 3.10 or higher #. Graphics drivers with support for either: * OpenGL 3.3+ * GLES 3.1+ with extensions on SBCs @@ -30,7 +30,7 @@ unsupported. Windows, Linux, and Intel Mac ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Your computer can likely run Arcade if it supports Python 3.9 or higher. +Your computer can likely run Arcade if it supports Python 3.10 or higher. In general, even older convertible Windows tablets will work as long as they: diff --git a/doc/programming_guide/gles_raspi_and_sbc.rst b/doc/programming_guide/gles_raspi_and_sbc.rst index 678fe6eb2c..5c8daf2cd0 100644 --- a/doc/programming_guide/gles_raspi_and_sbc.rst +++ b/doc/programming_guide/gles_raspi_and_sbc.rst @@ -114,7 +114,7 @@ requirements may work. Standard Python ^^^^^^^^^^^^^^^ -Arcade 3.0.0 requires Python 3.9 or higher. +Arcade requires Python 3.10 or higher. In practice, this means running Linux. In theory, it may be possible to run Arcade on an ARM-specific version of Windows, but nobody has tried this before. diff --git a/doc/programming_guide/performance_tips.rst b/doc/programming_guide/performance_tips.rst index c73cc07d7b..525df2a050 100644 --- a/doc/programming_guide/performance_tips.rst +++ b/doc/programming_guide/performance_tips.rst @@ -409,8 +409,8 @@ However, there are a few exceptions. These are described below, especially with streaming audio. .. [#] - This can be dangerous for loading graphics and sprite data due to - since OpenGL only allows one thread to touch the OpenGL context. + This can be dangerous for loading graphics and sprite data, because + OpenGL only allows one thread to touch the OpenGL context. .. _loading_performance_sound: