Skip to content

Commit 9d07159

Browse files
StanFromIrelandhugovkzware
authored
gh-149499: Fixes for 3.16 bump (GH-149500)
Also fixes gh-149507, regenerating `configure` for 3.16. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org>
1 parent f5c7535 commit 9d07159

7 files changed

Lines changed: 30 additions & 61 deletions

File tree

Doc/whatsnew/3.16.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,13 @@ module_name
106106
Removed
107107
=======
108108

109-
module_name
110-
-----------
109+
sysconfig
110+
---------
111+
112+
* The :func:`!sysconfig.expand_makefile_vars` function
113+
which has been deprecated since Python 3.14.
114+
Use the ``vars`` argument of :func:`sysconfig.get_paths` instead.
111115

112-
* TODO
113116
.. Add removals above alphabetically, not here at the end.
114117
115118
@@ -156,4 +159,3 @@ Deprecated C APIs
156159
157160
Removed C APIs
158161
--------------
159-

Include/internal/pycore_magic_number.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,10 @@ Known values:
297297
Python 3.15a8 3664 (Fix __qualname__ for __annotate__ functions)
298298
Python 3.15a8 3665 (Add FOR_ITER_VIRTUAL and GET_ITER specializations)
299299
Python 3.15b1 3666 (Add SEND_VIRTUAL and SEND_ASYNC_GEN specializations)
300+
Python 3.16a0 3700 (Initial version)
300301
301302
302-
Python 3.16 will start with 3700
303+
Python 3.17 will start with 3750
303304
304305
Please don't copy-paste the same pre-release tag for new entries above!!!
305306
You should always use the *upcoming* tag. For example, if 3.12a6 came out
@@ -310,7 +311,7 @@ PC/launcher.c must also be updated.
310311
311312
*/
312313

313-
#define PYC_MAGIC_NUMBER 3666
314+
#define PYC_MAGIC_NUMBER 3700
314315
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
315316
(little-endian) and then appending b'\r\n'. */
316317
#define PYC_MAGIC_NUMBER_TOKEN \

Lib/sysconfig/__init__.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -753,41 +753,3 @@ def get_python_version():
753753

754754
def _get_python_version_abi():
755755
return _PY_VERSION_SHORT + get_config_var("abi_thread")
756-
757-
758-
def expand_makefile_vars(s, vars):
759-
"""Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
760-
'string' according to 'vars' (a dictionary mapping variable names to
761-
values). Variables not present in 'vars' are silently expanded to the
762-
empty string. The variable values in 'vars' should not contain further
763-
variable expansions; if 'vars' is the output of 'parse_makefile()',
764-
you're fine. Returns a variable-expanded version of 's'.
765-
"""
766-
767-
import warnings
768-
warnings.warn(
769-
'sysconfig.expand_makefile_vars is deprecated and will be removed in '
770-
'Python 3.16. Use sysconfig.get_paths(vars=...) instead.',
771-
DeprecationWarning,
772-
stacklevel=2,
773-
)
774-
775-
import re
776-
777-
_findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
778-
_findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"
779-
780-
# This algorithm does multiple expansion, so if vars['foo'] contains
781-
# "${bar}", it will expand ${foo} to ${bar}, and then expand
782-
# ${bar}... and so forth. This is fine as long as 'vars' comes from
783-
# 'parse_makefile()', which takes care of such expansions eagerly,
784-
# according to make's variable expansion semantics.
785-
786-
while True:
787-
m = re.search(_findvar1_rx, s) or re.search(_findvar2_rx, s)
788-
if m:
789-
(beg, end) = m.span()
790-
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
791-
else:
792-
break
793-
return s
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Removed the :func:`!sysconfig.expand_makefile_vars` function which has been
2+
deprecated since Python 3.14. Use the ``vars`` argument of
3+
:func:`sysconfig.get_paths` instead.

PC/launcher.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,7 @@ static PYC_MAGIC magic_values[] = {
12731273
{ 3550, 3599, L"3.13" },
12741274
{ 3600, 3649, L"3.14" },
12751275
{ 3650, 3699, L"3.15" },
1276+
{ 3700, 3749, L"3.16" },
12761277
{ 0 }
12771278
};
12781279

PC/pyconfig.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,21 +330,21 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
330330
the linking is explicitly handled */
331331
# if defined(Py_GIL_DISABLED)
332332
# if defined(Py_DEBUG)
333-
# pragma comment(lib,"python315t_d.lib")
333+
# pragma comment(lib,"python316t_d.lib")
334334
# elif defined(Py_LIMITED_API) || defined(Py_TARGET_ABI3T)
335335
# pragma comment(lib,"python3t.lib")
336336
# else
337-
# pragma comment(lib,"python315t.lib")
337+
# pragma comment(lib,"python316t.lib")
338338
# endif /* Py_DEBUG */
339339
# else /* Py_GIL_DISABLED */
340340
# if defined(Py_DEBUG)
341-
# pragma comment(lib,"python315_d.lib")
341+
# pragma comment(lib,"python316_d.lib")
342342
# elif defined(Py_TARGET_ABI3T)
343343
# pragma comment(lib,"python3t.lib")
344344
# elif defined(Py_LIMITED_API)
345345
# pragma comment(lib,"python3.lib")
346346
# else
347-
# pragma comment(lib,"python315.lib")
347+
# pragma comment(lib,"python316.lib")
348348
# endif /* Py_DEBUG */
349349
# endif /* Py_GIL_DISABLED */
350350
# endif /* _MSC_VER && !Py_NO_LINK_LIB */

configure

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

0 commit comments

Comments
 (0)