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

gh-108765: Python.h no longer includes <ctype.h>#108831

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
vstinner merged 1 commit intopython:mainfromvstinner:remove_ctype
Sep 3, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedSep 2, 2023
edited by github-actionsbot
Loading

Remove <ctype.h> in C files which don't use it; only sre.c and _decimal.c still use it.

Remove _PY_PORT_CTYPE_UTF8_ISSUE code from pyport.h:

  • Code added by commitb5047fd in 2004 for MacOSX and FreeBSD.
  • Test removed by commit52ddaef in 2007, since Python str type now uses locale independent functions like Py_ISALPHA() and Py_TOLOWER() and the Unicode database.

Modules/_sre/sre.c replaces _PY_PORT_CTYPE_UTF8_ISSUE with new functions:

  • sre_isalnum()
  • sre_tolower()
  • sre_toupper()

Remove unused includes:

  • _localemodule.c: remove <stdio.h>.
  • getargs.c: remove <float.h>.
  • dynload_win.c: remove <direct.h>, it no longer calls _getcwd() since commitfb1f68e (in 2001).

📚 Documentation preview 📚:https://cpython-previews--108831.org.readthedocs.build/

@vstinnervstinnerforce-pushed theremove_ctype branch 2 times, most recently fromc8078fa to3664dafCompareSeptember 3, 2023 07:32
Remove <ctype.h> in C files which don't use it; only sre.c and_decimal.c still use it.Remove _PY_PORT_CTYPE_UTF8_ISSUE code from pyport.h:* Code added by commitb5047fd  in 2004 for MacOSX and FreeBSD.* Test removed by commit52ddaef  in 2007, since Python str type now uses locale independent  functions like Py_ISALPHA() and Py_TOLOWER() and the Unicode  database.Modules/_sre/sre.c replaces _PY_PORT_CTYPE_UTF8_ISSUE with newfunctions:* sre_isalnum()* sre_tolower()* sre_toupper()Remove unused includes:* _localemodule.c: remove <stdio.h>.* getargs.c: remove <float.h>.* dynload_win.c: remove <direct.h>, it no longer calls _getcwd()  since commitfb1f68e (in 2001).
@vstinner
Copy link
MemberAuthor

I merged my PR.

If it causes too many trouble in 3rd party C extensions (require to update too many C extensions before Python 3.13 beta1), I can make this change conditional only in the limited C API version 3.13.

See also my PR removing<unistd.h>: PR#108783.

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Windows11 Non-Debug 3.x has failed when building commit03c4080.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/914/builds/2761) and take a look at the build logs.
  4. Check if the failure is related to this commit (03c4080) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/914/builds/2761

Failed tests:

  • test.test_concurrent_futures.test_shutdown
  • test.test_concurrent_futures.test_deadlock

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\support\os_helper.py", line480, intemp_diryield path  File"b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\support\os_helper.py", line533, intemp_cwdyield cwd_dir  File"b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\libregrtest\main.py", line802, inmainself._main(tests, kwargs)  File"b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\libregrtest\main.py", line861, in_main    sys.exit(0)SystemExit:0Traceback (most recent call last):  File"b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\support\__init__.py", line207, in_force_runreturn func(*args)^^^^^^^^^^^PermissionError:[WinError 32] The process cannot access the file because it is being used by another process: 'B:\\uildarea\\3.x.ware-win11.nondebug\\build\\build\\test_python_4856�\\test_python_worker_13508�'

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pgansslepganssleAwaiting requested review from pgansslepganssle is a code owner

@abalkinabalkinAwaiting requested review from abalkinabalkin is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@vstinner@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp