Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix build on PyPy #27359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Fix build on PyPy #27359

merged 1 commit into from
Nov 23, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Nov 21, 2023

PR summary

It appears that Py_FileSystemDefaultEncodeErrors is not part of the limited API, and PyPy does not have it. This broke wheel building CI only, as PyPy isn't otherwise built.

Since pybind11 does not have a wrapper for PyUnicode_EncodeFSDefault (the main reason I had switched to a encode call earlier), we need to call it ourselves manually.

PR checklist

It appears that `Py_FileSystemDefaultEncodeErrors` is not part of the
limited API, and PyPy does not have it.

Since pybind11 does not have a wrapper for `PyUnicode_EncodeFSDefault`
(the main reason I had switched to a `encode` call earlier), we need to
call it ourselves manually.
@QuLogic QuLogic added GUI: tk CI: Run cibuildwheel Run wheel building tests on a PR labels Nov 21, 2023
@QuLogic QuLogic added this to the v3.9.0 milestone Nov 21, 2023
@ksunden
Copy link
Member

ksunden commented Nov 21, 2023

Is this a problem only for the meson builds?

@QuLogic
Copy link
Member Author

QuLogic commented Nov 21, 2023

I don't think so; I forgot to mention it was caused by #26992 according to the CI logs.

@ksunden
Copy link
Member

ksunden commented Nov 21, 2023

Ahh, okay, I was wondering if it needed to be backported (and possibly prompt another release), but the line that is changing is only on main, so don't think so.

@jklymak
Copy link
Member

jklymak commented Nov 21, 2023

Should we be concerned that this has no test coverage?

@QuLogic
Copy link
Member Author

QuLogic commented Nov 21, 2023

That is definitely wrong; we probably lost coverage for compiled code in the move to Meson.

@QuLogic
Copy link
Member Author

QuLogic commented Nov 22, 2023

Looking at the coverage for the file directly, it's not really uncovered, but partially covered. This probably partially because we don't do coverage on non-Linux, but I'm investigating some outdated settings in the test config.

@oscargus oscargus merged commit 0a4efbe into matplotlib:main Nov 23, 2023
@QuLogic QuLogic deleted the fix-pypy branch November 23, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Run cibuildwheel Run wheel building tests on a PR GUI: tk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants