Skip to content

Conversation

@JaskRendix
Copy link
Contributor

The function pygame.image.fromstring has been deprecated since Pygame version 2.3.0. As per the official documentation, pygame.image.frombytes should be used instead. This update ensures compatibility with newer versions of Pygame while maintaining the intended functionality.

@ppizarror
Copy link
Owner

ppizarror commented Jun 2, 2025

Great catch. Is that also compatible with old pygame versions such as 1.9.6 or 1.9.3? As we also support these
Maybe adding

version_major, version_minor, _ = pygame_version
if version_major > 2 or version_major == 2 and version_minor >= 3: your code, else, original?

@JaskRendix
Copy link
Contributor Author

added if / else against vernum

@ppizarror
Copy link
Owner

I didnt know that I could do that >= (2, 3, 0)
Thanks. Merging.

@ppizarror ppizarror merged commit 6211d30 into ppizarror:master Jun 2, 2025
9 checks passed
@JaskRendix JaskRendix deleted the patch-1 branch June 2, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants