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
2 changes: 1 addition & 1 deletion Doc/library/mmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length

.. availability:: Linux >= 5.17 (kernel built with ``CONFIG_ANON_VMA_NAME`` option)

.. versionadded:: next
.. versionadded:: 3.15

.. method:: size()

Expand Down
4 changes: 2 additions & 2 deletions Include/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#define PY_MINOR_VERSION 15
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL 3
#define PY_RELEASE_SERIAL 4

/* Version as a string */
#define PY_VERSION "3.15.0a3+"
#define PY_VERSION "3.15.0a4+"
/*--end constants--*/


Expand Down
21 changes: 12 additions & 9 deletions Lib/pydoc_data/topics.py

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

2 changes: 1 addition & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ def skip_if_unlimited_stack_size(test):
See https://github.com/python/cpython/issues/143460.
"""
if is_wasi or os.name == "nt":
if is_emscripten or is_wasi or os.name == "nt":
return test

import resource
Expand Down
36 changes: 36 additions & 0 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3575,6 +3575,42 @@ def testfunc(n):
# _POP_TOP_NOP is a sign the optimizer ran and didn't hit bottom.
self.assertGreaterEqual(count_ops(ex, "_POP_TOP_NOP"), 1)

def test_binary_op_subscr_init_frame(self):
class B:
def __getitem__(self, other):
return other + 1
def testfunc(*args):
n, b = args[0]
for _ in range(n):
y = b[2]

res, ex = self._run_with_optimizer(testfunc, (TIER2_THRESHOLD, B()))
self.assertIsNotNone(ex)
uops = get_opnames(ex)

self.assertIn("_BINARY_OP_SUBSCR_INIT_CALL", uops)
# _POP_TOP_NOP is a sign the optimizer ran and didn't hit contradiction.
self.assertGreaterEqual(count_ops(ex, "_POP_TOP_NOP"), 1)

def test_load_attr_property_frame(self):
class B:
@property
def prop(self):
return 3
def testfunc(*args):
n, b = args[0]
for _ in range(n):
y = b.prop + b.prop

testfunc((3, B()))
res, ex = self._run_with_optimizer(testfunc, (TIER2_THRESHOLD, B()))
self.assertIsNotNone(ex)
uops = get_opnames(ex)

self.assertIn("_LOAD_ATTR_PROPERTY_FRAME", uops)
# This is a sign the optimizer ran and didn't hit contradiction.
self.assertIn("_INSERT_2_LOAD_CONST_INLINE_BORROW", uops)

def test_unary_negative(self):
def testfunc(n):
a = 3
Expand Down
Loading
Loading