[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington


miss-islington  added the comment:


New changeset ebc5a6b59ece48b490987bdaa2af842c29f5b2f8 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited 
API (GH-22621)
https://github.com/python/cpython/commit/ebc5a6b59ece48b490987bdaa2af842c29f5b2f8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington


miss-islington  added the comment:


New changeset ff6870f199511f09304e9d3ee7e7d8ed3902ffd1 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited 
API (GH-22621)
https://github.com/python/cpython/commit/ff6870f199511f09304e9d3ee7e7d8ed3902ffd1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +21611
pull_request: https://github.com/python/cpython/pull/22637

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21612
pull_request: https://github.com/python/cpython/pull/22638

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b by Serhiy Storchaka in 
branch 'master':
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited 
API (GH-22621)
https://github.com/python/cpython/commit/637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.7 defines it in fileobject.h as:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0306
PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
#endif

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0307
PyAPI_DATA(int) Py_UTF8Mode;
#endif


Python 3.8 defines them the same way, but in Include/cpython/fileobject.h:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0306
PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
#endif

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0307
PyAPI_DATA(int) Py_UTF8Mode;
#endif


I am likely the one who moved these definitions. It was a mistake to move them 
inside Include/cpython/, since "Py_LIMITED_API+0 >= 0x0307" became useless: 
cpython/fileobject.h is only included if Py_LIMITED_API is not defined.

In Include/cpython/, it seems like only 2 definitions are defined the wrong 
way, Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It solves the breaking of the C API. Py_FileSystemDefaultEncodeErrors and 
Py_UTF8Mode were not deprecated, they were just suddenly excluded from the 
limited API. And seems this change was not intentional, otherwise surrounding 
#ifdef/#endif (which currently do not have effect) would be not preserved.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread STINNER Victor


STINNER Victor  added the comment:

I consider the global configuration variables as deprecated. I would prefer to 
slowly move towards PyConfig, since almost all Python functions now use 
PyInterpreterState.config.

The problem is that my idea to provide a stable ABI for PyConfig was rejected:
https://mail.python.org/archives/list/python-...@python.org/thread/C7Z2NA2DTM3DLOZCFQAK5A2WFYO3PHHX/#2JAJQA5OANFPXAJ3327RRPHPQLKVP2EW

Which problem are you trying to solve your PR 22621?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +21601
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22621

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-09 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Py_FileSystemDefaultEncodeErrors was added to limited API in 3.7 and 
Py_UTF8Mode -- in 3.7. But in 3.8 their declarations are not available if 
Py_LIMITED_API is defined because they were moved to different header file 
included only if Py_LIMITED_API is not defined.

--
components: C API
messages: 378340
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with 
limited API
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com