Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BLD: Define PyErr_SetFromWindowsErr on Cygwin.#23066

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

DWesl
Copy link
Contributor

@DWeslDWesl commentedMay 18, 2022
edited
Loading

PR Summary

DefinePyErr_SetFromWindowsErr on Cygwin. This function is defined on Windows, not Cygwin.

Closes#22997.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

This function is defined on Windows, not Cygwin.Should maybe request that upstream.
@anntzer
Copy link
Contributor

@DWesl just as curiosity, if you can build cpython from source yourself, can you check whether changing the ifdef athttps://github.com/python/cpython/blob/39a54ba63850e081a4a5551a773df5b4d5b1d3cd/Include/pyerrors.h#L188 andhttps://github.com/python/cpython/blob/a4460f2eb8b9db46a9bce3c450c8b038038a7c93/Python/errors.c#L867 to also define these functions on cygwin works?

Also, should the blocks protected byifdef _WIN32 in _c_internal_utils.c also likewise be also enabled on cygwin (with similar fixes for the uses of PyErr_SetFromWindowsErr)?

I didn't notice that PyErr_SetString returned void.This should return something normal.
@DWeslDWesl changed the titleBLD: Define an error function on Cygwin.BLD: Define PyErr_SetFromWindowsErr on Cygwin.May 18, 2022
@DWesl
Copy link
ContributorAuthor

It looks like enabling the Windows code in_c_internal_utils.c wouldn't hurt anything, and I might be able to rewrite the Linux code to work as well. It may be a bit before I can run and test that.

@anntzer
Copy link
Contributor

No hurries.

@tacaswelltacaswell added this to thev3.5.3 milestoneMay 18, 2022
@DWesl
Copy link
ContributorAuthor

It looks like it compiles, but it's a bit tricky to get useful test results with the system FreeType, rather than specifically FreeType 2.6.1

@jklymak
Copy link
Member

Is this still a work-in-progress? Moved to draft, but feel free to ask that it be moved back for active review...

@jklymakjklymak marked this pull request as draftJune 30, 2022 09:10
Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This successfully fixes build on Cygwin; not sure there is anything else that really needs to be done.

@QuLogicQuLogic marked this pull request as ready for reviewJuly 26, 2022 04:05
@QuLogicQuLogic mentioned this pull requestJul 26, 2022
6 tasks
@anntzeranntzer merged commit446de7b intomatplotlib:mainJul 26, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJul 26, 2022
QuLogic added a commit that referenced this pull requestJul 26, 2022
…066-on-v3.5.xBackport PR#23066 on branch v3.5.x (BLD: Define PyErr_SetFromWindowsErr on Cygwin.)
@DWeslDWesl deleted the cygwin-define-pyerr-setfromwindowserr branchFebruary 25, 2024 11:30
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@anntzeranntzeranntzer approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.5.3
Development

Successfully merging this pull request may close these issues.

[Bug]: Cygwin build fails due to use of Windows-only functions in _tkagg.cpp
5 participants
@DWesl@anntzer@jklymak@QuLogic@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp