pythonarcade / arcade

Easy to use Python library for creating 2D arcade games.
http://arcade.academy
Other
1.71k stars 330 forks source link

Latest arcade 2.6.17 requires pyglet 2.0.dev23 #2358

Open cdeil opened 2 months ago

cdeil commented 2 months ago

This is the latest stable version of arcade: https://pypi.org/project/arcade/2.6.17/

The wheel on PyPI declares that it requires pyglet development version: 2.0.dev23

This causes https://pixi.sh/ to install by default a broken older arcade version 2.3 if I use pixi add --pypi arcade and import arcade.

Trying to install specifically the latest stable version:

$ pixi add --pypi 'arcade==2.6.17'               
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because there is no version of pyglet==2.0.dev23 and arcade==2.6.17 depends on pyglet==2.0.dev23, we can conclude that arcade==2.6.17 cannot be used.
      And because you require arcade==2.6.17, we can conclude that your requirements are unsatisfiable.

      hint: pyglet was requested with a pre-release marker (e.g., pyglet==2.0.dev23), but pre-releases weren't enabled (try: `--prerelease=allow`)

I see here that a stable version of pyglet is available: https://pypi.org/project/pyglet/2.0.17/

Could you please release a newer version of arcade that fixes this dependency to the stable one so that install "just works"?

pushfoo commented 2 months ago

TL;DR: Based on the pixi bug you filed, it seems pixi may have issues with Arcade's upcoming 3.0 release and its dev previews.

What you've proposed is worth considering. However, my understanding is:

Since it's worth verifying https://github.com/prefix-dev/pixi/issues/1357 further, can you try installing arcade==3.0.0.dev34 with pixi? Based on my reading of your bug, it might fail because:

  1. pixi lacks support for dev preview packages in any form
  2. Arcade's development branch currenly uses a dev preview of pyglet 2.1 https://github.com/pythonarcade/arcade/blob/e9dd36a4860e02d14aae7ad4ae9bc9797809c018/pyproject.toml#L26
cdeil commented 2 months ago

Hi, yes, pixi currently lacks support for dev preview releases from PyPI, that's an open feature request to them to add this support.

This request is independent though for you with Arcade to create a new release that uses stable and not dev versions though.

So you're aiming directly for a 3.0 release and the 2.x series is completely frozen I gather? Is it possible to give an ETA (weeks / months)?

pushfoo commented 2 months ago

Update: So far, there doesn't seem to be much opposition to a final 2.6.18

Recap of the Discord discussion:

  1. A final 2.6.X release could be useful ahead of 3.0
  2. It may be good to add a warning at the top of each page linking the /latest doc if possible
  3. We need to do a few tasks to make 2.6.18 possible

The tasks as I understand them:

cdeil commented 2 months ago

Wow, thanks. :-)

I am interested in helping. But realistically unfortunately I will only manage to spend an hour rarely. So please don't count on it and decide just what you prefer to do.

For now I changed to Python 3.11 and just using pip and then did the platformer tutorial and everything worked. :-)

So I think the full support for newer Python 3.12 and modern more strict package managers pixi / uv could also just come with Arcade 3.0 if you prefer to put your time into getting that done. For me as complete newbie to Arcade and game development just wanting to get started with two kids in the next weeks doing the platformer tutorial that is even nicer since I don't have old Arcade code and get the even nicer package. So if you go that way to focus on Arcade 3.0 I would read the docs and help test / contribute a bit there in the coming weeks.

Is it possible to change your dependency management to the usual style moving forward of only using stable releases of pyglet and just cutting stable releases there more often as needed to get fixes/improvements out?

Try to get rid of this linking to pyglet dev versions? https://github.com/pythonarcade/arcade/blob/895bf57c3e8cddb5e66edb501151c03fdf7a5cc8/pyproject.toml#L26

pushfoo commented 2 months ago

TL;DR: I updated the tasks above, ty please help test 3.0, I also want stable releases in the future

Note: some of this comment may re-iterate / expand on my earlier comment to act as easy reference.

2.6.X vs 3.0?

just wanting to get started with two kids in the next weeks doing the platformer tutorial

The 1st party book teaching Python has a lesson plan you may find helpful, but it hasn't been updated for 3.0 like the Platformer Tutorial.

The fact the book and other non-core materials need to be updated separately is a major reason for considering a 2.6.18 release, especially since I'm not sure on what the timeline for updating the book is. The book's author (and Arcade's creator) isn't currently teaching as far as I know.

So I think the full support for newer Python 3.12 and modern more strict package managers... could also just come with Arcade 3.0 if you prefer to put your time into getting that done.

Since we also may want to add warnings to the 2.6.X doc, I've updated the task list in my earlier comment with points einarf raised on Discord.

Help with 3.0

So if you go that way to focus on Arcade 3.0 I would read the docs and help test / contribute a bit there in the coming weeks.

I appreciate the offer! If you're still planning on using 3.0 (or 2.6.18 doesn't work out):

  1. What operating systems do you have?
  2. Are any of them HiDPI Windows systems? (https://github.com/pythonarcade/arcade/pull/2361)

Regardless of the answers to those questions, we'll need proofreading for the 3.0 Platformer Tutorial. It's a rewrite to account for changes such as the brand new camera system, and that means there'll be rough edges to smooth out.

Stuff like a porting guide and (maybe) a 2to3-like utility may arrive incrementally after 3.0. Input on those would also be appreciated.

"Stable" releases?

Is it possible to change your dependency management to the usual style moving forward of only using stable releases of pyglet

My current personal opinion is:

  1. Starting to do "Stable" releases has merits beyond just compatibility with pixi
  2. We can't totally eliminate the dev releases:
    • Arcade's sort of a testing ground for pyglet features
    • It may become more of one since our strongest graphics devs have expressed interest in deduping our GL stack in favor of pyglet's
  3. I don't know what a good schedule would be for stable releases

Since I don't control the PyPI package, my opinion isn't the one that matters.

pushfoo commented 1 month ago

Update on this:

  1. The failing bounds check unit test was failing in the 2.6.17 release tag
  2. For end users, it looks like unit tests + the pymunk joint builder work with:
    • Pillow 10.4.0 to get the latest sec patches (buffer overflows, etc)
    • Pymunk 6.8.1 for speed optimzations
      1. Things get ugly with doc build
      2. We may want to quick-patch in #2374 since that's ugly but easy to fix
pushfoo commented 1 month ago

Update: discovered a doc resource embed issue, started fixing it.

The ticket is #2387 (binding development breaks prior doc versions):