docs: update readme to the new SDL versions of ubuntu jammy with python 3.10#3795
docs: update readme to the new SDL versions of ubuntu jammy with python 3.10#3795pxlman wants to merge 2 commits into
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRaised declared minimum SDL to >= 2.0.20, SDL_image to >= 2.0.5, and SDL_ttf to >= 2.0.18 in the README; updated WINDOWDISPLAYCHANGED event docs to require SDL backend >= 2.0.20. ChangesSDL Dependency Version Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reST/ref/event.rst`:
- Around line 192-194: The SDL version string is inconsistent between the docs:
event.rst documents the SDL backend as ">= 2.0.20" while README.rst uses ">=
2.20.0"; determine the correct SDL version (likely the SDL 2.0.x format, e.g.,
2.0.20 for Jammy compatibility) and make both places consistent by updating the
SDL backend version string wherever it appears (the occurrence near the
WINDOWDISPLAYCHANGED entry and the README.rst SDL minimum-version mention) so
they use the same, correct version format.
In `@README.rst`:
- Line 128: Update the SDL version requirement string in the README entry that
currently reads ">= 2.20.0" to the correct semantic version ">= 2.0.20"; locate
the table row for the "SDL" entry in README.rst (the line containing "SDL |
>= 2.20.0") and change the version token to match the rest of the project (tuple
(2, 0, 20) and event.rst), ensuring the formatted table aligns after the edit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b07a3b82-8327-40ea-b515-e0e74e7d77e3
📒 Files selected for processing (2)
README.rstdocs/reST/ref/event.rst
|
Ok, so I appreciate the quickness of getting this pull request open, but I'm going to have to lay out some blockers for it:
|
@oddbookworm thanks for fast replying, i realized this and pushed a new modification |
|
Here's an example of what I mean, from #if SDL_VERSION_ATLEAST(3, 0, 0)
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.x));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.y));
#elif SDL_VERSION_ATLEAST(2, 0, 18)
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.preciseX));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.preciseY));
#else /* ~SDL_VERSION_ATLEAST(2, 0, 18) */
/* fallback to regular x and y when SDL version used does not
* support precise fields */
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.x));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.y));
#endif /* ~SDL_VERSION_ATLEAST(2, 0, 18) */With the SDL version now being at least 2.0.20, that last block can be removed and the |
|
@oddbookworm #if SDL_VERSION_ATLEAST(3, 0, 0)
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.x));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.y));
#else /* SDL_VERSION_ATLEAST(2, 0, 20) */
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.preciseX));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.preciseY));
#endif |
|
The comment after the else is confusing. The convention is for the comment to remind what the if statement is saying, e.g. "else not THIS," but you're just using it to assert some global thing about the minimum SDL version. The comment could be removed or it could follow the convention. |
|
To piggyback off of what Starbuck5 said, I would expect either this #if SDL_VERSION_ATLEAST(3, 0, 0)
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.x));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.y));
#else
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.preciseX));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.preciseY));
#endifOr this #if SDL_VERSION_ATLEAST(3, 0, 0)
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.x));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.y));
#else /* ~SDL_VERSION_ATLEAST(3, 0, 0) */
_pg_insobj(dict, "precise_x",
PyFloat_FromDouble((double)event->wheel.preciseX));
_pg_insobj(dict, "precise_y",
PyFloat_FromDouble((double)event->wheel.preciseY));
#endif |
oddbookworm
left a comment
There was a problem hiding this comment.
LGTM! Thanks for addressing the comments left! 🎉
Closes #3794
Updates the documented minimum SDL dependency versions to align with Ubuntu Jammy (22.04), which is the oldest supported distro that ships with Python 3.10 — the new minimum since we dropped Python 3.9 / Debian Bullseye support.
Changes
README.rst: bump minimum SDL from 2.0.14 → 2.20.0, SDL_image from 2.0.4 → 2.0.5, SDL_ttf from 2.0.15 → 2.0.18 (SDL_mixer unchanged at 2.0.4)docs/reST/ref/event.rst: updateWINDOWICCPROFCHANGEDandWINDOWDISPLAYCHANGEDSDL backend version notes from 2.0.18 → 2.0.20, reflecting the actual minimum SDL version at which those events became available