Skip to content

Commit fc0b495

Browse files
authored
Merge branch 'pygame-community:main' into clean-surface-docs-2
2 parents 195db40 + 75d893c commit fc0b495

File tree

151 files changed

+6651
-3158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+6651
-3158
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ If possible, please include the output of `pygame.print_debug_info()` from your
1515
like this:
1616

1717
```
18-
pygame-ce 6.6.6 (SDL 2.30.3, Python 3.11.1)
19-
Platform: Windows-10-10.0.22631-SP0
20-
System: Windows
21-
System Version: 10.0.22631
22-
Processor: AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
23-
Architecture: Bits: 64bit Linkage: WindowsPE
24-
25-
Python: CPython 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
26-
pygame version: 2.5.0.dev3
27-
SDL versions: Linked: 2.30.3 Compiled: 2.30.3
28-
SDL Mixer versions: Linked: 2.8.0 Compiled: 2.8.0
29-
SDL Font versions: Linked: 2.22.0 Compiled: 2.22.0
30-
SDL Image versions: Linked: 2.8.2 Compiled: 2.8.2
31-
Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
32-
33-
Display Driver: windows
34-
Mixer Driver: wasapi
18+
Platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41
19+
System: Linux
20+
System Version: #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05)
21+
Processor: SSE2: Yes AVX2: Yes NEON: No
22+
Architecture: Bits: 64bit Linkage: ELF
23+
24+
Python: CPython 3.13.7 (main, Sep 24 2025, 05:12:25) [GCC 14.2.0]
25+
GIL Enabled: True
26+
pygame version: 2.5.6
27+
SDL versions: Linked: 2.32.10 Compiled: 2.32.10
28+
SDL Mixer versions: Linked: 2.8.1 Compiled: 2.8.1
29+
SDL Font versions: Linked: 2.24.0 Compiled: 2.24.0
30+
SDL Image versions: Linked: 2.8.8 Compiled: 2.8.8
31+
Freetype versions: Linked: 2.13.3 Compiled: 2.13.3
32+
33+
Display Driver: Display Not Initialized
34+
Mixer Driver: Mixer Not Initialized
3535
```
3636
If you can't get the debug output, any of the environment details included in it that you do know would be useful
3737
in diagnosing the issue & helping you.
@@ -54,7 +54,7 @@ If applicable, copy and paste screenshots to help explain your problem.
5454
**Steps to reproduce:**
5555

5656
Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application.
57-
if the bug is caused by a specific file (image, font, sound, level, please upload it as an attachment
57+
If the bug is caused by a specific file (image, font, sound, level ...etc) please upload it as an attachment.
5858

5959
1.
6060
2.
@@ -72,5 +72,5 @@ print("Hello, world")
7272
**Stack trace/error output/other error logs**
7373

7474
```
75-
paste other relevant logs or stack traces here, if applicable
75+
Paste other relevant logs or stack traces here, if applicable
7676
```

.github/workflows/build-debian-multiarch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' }
6666

6767
steps:
68-
- uses: actions/checkout@v5.0.0
68+
- uses: actions/checkout@v6.0.2
6969

7070
- name: Build sources and run tests
7171
uses: uraimo/run-on-arch-action@v3.0.1
@@ -108,7 +108,7 @@ jobs:
108108
109109
# Upload the generated files under github actions assets section
110110
- name: Upload dist
111-
uses: actions/upload-artifact@v4
111+
uses: actions/upload-artifact@v6
112112
with:
113113
name: pygame-multiarch-${{ matrix.arch }}-dist
114114
path: ~/artifacts/*.whl
@@ -121,7 +121,7 @@ jobs:
121121
runs-on: ubuntu-22.04
122122
steps:
123123
- name: Download all multiarch artifacts
124-
uses: actions/download-artifact@v5
124+
uses: actions/download-artifact@v7
125125
with:
126126
name: pygame-multiarch-armv7-dist
127127
path: ~/artifacts

.github/workflows/build-emsdk.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,45 @@ concurrency:
3232
cancel-in-progress: true
3333

3434
jobs:
35-
build:
35+
build-pygbag:
3636
runs-on: ubuntu-22.04
3737
env:
3838
# pin SDK version to the latest, update manually
39-
SDK_VERSION: 3.1.32.0
40-
SDK_ARCHIVE: python3.11-wasm-sdk-Ubuntu-22.04.tar.lz4
39+
SDK_VERSION: 3.1.61.12bi
40+
SDK_ARCHIVE: python3.13-wasm-sdk-Ubuntu-22.04.tar.lz4
4141
SDKROOT: /opt/python-wasm-sdk
42+
PYBUILD: 3.13
4243

4344
steps:
44-
- uses: actions/checkout@v5.0.0
45-
46-
- name: Regen with latest cython (using system python3)
47-
run: |
48-
pip3 install cython==3.0.10
49-
python3 setup.py cython_only
45+
- uses: actions/checkout@v6.0.2
5046

5147
- name: Install python-wasm-sdk
5248
run: |
5349
sudo apt-get install lz4
54-
echo https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/$SDK_ARCHIVE
5550
curl -sL --retry 5 https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/$SDK_ARCHIVE | tar xvP --use-compress-program=lz4
56-
# do not let SDL1 interfere
57-
rm -rf /opt/python-wasm-sdk/emsdk/upstream/emscripten/cache/sysroot/include/SDL
5851
working-directory: /opt
5952

6053
- name: Build WASM with emsdk
61-
run: |
62-
${SDKROOT}/python3-wasm setup.py build -j$(nproc)
63-
64-
- name: Generate libpygame.a static binaries archive
65-
run: |
66-
mkdir -p dist
67-
SYS_PYTHON=python3 /opt/python-wasm-sdk/emsdk/upstream/emscripten/emar rcs dist/libpygame.a $(find build/temp.wasm32-*/ | grep o$)
54+
run: ${SDKROOT}/python3-wasm dev.py build --wheel
6855

6956
# Upload the generated files under github actions assets section
7057
- name: Upload dist
71-
uses: actions/upload-artifact@v4
58+
uses: actions/upload-artifact@v6
7259
with:
7360
name: pygame-wasm-dist
7461
path: ./dist/*
62+
63+
build-pyodide:
64+
name: Pyodide build
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v6.0.2
68+
69+
- uses: pypa/cibuildwheel@v3.2.1
70+
env:
71+
CIBW_PLATFORM: pyodide
72+
73+
- uses: actions/upload-artifact@v6
74+
with:
75+
name: pyodide-wheels
76+
path: wheelhouse/*.whl

.github/workflows/build-macos.yml

Lines changed: 72 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
matrix:
2525
# make arm64 deps and x86_64 deps
2626
include:
27-
- { macarch: arm64, os: macos-14 }
28-
- { macarch: x86_64, os: macos-13 }
27+
- { macarch: arm64, os: macos-15 }
28+
- { macarch: x86_64, os: macos-15 }
2929

3030
steps:
31-
- uses: actions/checkout@v5.0.0
31+
- uses: actions/checkout@v6.0.2
3232

3333
- name: Test for Mac Deps cache hit
3434
id: macdep-cache
35-
uses: actions/cache@v4.3.0
35+
uses: actions/cache@v5.0.3
3636
with:
3737
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
3838
# The hash of all files in buildconfig manylinux-build and macdependencies is
@@ -51,7 +51,7 @@ jobs:
5151
5252
# Uncomment when you want to manually verify the deps by downloading them
5353
# - name: Upload Mac deps
54-
# uses: actions/upload-artifact@v4
54+
# uses: actions/upload-artifact@v6
5555
# with:
5656
# name: pygame-mac-deps-${{ matrix.macarch }}
5757
# path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
@@ -64,21 +64,13 @@ jobs:
6464
fail-fast: false # if a particular matrix build fails, don't skip the rest
6565
matrix:
6666
include:
67-
- { macarch: arm64, os: macos-14 }
68-
- { macarch: x86_64, os: macos-13 }
67+
- { macarch: arm64, os: macos-15 }
68+
- { macarch: x86_64, os: macos-15 }
6969

7070
env:
7171
MAC_ARCH: ${{ matrix.macarch }}
7272

73-
# Explicitly tell CIBW what the wheel arch deployment target should be
74-
# There seems to be no better way to set this than this env
75-
# We need this because our minimum is 10.11, different from default
76-
# of 10.9 on x86s
77-
# Related issue: https://github.com/pypa/cibuildwheel/issues/952
78-
_PYTHON_HOST_PLATFORM: ${{ matrix.macarch == 'x86_64' && 'macosx-10.11-x86_64' || 'macosx-11.0-arm64'}}
79-
80-
# Similarly, we need to tell CIBW that the wheel's linking steps
81-
# should be for 10.11 on x86
73+
# We need to tell CIBW that the wheel's linking steps should be for 10.11 on x86
8274
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macarch == 'x86_64' && '10.11' || '11.0' }}
8375

8476
CIBW_ARCHS: ${{ matrix.macarch }}
@@ -96,32 +88,88 @@ jobs:
9688
CIBW_BEFORE_TEST: rm -rf ${{ github.workspace }}/pygame_mac_deps
9789

9890
steps:
99-
- uses: actions/checkout@v5.0.0
91+
- uses: actions/checkout@v6.0.2
10092

10193
- name: pip cache
102-
uses: actions/cache@v4.3.0
94+
uses: actions/cache@v5.0.3
10395
with:
10496
path: ~/Library/Caches/pip # This cache path is only right on mac
10597
key: pip-cache-${{ matrix.macarch }}-${{ matrix.os }}
10698

10799
- name: Fetch Mac deps
108100
id: macdep-cache
109-
uses: actions/cache@v4.3.0
101+
uses: actions/cache@v5.0.3
110102
with:
111103
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
112104
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
113105
fail-on-cache-miss: true
114106

115107
- name: Install uv for speed
116-
uses: astral-sh/setup-uv@v6
108+
uses: astral-sh/setup-uv@v7
117109
with:
118-
version: "0.8.3"
110+
version: "0.9.2"
119111

120112
- name: Build and test wheels
121-
uses: pypa/cibuildwheel@v3.2.0
113+
uses: pypa/cibuildwheel@v3.2.1
114+
115+
- uses: actions/upload-artifact@v6
116+
with:
117+
name: macos-partial-${{ matrix.macarch }}
118+
path: ./wheelhouse/*.whl
119+
compression-level: 0 # wheels are already zip files, no need for more compression
120+
121+
universal2:
122+
needs: build
123+
runs-on: macos-15
124+
steps:
125+
- name: Download artifacts
126+
uses: actions/download-artifact@v7
127+
with:
128+
merge-multiple: true
129+
130+
# Here we iterate over all our arm wheels, and get the corresponding intel wheel
131+
# (matching version) and use delocate-merge to generate the final universal2
132+
# wheel.
133+
- name: Generate universal2 wheels
134+
run: |
135+
set -euo pipefail
136+
shopt -s nullglob
137+
138+
pipx install delocate==0.13.0
139+
140+
OUT_DIR="wheelhouse"
141+
mkdir -p "$OUT_DIR"
142+
for arm in *arm64.whl; do
143+
x86="$(ls "$(echo "$arm" | cut -d- -f1-4)"-macosx_*_x86_64.whl 2>/dev/null | head -n1 || true)"
144+
if [[ ! -f "$x86" ]]; then
145+
echo "Copying arm wheel as is (missing x86 component): $arm"
146+
mv "$arm" "$OUT_DIR"
147+
continue
148+
fi
149+
echo "Merging:"
150+
echo " ARM: $arm"
151+
echo " X86: $x86"
152+
delocate-merge "$arm" "$x86" -w "$OUT_DIR"
153+
rm "$x86"
154+
done
155+
for x86 in *x86_64.whl; do
156+
echo "Copying x86_64 wheel as is (missing arm component): $x86"
157+
mv "$x86" "$OUT_DIR"
158+
done
159+
160+
- name: Sanity check - install and test a single universal2 wheel
161+
env:
162+
# Pip now forces us to either make a venv or set this flag, so we will do
163+
# this
164+
PIP_BREAK_SYSTEM_PACKAGES: 1
165+
SDL_VIDEODRIVER: "dummy"
166+
SDL_AUDIODRIVER: "disk"
167+
run: |
168+
python3 -m pip install --no-index --find-links wheelhouse pygame-ce
169+
python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
122170
123-
- uses: actions/upload-artifact@v4
171+
- uses: actions/upload-artifact@v6
124172
with:
125-
name: pygame-wheels-macos-${{ matrix.macarch }}
173+
name: pygame-wheels-macos
126174
path: ./wheelhouse/*.whl
127175
compression-level: 0 # wheels are already zip files, no need for more compression

.github/workflows/build-manylinux.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
CIBW_ARCHS: ${{ matrix.arch }}
3434

3535
steps:
36-
- uses: actions/checkout@v5.0.0
36+
- uses: actions/checkout@v6.0.2
3737

3838
- name: Log in to the Container registry
39-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
39+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
4040
with:
4141
registry: ghcr.io
4242
username: ${{ github.actor }}
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Extract metadata (tags, labels) for Docker
5151
id: meta
52-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
52+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
5353
with:
5454
images: ghcr.io/${{ github.repository }}_${{ matrix.arch }}
5555
tags: type=raw,value=${{ hashFiles('buildconfig/manylinux-build/**') }}
@@ -74,11 +74,11 @@ jobs:
7474
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
7575
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
7676

77-
uses: pypa/cibuildwheel@v3.2.0
77+
uses: pypa/cibuildwheel@v3.2.1
7878

7979
# We upload the generated files under github actions assets
8080
- name: Upload dist
81-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@v6
8282
with:
8383
name: pygame-wheels-manylinux-${{ matrix.arch }}
8484
path: ./wheelhouse/*.whl

.github/workflows/build-on-msys2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
# - { sys: clangarm64, env: clang-aarch64 }
4848

4949
steps:
50-
- uses: actions/checkout@v5.0.0
50+
- uses: actions/checkout@v6.0.2
5151
- uses: msys2/setup-msys2@v2
5252
with:
5353
msystem: ${{ matrix.sys }}

.github/workflows/build-sdl3.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ jobs:
5252
PG_DEPS_FROM_SYSTEM: 1
5353

5454
steps:
55-
- uses: actions/checkout@v5.0.0
55+
- uses: actions/checkout@v6.0.2
56+
- uses: actions/setup-python@v6
57+
with:
58+
python-version: '3.14'
5659

5760
- name: Install pygame deps (linux)
5861
if: matrix.os == 'ubuntu-24.04'
@@ -64,15 +67,17 @@ jobs:
6467
if: matrix.os == 'macos-14'
6568
run: brew install freetype portmidi
6669

67-
# taken from dependencies of the 'libsdl2-dev' package
68-
- name: Install SDL deps (linux)
70+
# taken from https://wiki.libsdl.org/SDL3/README-linux#build-dependencies
71+
- name: Install SDL3 deps (linux)
6972
if: matrix.os == 'ubuntu-24.04'
7073
run: >
71-
sudo apt-get install libasound2-dev libdbus-1-dev libdecor-0-dev libdrm-dev
72-
libegl-dev libgbm-dev libgl-dev libgles-dev libibus-1.0-dev libpulse-dev
73-
libsamplerate0-dev libsndio-dev libudev-dev libwayland-dev libx11-dev
74-
libxcursor-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev
75-
libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev
74+
sudo apt-get install build-essential git make
75+
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev
76+
libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev
77+
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev
78+
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev
79+
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev
80+
libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev
7681
7782
# taken from https://wiki.libsdl.org/SDL3/Installation
7883
- name: Install SDL3

0 commit comments

Comments
 (0)