Skip to content

Commit 9a322fe

Browse files
committed
remove Py_FileSystemDefaultEncodeErrors
The following are also removed: - `_Py_SetFileSystemEncoding` - `_Py_ClearFileSystemEncoding` - `_Py_HasFileSystemDefaultEncodeErrors`
1 parent 54ff2aa commit 9a322fe

File tree

14 files changed

+1
-91
lines changed

14 files changed

+1
-91
lines changed

Doc/data/stable_abi.dat

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ Pending removal in Python 3.15
7171
* :c:var:`Py_InteractiveFlag`:
7272
Use :c:member:`PyConfig.interactive` or
7373
:c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
74-
* :c:var:`!Py_FileSystemDefaultEncodeErrors`:
75-
Use :c:member:`PyConfig.filesystem_errors` or
76-
:c:func:`PyConfig_Get("filesystem_errors") <PyConfig_Get>` instead.
7774
* :c:var:`!Py_UTF8Mode`:
7875
Use :c:member:`PyPreConfig.utf8_mode` or
7976
:c:func:`PyConfig_Get("utf8_mode") <PyConfig_Get>` instead.

Include/fileobject.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
1616
PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);
1717
PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
1818

19-
/* The default encoding used by the platform file system APIs
20-
If non-NULL, this is different than the default encoding for strings
21-
*/
22-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
23-
Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
24-
#endif
25-
2619
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
2720
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_UTF8Mode;
2821
#endif

Include/internal/pycore_fileutils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ extern int _Py_open_osfhandle(void *handle, int flags);
190190
? _PyStatus_ERR("cannot decode " NAME) \
191191
: _PyStatus_NO_MEMORY()
192192

193-
extern int _Py_HasFileSystemDefaultEncodeErrors;
194-
195193
extern int _Py_DecodeUTF8Ex(
196194
const char *arg,
197195
Py_ssize_t arglen,

Include/internal/pycore_pylifecycle.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ extern "C" {
1313
/* Forward declarations */
1414
struct _PyArgv;
1515

16-
extern int _Py_SetFileSystemEncoding(
17-
const char *encoding,
18-
const char *errors);
19-
extern void _Py_ClearFileSystemEncoding(void);
2016
extern PyStatus _PyUnicode_InitEncodings(PyThreadState *tstate);
2117
#ifdef MS_WINDOWS
2218
extern int _PyUnicode_EnableLegacyWindowsFSEncoding(void);

Lib/test/test_embed.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,16 +689,12 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
689689
CONFIG_ISOLATED['legacy_windows_stdio'] = False
690690

691691
# global config
692-
DEFAULT_GLOBAL_CONFIG = {
693-
'_Py_HasFileSystemDefaultEncodeErrors': 0,
694-
}
695692
COPY_GLOBAL_PRE_CONFIG = [
696693
('Py_UTF8Mode', 'utf8_mode'),
697694
]
698695
COPY_GLOBAL_CONFIG = [
699696
# Copy core config to global config for expected values
700697
# True means that the core config value is inverted (0 => 1 and 1 => 0)
701-
('Py_FileSystemDefaultEncodeErrors', 'filesystem_errors'),
702698
('Py_InteractiveFlag', 'interactive'),
703699
]
704700

Lib/test/test_stable_abi_ctypes.py

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Misc/stable_abi.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,8 +2199,6 @@
21992199
added = '3.10'
22002200
[function.PyModule_AddObjectRef]
22012201
added = '3.10'
2202-
[data.Py_FileSystemDefaultEncodeErrors]
2203-
added = '3.10'
22042202
[function.PyCodec_Unregister]
22052203
added = '3.10'
22062204
[function.PyErr_SetInterruptEx]

Objects/unicodeobject.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16516,17 +16516,6 @@ init_fs_codec(PyInterpreterState *interp)
1651616516
/* At this point, PyUnicode_EncodeFSDefault() and
1651716517
PyUnicode_DecodeFSDefault() can now use the Python codec rather than
1651816518
the C implementation of the filesystem encoding. */
16519-
16520-
/* Set Py_FileSystemDefaultEncodeErrors
16521-
global configuration variables. */
16522-
if (_Py_IsMainInterpreter(interp)) {
16523-
16524-
if (_Py_SetFileSystemEncoding(fs_codec->encoding,
16525-
fs_codec->errors) < 0) {
16526-
PyErr_NoMemory();
16527-
return -1;
16528-
}
16529-
}
1653016519
return 0;
1653116520
}
1653216521

PC/python3dll.c

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)