Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions Doc/whatsnew/3.16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ module_name
Removed
=======

module_name
-----------
sysconfig
---------

* The :func:`!sysconfig.expand_makefile_vars` function
which has been deprecated since Python 3.14.
Use the ``vars`` argument of :func:`sysconfig.get_paths` instead.

* TODO
.. Add removals above alphabetically, not here at the end.
Expand Down Expand Up @@ -156,4 +159,3 @@ Deprecated C APIs
Removed C APIs
--------------

5 changes: 3 additions & 2 deletions Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ Known values:
Python 3.15a8 3664 (Fix __qualname__ for __annotate__ functions)
Python 3.15a8 3665 (Add FOR_ITER_VIRTUAL and GET_ITER specializations)
Python 3.15b1 3666 (Add SEND_VIRTUAL and SEND_ASYNC_GEN specializations)
Python 3.16a0 3700 (Initial version)


Python 3.16 will start with 3700
Python 3.17 will start with 3750

Please don't copy-paste the same pre-release tag for new entries above!!!
You should always use the *upcoming* tag. For example, if 3.12a6 came out
Expand All @@ -310,7 +311,7 @@ PC/launcher.c must also be updated.

*/

#define PYC_MAGIC_NUMBER 3666
#define PYC_MAGIC_NUMBER 3700
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
38 changes: 0 additions & 38 deletions Lib/sysconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,41 +753,3 @@ def get_python_version():

def _get_python_version_abi():
return _PY_VERSION_SHORT + get_config_var("abi_thread")


def expand_makefile_vars(s, vars):
"""Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
'string' according to 'vars' (a dictionary mapping variable names to
values). Variables not present in 'vars' are silently expanded to the
empty string. The variable values in 'vars' should not contain further
variable expansions; if 'vars' is the output of 'parse_makefile()',
you're fine. Returns a variable-expanded version of 's'.
"""

import warnings
warnings.warn(
'sysconfig.expand_makefile_vars is deprecated and will be removed in '
'Python 3.16. Use sysconfig.get_paths(vars=...) instead.',
DeprecationWarning,
stacklevel=2,
)

import re

_findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
_findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"

# This algorithm does multiple expansion, so if vars['foo'] contains
# "${bar}", it will expand ${foo} to ${bar}, and then expand
# ${bar}... and so forth. This is fine as long as 'vars' comes from
# 'parse_makefile()', which takes care of such expansions eagerly,
# according to make's variable expansion semantics.

while True:
m = re.search(_findvar1_rx, s) or re.search(_findvar2_rx, s)
if m:
(beg, end) = m.span()
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
else:
break
return s
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Removed the :func:`!sysconfig.expand_makefile_vars` function which has been
deprecated since Python 3.14. Use the ``vars`` argument of
:func:`sysconfig.get_paths` instead.
1 change: 1 addition & 0 deletions PC/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,7 @@ static PYC_MAGIC magic_values[] = {
{ 3550, 3599, L"3.13" },
{ 3600, 3649, L"3.14" },
{ 3650, 3699, L"3.15" },
{ 3700, 3749, L"3.16" },
{ 0 }
};

Expand Down
8 changes: 4 additions & 4 deletions PC/pyconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,21 +330,21 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
the linking is explicitly handled */
# if defined(Py_GIL_DISABLED)
# if defined(Py_DEBUG)
# pragma comment(lib,"python315t_d.lib")
# pragma comment(lib,"python316t_d.lib")
# elif defined(Py_LIMITED_API) || defined(Py_TARGET_ABI3T)
# pragma comment(lib,"python3t.lib")
# else
# pragma comment(lib,"python315t.lib")
# pragma comment(lib,"python316t.lib")
# endif /* Py_DEBUG */
# else /* Py_GIL_DISABLED */
# if defined(Py_DEBUG)
# pragma comment(lib,"python315_d.lib")
# pragma comment(lib,"python316_d.lib")
# elif defined(Py_TARGET_ABI3T)
# pragma comment(lib,"python3t.lib")
# elif defined(Py_LIMITED_API)
# pragma comment(lib,"python3.lib")
# else
# pragma comment(lib,"python315.lib")
# pragma comment(lib,"python316.lib")
# endif /* Py_DEBUG */
# endif /* Py_GIL_DISABLED */
# endif /* _MSC_VER && !Py_NO_LINK_LIB */
Expand Down
26 changes: 13 additions & 13 deletions configure

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

Loading