Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented May 29, 2023

For #6941.

Python 3.12 reports a deprecation - https://github.com/python-pillow/Pillow/actions/runs/5105776867/jobs/9177570491#step:7:234

warning: 'Py_FileSystemDefaultEncoding' is deprecated

https://docs.python.org/3.12/whatsnew/3.12.html#id4 instructs us to replace it with PyConfig.filesystem_encoding.

Using https://docs.python.org/3.12/c-api/init_config.html#example as a basis, I made that change.

However, I found this failed on PyPy, with

error: use of undeclared identifier 'PyConfig'

I asked in https://foss.heptapod.net/pypy/pypy/-/issues/3946, and PyPy has chosen not to implement PyConfig yet. So I've switched to the new code only for Python 3.12 and later, and we can see what happens once PyPy does support Python 3.12.

@hugovk hugovk merged commit 3e3378f into python-pillow:main May 29, 2023
@radarhere radarhere deleted the deprecated branch May 29, 2023 21:24
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.

3 participants