Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d3064d7
fix unwrap leak with dead proxy operands
prakashsellathurai Apr 9, 2026
220f3bf
add a cleanup using goto instead of returningh null
prakashsellathurai Apr 9, 2026
1e5e9a3
fix lint error
prakashsellathurai Apr 10, 2026
58e076a
add blurb
prakashsellathurai Apr 10, 2026
7c4ea65
Merge branch 'main' into fix/148263
prakashsellathurai Apr 12, 2026
b4e0de8
Merge branch 'main' into fix/148263
prakashsellathurai Apr 12, 2026
a50b3a4
keep the old UNWRAP Macro and create a new MACRO UNWRAP_OR to cleam the
prakashsellathurai Apr 12, 2026
46d8678
update blurb for the current scope
prakashsellathurai Apr 12, 2026
b432655
fix lint issues
prakashsellathurai Apr 12, 2026
9121fe3
Update test_weakref.py
prakashsellathurai Apr 12, 2026
39919e8
Update test_weakref.py
prakashsellathurai Apr 12, 2026
30d2369
organise testcases
prakashsellathurai Apr 12, 2026
70f1cca
fix linting
prakashsellathurai Apr 12, 2026
19a6fe7
Revert "keep the old UNWRAP Macro and create a new MACRO UNWRAP_OR t…
prakashsellathurai Apr 12, 2026
bec9c76
Update 2026-04-10-16-19-23.gh-issue-148263.trqp3-.rst
prakashsellathurai Apr 12, 2026
ddf4a6a
remove unnecessary mem leak handling in unary and wrap method
prakashsellathurai Apr 12, 2026
033be36
remove unnecessary mem leak handling in unary and wrap method 1
prakashsellathurai Apr 12, 2026
f8d0fbb
readd unwrap macro
prakashsellathurai Apr 12, 2026
62d0c00
Update weakrefobject.c
prakashsellathurai Apr 12, 2026
6199102
Update weakrefobject.c
prakashsellathurai Apr 12, 2026
2137295
Merge branch 'main' into fix/148263
prakashsellathurai Apr 13, 2026
e839f46
Revert "remove unnecessary mem leak handling in unary and wrap method 1"
prakashsellathurai Apr 13, 2026
266c2e7
Revert "remove unnecessary mem leak handling in unary and wrap method"
prakashsellathurai Apr 13, 2026
a6baac2
Merge branch 'fix/148263' of https://github.com/prakashsellathurai/cp…
prakashsellathurai Apr 13, 2026
1617961
Reapply "remove unnecessary mem leak handling in unary and wrap method"
prakashsellathurai Apr 13, 2026
4ccc377
Reapply "remove unnecessary mem leak handling in unary and wrap metho…
prakashsellathurai Apr 13, 2026
a45593a
Revert "gh-148395: Fix a possible UAF in `{LZMA,BZ2,_Zlib}Decompresso…
prakashsellathurai Apr 13, 2026
c1823d9
Revert "gh-121190: Emit a better error message from `importlib.resour…
prakashsellathurai Apr 13, 2026
882654a
Revert "gh-146450: Ensure Android gradle build uses custom cross-buil…
prakashsellathurai Apr 13, 2026
cdcefcb
Revert "gh-105936: Properly update closure cells for `__setattr__` an…
prakashsellathurai Apr 13, 2026
56b608b
Revert "Update weakrefobject.c"
prakashsellathurai Apr 13, 2026
bb2fa35
Revert "Update weakrefobject.c"
prakashsellathurai Apr 13, 2026
9bf25c6
Revert "readd unwrap macro"
prakashsellathurai Apr 13, 2026
be3f7d0
Revert "remove unnecessary mem leak handling in unary and wrap method 1"
prakashsellathurai Apr 13, 2026
2a4d275
Revert "remove unnecessary mem leak handling in unary and wrap method"
prakashsellathurai Apr 13, 2026
4265e31
Revert "Update 2026-04-10-16-19-23.gh-issue-148263.trqp3-.rst"
prakashsellathurai Apr 13, 2026
e8d0680
Reapply "keep the old UNWRAP Macro and create a new MACRO UNWRAP_OR …
prakashsellathurai Apr 13, 2026
ddbedbb
Revert "gh-148438: implement `_RECORD_BOUND_METHOD` in JIT (GH-148457)"
prakashsellathurai Apr 13, 2026
769e5da
Revert "gh-131798: Split `_CHECK_AND_ALLOCATE_OBJECT` into smaller uo…
prakashsellathurai Apr 13, 2026
54f801c
Revert "gh-146261: JIT: protect against function version changes (#14…
prakashsellathurai Apr 13, 2026
7b833c9
Revert "fix linting"
prakashsellathurai Apr 13, 2026
c3c020b
Revert "organise testcases"
prakashsellathurai Apr 13, 2026
a91f390
Revert "Update test_weakref.py"
prakashsellathurai Apr 13, 2026
c657d09
Revert "Update test_weakref.py"
prakashsellathurai Apr 13, 2026
fa857dc
Revert "fix lint issues"
prakashsellathurai Apr 13, 2026
e515fea
Revert "update blurb for the current scope"
prakashsellathurai Apr 13, 2026
f3c118a
Revert "keep the old UNWRAP Macro and create a new MACRO UNWRAP_OR t…
prakashsellathurai Apr 13, 2026
e8f7621
Revert "gh-139551: add support for BaseExceptionGroup in IDLE (GH-139…
prakashsellathurai Apr 13, 2026
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
56 changes: 39 additions & 17 deletions Android/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,17 @@ def setup_testbed():
os.chmod(out_path, 0o755)


# run_testbed will build the app automatically, but it's useful to have this as
# a separate command to allow running the app outside of this script.
def build_testbed(context):
setup_sdk()
setup_testbed()
run(
[gradlew, "--console", "plain", "packageDebug", "packageDebugAndroidTest"],
cwd=TESTBED_DIR,
)


# Work around a bug involving sys.exit and TaskGroups
# (https://github.com/python/cpython/issues/101515).
def exit(*args):
Expand Down Expand Up @@ -634,10 +645,6 @@ async def gradle_task(context):
task_prefix = "connected"
env["ANDROID_SERIAL"] = context.connected

# Ensure that CROSS_BUILD_DIR is in the Gradle environment, regardless
# of whether it was set by environment variable or `--cross-build-dir`.
env["CROSS_BUILD_DIR"] = CROSS_BUILD_DIR

if context.ci_mode:
context.args[0:0] = [
# See _add_ci_python_opts in libregrtest/main.py.
Expand Down Expand Up @@ -865,18 +872,6 @@ def parse_args():

def add_parser(*args, **kwargs):
parser = subcommands.add_parser(*args, **kwargs)
parser.add_argument(
"--cross-build-dir",
action="store",
default=os.environ.get("CROSS_BUILD_DIR"),
dest="cross_build_dir",
type=Path,
help=(
"Path to the cross-build directory "
f"(default: {CROSS_BUILD_DIR}). Can also be set "
"with the CROSS_BUILD_DIR environment variable."
),
)
parser.add_argument(
"-v", "--verbose", action="count", default=0,
help="Show verbose output. Use twice to be even more verbose.")
Expand All @@ -889,7 +884,7 @@ def add_parser(*args, **kwargs):
)
configure_build = add_parser(
"configure-build", help="Run `configure` for the build Python")
add_parser(
make_build = add_parser(
"make-build", help="Run `make` for the build Python")
configure_host = add_parser(
"configure-host", help="Run `configure` for Android")
Expand All @@ -901,12 +896,38 @@ def add_parser(*args, **kwargs):
help="Delete build directories for the selected target"
)

add_parser("build-testbed", help="Build the testbed app")
test = add_parser("test", help="Run the testbed app")
package = add_parser("package", help="Make a release package")
ci = add_parser("ci", help="Run build, package and test")
env = add_parser("env", help="Print environment variables")

# Common arguments
# --cross-build-dir argument
for cmd in [
clean,
configure_build,
make_build,
configure_host,
make_host,
build,
package,
test,
ci,
]:
cmd.add_argument(
"--cross-build-dir",
action="store",
default=os.environ.get("CROSS_BUILD_DIR"),
dest="cross_build_dir",
type=Path,
help=(
"Path to the cross-build directory "
f"(default: {CROSS_BUILD_DIR}). Can also be set "
"with the CROSS_BUILD_DIR environment variable."
),
)

# --cache-dir option
for cmd in [configure_host, build, ci]:
cmd.add_argument(
Expand Down Expand Up @@ -1011,6 +1032,7 @@ def main():
"make-host": make_host_python,
"build": build_targets,
"clean": clean_targets,
"build-testbed": build_testbed,
"test": run_testbed,
"package": package,
"ci": ci,
Expand Down
2 changes: 1 addition & 1 deletion Android/testbed/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

val ANDROID_DIR = file("../..")
val PYTHON_DIR = ANDROID_DIR.parentFile!!
val PYTHON_CROSS_DIR = file(System.getenv("CROSS_BUILD_DIR") ?: "$PYTHON_DIR/cross-build")
val PYTHON_CROSS_DIR = file("$PYTHON_DIR/cross-build")
val inSourceTree = (
ANDROID_DIR.name == "Android" && file("$PYTHON_DIR/pyconfig.h.in").exists()
)
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_opcode_metadata.h

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

2 changes: 2 additions & 0 deletions Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ extern PyCodeObject *_Py_uop_sym_get_probable_func_code(JitOptRef sym);
extern PyObject *_Py_uop_sym_get_probable_value(JitOptRef sym);
extern PyTypeObject *_Py_uop_sym_get_probable_type(JitOptRef sym);
extern JitOptRef *_Py_uop_sym_set_stack_depth(JitOptContext *ctx, int stack_depth, JitOptRef *current_sp);
extern uint32_t _Py_uop_sym_get_func_version(JitOptRef ref);
bool _Py_uop_sym_set_func_version(JitOptContext *ctx, JitOptRef ref, uint32_t version);

extern void _Py_uop_abstractcontext_init(JitOptContext *ctx, _PyBloomFilter *dependencies);
extern void _Py_uop_abstractcontext_fini(JitOptContext *ctx);
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_optimizer_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef enum _JitSymType {
JIT_SYM_NON_NULL_TAG = 3,
JIT_SYM_BOTTOM_TAG = 4,
JIT_SYM_TYPE_VERSION_TAG = 5,
JIT_SYM_FUNC_VERSION_TAG = 6,
JIT_SYM_KNOWN_CLASS_TAG = 7,
JIT_SYM_KNOWN_VALUE_TAG = 8,
JIT_SYM_TUPLE_TAG = 9,
Expand Down
Loading
Loading