| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The following are also removed: - `_Py_SetFileSystemEncoding` - `_Py_ClearFileSystemEncoding` - `_Py_HasFileSystemDefaultEncodeErrors`
How will people know these are deprecated, if it's not documented? We have 12 months until 3.15's feature freeze (and and 17 until 3.15's release), things may have changed in that time. We can also open issues/PRs with the above projects.
Which deprecated variables is Pillow using? I don't recall any deprecation warnings. |
Sorry, something went wrong.
The symbols are marked with __attribute__((deprecated)), so the compiler would have warned them (I guess?) Do you mean that we should keep the documentation entries? I thought we removed them in general |
Sorry, something went wrong.
Hmm, nothing at https://github.com/python-pillow/Pillow/actions/runs/14906674072/job/41870605210?pr=8948
Yes. This PR isn't removing any deprecations, it's only removing documentation about them. If we only remove the docs, we might end up keeping the deprecations in 3.15, making their status unclear. Let's remove the deprecations and their docs at the same time. |
Sorry, something went wrong.
Ah, I see what you mean. Ok let's remove them in one go. Or if someone else has a cleaner PR for the runtime changes, they can just merge this one into theirs and they don't need to update the docs themselves. |
Sorry, something went wrong.
Pillow uses Py_FileSystemDefaultEncoding: source. if (!PyArg_ParseTupleAndKeywords(
args,
kw,
"etf|nsy#n",
kwlist,
Py_FileSystemDefaultEncoding, # <==== HERE ====
&filename,
&size,
&index,
&encoding,
&font_bytes,
&font_bytes_size,
&layout_engine
)) {
return NULL;
}Oh, but this code path is only taken on Python 3.10 and older! So you can ignore Pillow which is up to date! |
Sorry, something went wrong.
|
Hooray! Although I don't see any deprecations in the 3.9 build logs, should there be? |
Sorry, something went wrong.
No, the deprecation was added later. |
Sorry, something went wrong.
|
OK, thanks. Unrelated to this issue, I wanted to see what the deprecation looks like. Just for testing, I edited the Pillow code so it only has a code path hitting the deprecation. A normal pip install -e . on Python 3.14.0b1 doesn't show any warnings, but it does with --verbose: src/_imagingft.c:145:13: warning: 'Py_FileSystemDefaultEncoding' is deprecated [-Wdeprecated-declarations]
145 | Py_FileSystemDefaultEncoding,
| ^
/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/fileobject.h:22:1: note: 'Py_FileSystemDefaultEncoding' has been explicitly marked deprecated here
22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
| ^
/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/pyport.h:280:54: note: expanded from macro 'Py_DEPRECATED'
280 | #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
| ^
Neither uv pip install -e . nor with --verbose showed the deprecation. It's unfortunate that neither show the warning in normal use, as their maintainers will be less likely to see them. Perhaps something to raise with pip and uv. |
Sorry, something went wrong.
I think it'd be a good idea yes. Should we raise it for both? or is uv bundling part of pip and it suffices to just change pip? |
Sorry, something went wrong.
…ted-globals-133644
|
@vstinner @hugovk Actually, there were two variables that were slated for removal and notified in 3.12 What's New I think but they never had a deprecated-removed directive and only the deprecation version is rendered. Those are Py_UTF8Mode and Py_InteractiveFlag. Should we push the removal version to 3.16 or just delay the removal of all variables? |
Sorry, something went wrong.
Both variables emit deprecation warnings using Py_DEPRECATED(): Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_UTF8Mode;
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_InteractiveFlag;I don't think that the doc is a big deal here, Py_DEPRECATED() is more important. |
Sorry, something went wrong.
|
Also, all global configuration variables are documented in "Pending removal in Python 3.15": https://docs.python.org/dev/whatsnew/3.14.html#id13 |
Sorry, something went wrong.
|
Ok, I'll update the docs first for 3.13 and 3.14. I always hate doing backports, so would it be fine for me to first update main and let the bot make the backports automatically? that way, even 3.15 is consistent. One way why I can think of why it's annoying to users is that they don't necessarily land on the What's New page if they make a Google search. |
Sorry, something went wrong.
Yes, raised in the PyPA/pip Discord and they asked to comment here: pypa/pyproject-hooks#157 (comment)
uv is all Rust, no Python. |
Sorry, something went wrong.
…ted-globals-133644
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
See issue gh-149163 "Add PEP 741 PyInitConfig API to the limited C API". It's not directly related, but it may help projects to move to the PyInitConfig API. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 90 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Ok, this one is really tricky and I really need more eyes to be sure about it, namely @vstinner's eyes.
There are two global configuration variables that were marked as deprecated but not explicitly slated for removal in the docs, namely Py_UTF8Mode and Py_InteractiveFlag. As such, I've left them untouched. They were however mentioned in the "pending removals" documents so I don't know if we can just remove them (note that users are more likely to land on the C API page rather than the what's new page when they are looking for docs).
I'll write a NEWS entry afterwards.
📚 Documentation preview 📚: https://cpython-previews--133654.org.readthedocs.build/