Skip to content

Commit

Permalink
prep 6.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
viblo committed Nov 2, 2023
1 parent bd678f9 commit d38870b
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 27 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
Changelog
=========

Pymunk 6.6.0 (2023-11-02)
-------------------------

**Experimental Batch API**

This release adds a (experimental) batch API that can be used to efficiently
get body properties such as positions, and collision data for all bodies /
collisions in a space in one call. This way the overhead of calling the
underlying c library (Chipmunk2D) is minimized, enabling a massive speedup
in some cases.

Changes:

- New pymunk.batch module with batch API.
- Batch api benchmark
- Improved types
- Improve build/packaging


Pymunk 6.5.2 (2023-10-22)
-------------------------

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors:
given-names: "Victor"
title: "Pymunk"
abstract: "A easy-to-use pythonic rigid body 2d physics library"
version: 6.5.2
date-released: 2023-10-22
version: 6.6.0
date-released: 2023-11-02
url: "https://pymunk.org"
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the Pymunk webpage for some examples.

2007 - 2023, Victor Blomqvist - [email protected], MIT License

This release is based on the latest Pymunk release (6.5.2),
This release is based on the latest Pymunk release (6.6.0),
using Chipmunk 7 rev 5dd7d774053145fa37f352d7a07d2f75a9bd8039.


Expand Down
4 changes: 2 additions & 2 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ v6.x
- Catch error when NaN in debugdraw, suggest doublecheck mass=0. https://github.com/viblo/pymunk/issues/226
- Make benchmark between pymunk and pybullet. 2d bullet inspiration: https://github.com/bulletphysics/bullet3/blob/2.83/examples/Planar2D/Planar2D.cpp
- Remove support for Python 3.7 (check https://pypistats.org/packages/pymunk first)
- Make batched api part of "public" pymunk api, usable without using cffi methods directly.
- Expand batched api. In https://github.com/viblo/pymunk/issues/235 he would like to have batched contact info as well.
- After a couple of versions / time passed, re-evaluate if batch api should be separate or merged in to space.
- Think about the copyright notice in some files. Keep / put everywere / remove?

v7+ (all potentially breaking changes)
---
Expand Down
2 changes: 1 addition & 1 deletion docs/src/ext/autoexample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2007-2022 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 1 addition & 4 deletions pymunk/_pyglet15_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2016 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -123,7 +123,6 @@ def draw_circle(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

bg = pyglet.graphics.OrderedGroup(0)
fg = pyglet.graphics.OrderedGroup(1)

Expand Down Expand Up @@ -155,7 +154,6 @@ def draw_fat_segment(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

c = fill_color.as_int()
pv1 = a
pv2 = b
Expand Down Expand Up @@ -183,7 +181,6 @@ def draw_polygon(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

c = fill_color.as_int()
s = pyglet.shapes.Polygon(*verts, color=c[:3], batch=self.batch)
self.draw_shapes.append(s)
Expand Down
4 changes: 2 additions & 2 deletions pymunk/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2020 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -32,7 +32,7 @@
cp = _chipmunk_cffi.lib
ffi = _chipmunk_cffi.ffi

version = "6.5.2"
version = "6.6.2"

chipmunk_version = "%s-%s" % (
ffi.string(cp.cpVersionString).decode("utf-8"),
Expand Down
2 changes: 1 addition & 1 deletion pymunk/constraints.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2017 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion pymunk/pygame_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2016 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 1 addition & 4 deletions pymunk/pyglet_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2016 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -114,7 +114,6 @@ def draw_circle(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

bg = pyglet.graphics.Group(0)
fg = pyglet.graphics.Group(1)

Expand Down Expand Up @@ -143,7 +142,6 @@ def draw_fat_segment(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

c = fill_color.as_int()
pv1 = a
pv2 = b
Expand Down Expand Up @@ -173,7 +171,6 @@ def draw_polygon(
outline_color: SpaceDebugColor,
fill_color: SpaceDebugColor,
) -> None:

vs = [(v.x, v.y) for v in verts]

c = fill_color.as_int()
Expand Down
3 changes: 1 addition & 2 deletions pymunk/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2016 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -161,7 +161,6 @@ def convex_hull(points):
hull = [p0, points[1]]

for p in points[2:]:

pt1 = hull[-1]
pt2 = hull[-2]
l = is_left(pt2, pt1, p)
Expand Down
8 changes: 4 additions & 4 deletions pymunk/vec2d.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2020 Victor Blomqvist
# Copyright (c) 2007-2023 Victor Blomqvist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -191,7 +191,7 @@ def get_length_sqrd(self) -> float:
:return: The squared length
"""
return self.x ** 2 + self.y ** 2
return self.x**2 + self.y**2

@property
def length(self) -> float:
Expand All @@ -204,7 +204,7 @@ def length(self) -> float:
:return: The length
"""
return math.sqrt(self.x ** 2 + self.y ** 2)
return math.sqrt(self.x**2 + self.y**2)

def scale_to_length(self, length: float) -> "Vec2d":
"""Return a copy of this vector scaled to the given length.
Expand Down Expand Up @@ -394,7 +394,7 @@ def ones() -> "Vec2d":

# Extra functions, mainly for chipmunk
def cpvrotate(self, other: Tuple[float, float]) -> "Vec2d":
"""Uses complex multiplication to rotate this vector by the other. """
"""Uses complex multiplication to rotate this vector by the other."""
assert len(other) == 2
return Vec2d(
self.x * other[0] - self.y * other[1], self.x * other[1] + self.y * other[0]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
url="http://www.pymunk.org",
author="Victor Blomqvist",
author_email="[email protected]",
version="6.5.2", # remember to change me for new versions!
version="6.6.0", # remember to change me for new versions!
description="Pymunk is a easy-to-use pythonic 2d physics library",
long_description=long_description,
packages=packages,
Expand Down
3 changes: 1 addition & 2 deletions tools/create_release_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ def main():
"""
Remember (before running this script!):
- change version number in README.rst, setup.py, CITATION.cff and _version.py
- write entry in CHANGELOG.rst
- write changelog entry in CHANGELOG.rst
- test in at least CPython 3.x and Pypy3
- validate test results of Github Actions
- write changelog entry and put in changelog.rst
- make sure all images are optimized (for example with tinypng.com)
- generate docs before running sdist
- Make sure cffi extensions included in wheel and zip!!!!
Expand Down

0 comments on commit d38870b

Please sign in to comment.