Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
12f494a
remove `Py_BytesWarningFlag`
picnixz May 8, 2025
a6467f8
remove `Py_DebugFlag`
picnixz May 8, 2025
df48806
remove `Py_VerboseFlag`
picnixz May 8, 2025
cfabb22
remove `Py_QuietFlag`
picnixz May 8, 2025
71bca31
remove `Py_InspectFlag`
picnixz May 8, 2025
7ebf7bd
remove `Py_OptimizeFlag`
picnixz May 8, 2025
2d05afe
remove `Py_NoSiteFlag`
picnixz May 8, 2025
2a8e546
remove `Py_FrozenFlag`
picnixz May 8, 2025
93eee09
remove `Py_IgnoreEnvironmentFlag`
picnixz May 8, 2025
311f95c
remove `Py_DontWriteBytecodeFlag`
picnixz May 8, 2025
f5b39db
remove `Py_NoUserSiteDirectory`
picnixz May 8, 2025
c66edb3
remove `Py_UnbufferedStdioFlag`
picnixz May 8, 2025
9116a65
remove `Py_HashRandomizationFlag`
picnixz May 8, 2025
fb2a247
remove `Py_IsolatedFlag`
picnixz May 8, 2025
86c0c87
remove `Py_LegacyWindowsFSEncodingFlag`
picnixz May 8, 2025
eab9e01
remove `Py_LegacyWindowsStdioFlag`
picnixz May 8, 2025
54ff2aa
remove `Py_FileSystemDefaultEncoding` and `Py_HasFileSystemDefaultEnc…
picnixz May 8, 2025
9a322fe
remove `Py_FileSystemDefaultEncodeErrors`
picnixz May 8, 2025
d4ff0f7
fix test_embed
picnixz May 8, 2025
5d59540
blurb
picnixz May 8, 2025
eef039e
update What's New entries
picnixz May 8, 2025
1248cea
update docs
picnixz May 8, 2025
583bafb
update docutils refs
picnixz May 8, 2025
daa1e2d
fixup
picnixz May 8, 2025
6c7baa2
revert `putenv` statements
picnixz May 8, 2025
d9f4def
restore file
picnixz May 8, 2025
279ac00
update stable ABI symbols
picnixz May 8, 2025
cddebbe
revert runtime changes for now
picnixz May 8, 2025
b8afe23
Merge remote-tracking branch 'upstream/main' into cleanup/315/depreca…
picnixz May 9, 2025
8a2173f
Merge remote-tracking branch 'upstream/main' into cleanup/315/depreca…
picnixz Jun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove Py_FileSystemDefaultEncoding and `Py_HasFileSystemDefaultEnc…
…oding`
  • Loading branch information
picnixz committed May 8, 2025
commit 54ff2aac82167bc3e806caf6550b426f8bfa51b3
2 changes: 0 additions & 2 deletions Doc/data/stable_abi.dat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Doc/deprecations/c-api-pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ Pending removal in Python 3.15
* :c:var:`Py_InteractiveFlag`:
Use :c:member:`PyConfig.interactive` or
:c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
* :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
Use :c:member:`PyConfig.filesystem_encoding` or
:c:func:`PyConfig_Get("filesystem_encoding") <PyConfig_Get>` instead.
* :c:var:`!Py_FileSystemDefaultEncodeErrors`:
Use :c:member:`PyConfig.filesystem_errors` or
:c:func:`PyConfig_Get("filesystem_errors") <PyConfig_Get>` instead.
Expand Down
2 changes: 0 additions & 2 deletions Include/fileobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
/* The default encoding used by the platform file system APIs
If non-NULL, this is different than the default encoding for strings
*/
Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
#endif
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_UTF8Mode;
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):

# global config
DEFAULT_GLOBAL_CONFIG = {
'Py_HasFileSystemDefaultEncoding': 0,
'_Py_HasFileSystemDefaultEncodeErrors': 0,
}
COPY_GLOBAL_PRE_CONFIG = [
Expand All @@ -700,7 +699,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
# Copy core config to global config for expected values
# True means that the core config value is inverted (0 => 1 and 1 => 0)
('Py_FileSystemDefaultEncodeErrors', 'filesystem_errors'),
('Py_FileSystemDefaultEncoding', 'filesystem_encoding'),
('Py_InteractiveFlag', 'interactive'),
]

Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_stable_abi_ctypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Misc/stable_abi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1620,8 +1620,6 @@
added = '3.2'
[function.Py_FatalError]
added = '3.2'
[data.Py_FileSystemDefaultEncoding]
added = '3.2'
[function.Py_Finalize]
added = '3.2'
[function.Py_GetBuildInfo]
Expand All @@ -1648,8 +1646,6 @@
added = '3.2'
[function.Py_GetVersion]
added = '3.2'
[data.Py_HasFileSystemDefaultEncoding]
added = '3.2'
[function.Py_IncRef]
added = '3.2'
[function.Py_Initialize]
Expand Down
2 changes: 1 addition & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -16517,7 +16517,7 @@ init_fs_codec(PyInterpreterState *interp)
PyUnicode_DecodeFSDefault() can now use the Python codec rather than
the C implementation of the filesystem encoding. */

/* Set Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
/* Set Py_FileSystemDefaultEncodeErrors
global configuration variables. */
if (_Py_IsMainInterpreter(interp)) {

Expand Down
2 changes: 0 additions & 2 deletions PC/python3dll.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
#define SET_ITEM_STR(VAR) \
SET_ITEM(#VAR, FROM_STRING(VAR))

SET_ITEM_STR(Py_FileSystemDefaultEncoding);
SET_ITEM_INT(Py_HasFileSystemDefaultEncoding);
SET_ITEM_STR(Py_FileSystemDefaultEncodeErrors);
SET_ITEM_INT(_Py_HasFileSystemDefaultEncodeErrors);

Expand Down
11 changes: 1 addition & 10 deletions Python/preconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ preconfig_copy(PyPreConfig *config, const PyPreConfig *config2);

/* --- File system encoding/errors -------------------------------- */

const char *Py_FileSystemDefaultEncoding = NULL;
int Py_HasFileSystemDefaultEncoding = 0;
const char *Py_FileSystemDefaultEncodeErrors = NULL;
int _Py_HasFileSystemDefaultEncodeErrors = 0;

Expand All @@ -27,10 +25,6 @@ _Py_ClearFileSystemEncoding(void)
{
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
if (!Py_HasFileSystemDefaultEncoding && Py_FileSystemDefaultEncoding) {
PyMem_RawFree((char*)Py_FileSystemDefaultEncoding);
Py_FileSystemDefaultEncoding = NULL;
}
if (!_Py_HasFileSystemDefaultEncodeErrors && Py_FileSystemDefaultEncodeErrors) {
PyMem_RawFree((char*)Py_FileSystemDefaultEncodeErrors);
Py_FileSystemDefaultEncodeErrors = NULL;
Expand All @@ -39,7 +33,7 @@ _Py_COMP_DIAG_POP
}


/* Set Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
/* Set Py_FileSystemDefaultEncodeErrors
global configuration variables to PyConfig.filesystem_encoding and
PyConfig.filesystem_errors (encoded to UTF-8).

Expand All @@ -62,9 +56,6 @@ _Py_SetFileSystemEncoding(const char *encoding, const char *errors)

_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
Py_FileSystemDefaultEncoding = encoding2;
Py_HasFileSystemDefaultEncoding = 0;

Py_FileSystemDefaultEncodeErrors = errors2;
_Py_HasFileSystemDefaultEncodeErrors = 0;
_Py_COMP_DIAG_POP
Expand Down
2 changes: 0 additions & 2 deletions Tools/c-analyzer/cpython/ignored.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ Python/initconfig.c - PYPRECONFIG_SPEC -
## public C-API

## deprecated
Python/preconfig.c - Py_FileSystemDefaultEncoding -
Python/preconfig.c - Py_HasFileSystemDefaultEncoding -
Python/preconfig.c - Py_FileSystemDefaultEncodeErrors -
Python/preconfig.c - _Py_HasFileSystemDefaultEncodeErrors -

Expand Down