Skip to content
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

bpo-46303: Move fileutils.h private functions to internal C API #30484

Merged
merged 2 commits into from Jan 11, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 8, 2022

Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.

Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.

Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.

https://bugs.python.org/issue46303

Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.

Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.

Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.
@vstinner vstinner merged commit ea1a545 into python:main Jan 11, 2022
11 checks passed
@vstinner vstinner deleted the fileutils branch Jan 11, 2022
hauntsaninja added a commit to python/typed_ast that referenced this issue Apr 30, 2022
The compilation error on master is:
```
    ast3/Parser/tokenizer.c:1991:10: error: implicit declaration of function '_Py_dup' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        fd = _Py_dup(fd);
             ^
    1 error generated.
```
Probably as a result of python/cpython#30484

Just declaring it seems to fix things.

Add a (slightly) hacky way of testing Python 3.11 in CI prior to manylinux / cibuildwheel support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants