Skip to content

Commit 74e2acd

Browse files
zwarehugovk
andauthored
Test fixes for 3.15 (GH-133599)
Followup to 942673e (GH-133588) * Update configure for Python 3.15 * Update magic number for 3.15 * Remove deprecated 'check_home' argument from sysconfig.is_python_build * Add warningignore entries for Modules/_sqlite/clinic/connection.c.h * Work around c-analyzer complaints about _testclinic deprecation tests --------- Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 1460cce commit 74e2acd

File tree

10 files changed

+244
-249
lines changed

10 files changed

+244
-249
lines changed

Include/internal/pycore_magic_number.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ Known values:
277277
Python 3.14a7 3622 (Store annotations in different class dict keys)
278278
Python 3.14a7 3623 (Add BUILD_INTERPOLATION & BUILD_TEMPLATE opcodes)
279279
Python 3.14b1 3624 (Don't optimize LOAD_FAST when local is killed by DELETE_FAST)
280+
Python 3.15a0 3650 (Initial version)
280281
281-
Python 3.15 will start with 3650
282+
Python 3.16 will start with 3700
282283
283284
Please don't copy-paste the same pre-release tag for new entries above!!!
284285
You should always use the *upcoming* tag. For example, if 3.12a6 came out
@@ -289,7 +290,7 @@ PC/launcher.c must also be updated.
289290
290291
*/
291292

292-
#define PYC_MAGIC_NUMBER 3624
293+
#define PYC_MAGIC_NUMBER 3650
293294
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
294295
(little-endian) and then appending b'\r\n'. */
295296
#define PYC_MAGIC_NUMBER_TOKEN \

Lib/sysconfig/__init__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,7 @@ def _safe_realpath(path):
219219
if "_PYTHON_PROJECT_BASE" in os.environ:
220220
_PROJECT_BASE = _safe_realpath(os.environ["_PYTHON_PROJECT_BASE"])
221221

222-
def is_python_build(check_home=None):
223-
if check_home is not None:
224-
import warnings
225-
warnings.warn(
226-
(
227-
'The check_home argument of sysconfig.is_python_build is '
228-
'deprecated and its value is ignored. '
229-
'It will be removed in Python 3.15.'
230-
),
231-
DeprecationWarning,
232-
stacklevel=2,
233-
)
222+
def is_python_build():
234223
for fn in ("Setup", "Setup.local"):
235224
if os.path.isfile(os.path.join(_PROJECT_BASE, "Modules", fn)):
236225
return True

Lib/test/test_clinic.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ def check_depr_star(self, pnames, fn, /, *args, name=None, **kwds):
29852985
regex = (
29862986
fr"Passing( more than)?( [0-9]+)? positional argument(s)? to "
29872987
fr"{re.escape(name)}\(\) is deprecated. Parameters? {pnames} will "
2988-
fr"become( a)? keyword-only parameters? in Python 3\.14"
2988+
fr"become( a)? keyword-only parameters? in Python 3\.37"
29892989
)
29902990
self.check_depr(regex, fn, *args, **kwds)
29912991

@@ -2998,7 +2998,7 @@ def check_depr_kwd(self, pnames, fn, *args, name=None, **kwds):
29982998
regex = (
29992999
fr"Passing keyword argument{pl} {pnames} to "
30003000
fr"{re.escape(name)}\(\) is deprecated. Parameter{pl} {pnames} "
3001-
fr"will become positional-only in Python 3\.14."
3001+
fr"will become positional-only in Python 3\.37."
30023002
)
30033003
self.check_depr(regex, fn, *args, **kwds)
30043004

@@ -3782,9 +3782,9 @@ def test_depr_star_multi(self):
37823782
fn("a", b="b", c="c", d="d", e="e", f="f", g="g", h="h")
37833783
errmsg = (
37843784
"Passing more than 1 positional argument to depr_star_multi() is deprecated. "
3785-
"Parameter 'b' will become a keyword-only parameter in Python 3.16. "
3786-
"Parameters 'c' and 'd' will become keyword-only parameters in Python 3.15. "
3787-
"Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.14.")
3785+
"Parameter 'b' will become a keyword-only parameter in Python 3.39. "
3786+
"Parameters 'c' and 'd' will become keyword-only parameters in Python 3.38. "
3787+
"Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.37.")
37883788
check = partial(self.check_depr, re.escape(errmsg), fn)
37893789
check("a", "b", c="c", d="d", e="e", f="f", g="g", h="h")
37903790
check("a", "b", "c", d="d", e="e", f="f", g="g", h="h")
@@ -3883,9 +3883,9 @@ def test_depr_kwd_multi(self):
38833883
fn("a", "b", "c", "d", "e", "f", "g", h="h")
38843884
errmsg = (
38853885
"Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to depr_kwd_multi() is deprecated. "
3886-
"Parameter 'b' will become positional-only in Python 3.14. "
3887-
"Parameters 'c' and 'd' will become positional-only in Python 3.15. "
3888-
"Parameters 'e', 'f' and 'g' will become positional-only in Python 3.16.")
3886+
"Parameter 'b' will become positional-only in Python 3.37. "
3887+
"Parameters 'c' and 'd' will become positional-only in Python 3.38. "
3888+
"Parameters 'e', 'f' and 'g' will become positional-only in Python 3.39.")
38893889
check = partial(self.check_depr, re.escape(errmsg), fn)
38903890
check("a", "b", "c", "d", "e", "f", g="g", h="h")
38913891
check("a", "b", "c", "d", "e", f="f", g="g", h="h")
@@ -3900,17 +3900,17 @@ def test_depr_multi(self):
39003900
self.assertRaises(TypeError, fn, "a", "b", "c", "d", "e", "f", "g")
39013901
errmsg = (
39023902
"Passing more than 4 positional arguments to depr_multi() is deprecated. "
3903-
"Parameter 'e' will become a keyword-only parameter in Python 3.15. "
3904-
"Parameter 'f' will become a keyword-only parameter in Python 3.14.")
3903+
"Parameter 'e' will become a keyword-only parameter in Python 3.38. "
3904+
"Parameter 'f' will become a keyword-only parameter in Python 3.37.")
39053905
check = partial(self.check_depr, re.escape(errmsg), fn)
39063906
check("a", "b", "c", "d", "e", "f", g="g")
39073907
check("a", "b", "c", "d", "e", f="f", g="g")
39083908
fn("a", "b", "c", "d", e="e", f="f", g="g")
39093909
fn("a", "b", "c", d="d", e="e", f="f", g="g")
39103910
errmsg = (
39113911
"Passing keyword arguments 'b' and 'c' to depr_multi() is deprecated. "
3912-
"Parameter 'b' will become positional-only in Python 3.14. "
3913-
"Parameter 'c' will become positional-only in Python 3.15.")
3912+
"Parameter 'b' will become positional-only in Python 3.37. "
3913+
"Parameter 'c' will become positional-only in Python 3.38.")
39143914
check = partial(self.check_depr, re.escape(errmsg), fn)
39153915
check("a", "b", c="c", d="d", e="e", f="f", g="g")
39163916
check("a", b="b", c="c", d="d", e="e", f="f", g="g")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Removed the ``check_home`` parameter from :func:`sysconfig.is_python_build`,
2+
deprecated since Python 3.12.

0 commit comments

Comments
 (0)