Skip to content

Commit a6a7c4c

Browse files
committed
minor adjustments to changelog and docs
1 parent eba1674 commit a6a7c4c

File tree

2 files changed

+51
-47
lines changed

2 files changed

+51
-47
lines changed

CHANGELOG.rst

+42-38
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
11
=========
22
Changelog
33
=========
4-
.. Pymunk 7.0.0 (2025-04-16?)
5-
6-
**Many improvements release**
7-
8-
This is a big cleanup release with several breaking changes. If you upgrade from an older version, make sure to pay attention, especially the Space.bodies, Space.shapes and shape.constraints updates can break silently!
9-
10-
Extra thanks for Github user aetle for a number of suggestions and feedback for this pymunk release
4+
Pymunk 7.0.0 (2025-04-10)
5+
-------------------------
116

12-
Changes:
7+
**Many improvements, with some breaking changes!**
138

14-
Breaking changes
9+
This is a big cleanup release with several breaking changes. If you upgrade from an older version, make sure to pay attention, especially the Space.bodies, Space.shapes and shape.constraints updates can break silently!
1510

16-
- Changed Space.shapes, Space.bodies and Space.constraints to return a KeysView of instead of a list of the items. Note that this means the returned collection is no longer a copy. To get the old behavior, do list(space.shapes) etc.
17-
- At least one of the two bodies attached to constraint/joint must be dynamic.
18-
- Vec2d now supports bool to test if zero. (bool(Vec2d(2,3) == True) Note this is a breaking change.
19-
- Added Vec2d.length_squared, and depreacted Vec2d.get_length_sqrd()
20-
- Added Vec2d.get_distance_squared(), and deprecated Vec2d.get_dist_sqrd()
21-
- A dynamic body must have non-zero mass when calling Space.step (either from Body.mass, or by setting mass or density on a Shape attached to the Body). Its not valid to set mass to 0 on a dynamic body attached to a space.
22-
- Deprecated matplotlib_util. If you think this is a useful module and you use it, please create an issue on the Pymunk issue track
23-
- Dropped support for Python 3.8
24-
- Changed body.constraints to return a KeysView of the Constraints attached to the body. Note that its still weak references to the Constraints.
25-
- Reversed the dependency between bodies and shapes. Now the Body owns the connection, and the Shape only keeps a weak ref to the Body. That means that if you remove a Body, then any shapes not referenced anywhere else will also be removed.
26-
- Changed body.shapes to return a KeysView instead of a set of the shapes.
27-
- Changed Shape.segment_query to return None in case the query did not hit the shape.
28-
- Changed ContactPointSet.points to be a tuple and not list to make it clear its length is fixed.
29-
- Added default do_nothing and always_collide callback functions to the CollisionHandler, so that its clear how to reset and align with other callbacks. If in old code you did handler.begin = None, you should now instead to handler.begin = CollisionHandler.always_collide etc.
11+
Extra thanks for Github user aetle for a number of suggestions and feedback for this Pymunk release!
3012

31-
New non-breaking features
32-
- Switched from using Chipmunk to the new Munk2D fork of Chipmunk (see https://github.com/viblo/Munk2D for details).
33-
- Added Arbiter.bodies shorthand to get the shapes' bodies in the Arbiter
34-
- New method ShapeFilter.rejects_collision() that checks if the filter would reject a collision with another filter.
35-
- New method Vec2d.polar_tuple that return the vector as polar coordinates
36-
- Build and publish wheels for Linux ARM and Pypy 3.11
37-
- Changed type of PointQueryInfo.shape, SegmentQueryInfo.shape and ShapeQueryInfo.shape to not be Optional, they will always have a shape.
3813

39-
Other improvements
40-
- Optimized Vec2d.angle and Vec2d.angle_degrees. Note that the optimized versions treat 0 length vectors with x and/or y equal to -0 slightly differently.
41-
- Fixed issue with accessing Body.space after space is deleted and GCed.
42-
- Improved documentation in many places (Vec2d, Poly, Shape and more)
43-
- Internal cleanup of code
14+
Changes:
4415

45-
Extra thanks for aetle for a number of suggestions for improvements in this pymunk release
16+
Breaking changes
17+
18+
- Changed Space.shapes, Space.bodies and Space.constraints to return a KeysView of instead of a list of the items. Note that this means the returned collection is no longer a copy. To get the old behavior, you can convert to list manually, like list(space.shapes).
19+
- At least one of the two bodies attached to constraint/joint must be dynamic.
20+
- Vec2d now supports bool to test if zero. (bool(Vec2d(2,3) == True) Note this is a breaking change.
21+
- Added Vec2d.length_squared, and depreacted Vec2d.get_length_sqrd()
22+
- Added Vec2d.get_distance_squared(), and deprecated Vec2d.get_dist_sqrd()
23+
- A dynamic body must have non-zero mass when calling Space.step (either from Body.mass, or by setting mass or density on a Shape attached to the Body). Its not valid to set mass to 0 on a dynamic body attached to a space.
24+
- Deprecated matplotlib_util. If you think this is a useful module and you use it, please create an issue on the Pymunk issue track
25+
- Dropped support for Python 3.8
26+
- Changed body.constraints to return a KeysView of the Constraints attached to the body. Note that its still weak references to the Constraints.
27+
- Reversed the dependency between bodies and shapes. Now the Body owns the connection, and the Shape only keeps a weak ref to the Body. That means that if you remove a Body, then any shapes not referenced anywhere else will also be removed.
28+
- Changed body.shapes to return a KeysView instead of a set of the shapes.
29+
- Changed Shape.segment_query to return None in case the query did not hit the shape.
30+
- Changed ContactPointSet.points to be a tuple and not list to make it clear its length is fixed.
31+
- Added default do_nothing and always_collide callback functions to the CollisionHandler, so that its clear how to reset and align with other callbacks. If in old code you did handler.begin = None, you should now instead to handler.begin = CollisionHandler.always_collide etc.
32+
33+
New non-breaking features
34+
- Switched from using Chipmunk to the new Munk2D fork of Chipmunk (see https://github.com/viblo/Munk2D for details).
35+
- Added Arbiter.bodies shorthand to get the shapes' bodies in the Arbiter
36+
- New method ShapeFilter.rejects_collision() that checks if the filter would reject a collision with another filter.
37+
- New method Vec2d.polar_tuple that return the vector as polar coordinates
38+
- Build and publish wheels for Linux ARM and Pypy 3.11
39+
- Changed type of PointQueryInfo.shape, SegmentQueryInfo.shape and ShapeQueryInfo.shape to not be Optional, they will always have a shape.
40+
41+
Other improvements
42+
- Optimized Vec2d.angle and Vec2d.angle_degrees. Note that the optimized versions treat 0 length vectors with x and/or y equal to -0 slightly differently.
43+
- Fixed issue with accessing Body.space after space is deleted and GCed.
44+
- Improved documentation in many places (Vec2d, Poly, Shape and more)
45+
- Internal cleanup of code
46+
47+
Extra thanks for aetle for a number of suggestions for improvements in this pymunk release
4648

4749

4850
Pymunk 6.11.1 (2025-02-09)
@@ -54,6 +56,7 @@ This is a patch update to Pymunk that removes debug logging. This should an
5456
issue with GC on Python 3.13.
5557

5658
Changes:
59+
5760
- Remove debug logging
5861

5962

@@ -68,8 +71,9 @@ does not work anymore. The release also adds back pre-built wheels for Pypy
6871
with a workaround until Pypy make a new release.
6972

7073
Changes:
71-
- Support Pyglet 2.1.x (this means Pyglet 2.0.x wont work)
72-
- Readded Pypy pre-built wheels
74+
75+
- Support Pyglet 2.1.x (this means Pyglet 2.0.x wont work)
76+
- Readded Pypy pre-built wheels
7377

7478

7579
Pymunk 6.10.0 (2024-12-22)

pymunk/batch.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""The batch module contain functions to efficiently get and set space data in
2-
a batch insteaf of one by one.
2+
a batch instead of one by one.
33
4-
.. note::
5-
This module is highly experimental and will likely change in future Pymunk
6-
verisons including major, minor and patch verisons!
4+
.. note::
5+
This module is highly experimental and will likely change in future Pymunk
6+
verisons including major, minor and patch verisons!
77
88
99
To get data out
@@ -21,7 +21,7 @@
2121
>>> s.add(b2, pymunk.Circle(b2, 4))
2222
2323
To get data out first create a Buffer holder object, which is used to reuse
24-
the underlying arrays between calls. Then call the batch method. Note that
24+
the underlying arrays between calls. Then call the batch method. Note that
2525
the fields on the body to extract need to be specified explicitly.
2626
2727
>>> data = pymunk.batch.Buffer()
@@ -31,9 +31,9 @@
3131
... data,
3232
... )
3333
34-
The data is available in the Buffer object as cffi buffers. One that
35-
contains any int data, and one that contains floating point data. You can
36-
either use it directly like here, but also pass it in to 3rd parties that
34+
The data is available in the Buffer object as cffi buffers. One that
35+
contains any int data, and one that contains floating point data. You can
36+
either use it directly like here, but also pass it in to 3rd parties that
3737
implements the buffer protocol like numpy arrays.
3838
3939
>>> list(memoryview(data.int_buf()).cast("P")) == [b1.id, b2.id]
@@ -42,7 +42,7 @@
4242
[1.0, 2.0, 3.0, 4.0]
4343
4444
Its also possible to get the arbiters with collision data. Note that we need
45-
to call step to run the simulation, and clear the data data buffers first so
45+
to call step to run the simulation, and clear the data data buffers first so
4646
they can be reused:
4747
4848
>>> s.step(1)

0 commit comments

Comments
 (0)