New py5 Release: 0.10.1a1

I'm pleased to announce the release of py5 version 0.10.1a1. It is a small release with two new small features and several bug fixes.

These past few months I've been swamped between preparing for a gallery show opening this Friday and managing family healthcare issues. Each of those things by themselves is a lot of work and together they are overwhelming. Nevertheless, I persevered and was able to get this release ready for you.

Numpy Version

The main reason why this py5 release is happening now and not later is because numpy will soon have a major release that is not completely backwards compatible. Version 2.0 of numpy will be released soon and library maintainers have been advised to pin dependencies to numpy<2.0 and then test with numpy 2.0 when it is available. This is to ensure that py5 and every library py5 depends on is ready for the new version and does not cause users any problems.

Once the new numpy version is released and I verify py5 works well with it, I will do another release of py5 that removes the numpy<2.0 pin.

New Contributors

For this release, py5 had two first-time contributors. Many thanks to keko24 (Andrej) for PR #406 - Implemented corresponding changes to convert_image and convert_shape, addressing Issue #405. Also, thanks to JulienBacquart for PR #416 correct constrain documentation, addressing some documentation errors.

New Features

Neither of these new features are that significant and most likely they won't be useful for most users. However, they have been useful for me as I've done the prototyping experiments for the gallery show.

The new predraw_update() user function is called before each call to draw(). The purpose of this function is to provide a small performance boost by moving non-drawing update code to a function that executes during a time when the Python interpreter would otherwise be idle. In some cases this can improve a Sketch's frame rate by 5-10%. For most use cases, this isn't worth the bother. And to be honest, when I started working on this idea I thought the performance boost would be larger. That's how these things go sometimes. If you want to read more about this feature, visit the new Update Function section of the new User Functions page.

Processing Mode users can now use the jclass_params keyword parameter to pass arguments to the constructors of their Java Classes. Read the Processing Mode documentation to learn more about this use of py5.

As previously mentioned, there is a new documentation page for User Functions. After writing this I wonder why it took me so long to create this page. It's a good resource for users who want to know more about how to use the various user functions that py5 provides, and in particular, the less commonly used ones like exiting() or window_moved().

Closed Issues

There are other bug fixes in this release not listed here. When I find small bugs with easy solutions I often fix them right away without opening an issue recording it.

Processing Library

Processing hasn't had a new release so py5 is still dependent on the same Processing fork I used for the last release. I'd like for my code changes to get merged but am not worried about it.

What's Ahead

After the gallery show opens on Friday, I will continue developing py5 into an even more capable tool for creative coding. High on my priority list is working on Thonny and making it into an easier tool for beginners to use. Also, unit tests and GitHub actions for the py5generator repository.

If you are near Detroit, Michigan (USA), please consider visiting Wasserman Projects to see the show! The two digital works in the show both use Processing and py5 in Processing Mode. I'm very proud of the work and am excited to share it with the world.

In May I'll be in Pittsburgh for PyCon US and am looking forward to meeting you! If you will be there, feel free to reach out to me so we can meet up. I will have py5 stickers with me and will be handing them out. In addition, Alexandre Villares will also be at PyCon and will be leading a py5 Tutorial on May 15th. He's an excellent educator and I'm sure you will learn a lot from what he has prepared for you.

And a reminder, Python 3.8's end-of-life is in October of 2024. This summer py5 will drop support for 3.8.

Finally, as I write this I feel the urge to indulge my creative impulses and explore some half-baked ideas I've been having to expand what py5 can do. I'm not going to make any promises about what will pan out, but in an effort to add something exciting to this release post, here's a little something I made that perhaps will intrigue you about what you might see later this year:

$ python
┃                                                ┃
┃                         @@@@@@                 ┃
┃                     @@@@@.@@@@@                ┃
┃                +@@@@:.....@@@@@@               ┃
┃            @@@@@..........@@@@:@@              ┃
┃         @@@-..............*@@@@.@@             ┃
┃        @@..................@@@@..@@            ┃
┃        @@..................@@@@...@@           ┃
┃       @@...................@@@@....@@          ┃
┃       @@...................@@@@....@@          ┃
┃      @@....................@@@@.....@@         ┃
┃      @@...................@@@@@@....@@         ┃
┃     @@...........-@@@@@@@@@@@@@@@...@@         ┃
┃     @@...@@@@@@@@@@@@@@@@@@..@@@@@@..@@        ┃
┃    @@@@@@@@@@@@@@@.............@@@@@@@@        ┃
┃     @@@@@........................@@@@@@        ┃
┃        @@@@@@......................@@@@@       ┃
┃             +@@@@@......@@@@@@@@@@@@@@         ┃
┃                   @@@@@@                       ┃
┃                                                ┃
┃                                                ┃
┃frame rate = 59.74 fps             made with py5┃

Stay tuned!