Skip to content
Closed
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
86 changes: 1 addition & 85 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,51 +151,11 @@ jobs:
run: make smelly
- name: Check limited ABI symbols
run: make check-limited-abi
continue-on-error: true
- name: Check for unsupported C global variables
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
run: make check-c-globals

build-windows:
name: >-
Windows
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
needs: build-context
if: fromJSON(needs.build-context.outputs.run-windows-tests)
strategy:
fail-fast: false
matrix:
arch:
- x64
- Win32
- arm64
free-threading:
- false
# TODO(Immutable): Enable free-threading build when it is made to work.
# - true
# exclude:
# # Skip Win32 on free-threaded builds
# - { arch: Win32, free-threading: true }
uses: ./.github/workflows/reusable-windows.yml
with:
arch: ${{ matrix.arch }}
free-threading: ${{ matrix.free-threading }}

build-windows-msi:
# ${{ '' } is a hack to nest jobs under the same sidebar category.
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
needs: build-context
if: fromJSON(needs.build-context.outputs.run-windows-msi)
strategy:
fail-fast: false
matrix:
arch:
- x86
- x64
- arm64
uses: ./.github/workflows/reusable-windows-msi.yml
with:
arch: ${{ matrix.arch }}

build-macos:
name: >-
macOS
Expand Down Expand Up @@ -397,36 +357,6 @@ jobs:
- name: SSL tests
run: ./python Lib/test/ssltests.py

build-android:
name: Android (${{ matrix.arch }})
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
runs-on: macos-14
- arch: x86_64
runs-on: ubuntu-24.04

runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and test
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android

build-wasi:
name: 'WASI'
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
uses: ./.github/workflows/reusable-wasi.yml
with:
config_hash: ${{ needs.build-context.outputs.config-hash }}

test-hypothesis:
name: "Hypothesis tests on Ubuntu"
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -722,14 +652,10 @@ jobs:
- check-docs
- check-autoconf-regen
- check-generated-files
- build-windows
- build-windows-msi
- build-macos
- build-ubuntu
- build-ubuntu-ssltests-awslc
- build-ubuntu-ssltests-openssl
- build-android
- build-wasi
- test-hypothesis
- build-asan
- build-san
Expand All @@ -742,7 +668,6 @@ jobs:
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
allowed-failures: >-
build-windows-msi,
build-ubuntu-ssltests-awslc,
build-ubuntu-ssltests-openssl,
test-hypothesis,
Expand All @@ -764,22 +689,13 @@ jobs:
build-ubuntu,
build-ubuntu-ssltests-awslc,
build-ubuntu-ssltests-openssl,
build-android,
build-wasi,
test-hypothesis,
build-asan,
build-san,
cross-build-linux,
'
|| ''
}}
${{
!fromJSON(needs.build-context.outputs.run-windows-tests)
&& '
build-windows,
'
|| ''
}}
${{
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
&& '
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/reusable-wasi.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/reusable-windows-msi.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/reusable-windows.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/tail-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
target:
# Un-comment as we add support for more platforms for tail-calling interpreters.
# - i686-pc-windows-msvc/msvc
- x86_64-pc-windows-msvc/msvc
# - x86_64-pc-windows-msvc/msvc
# - aarch64-pc-windows-msvc/msvc
- x86_64-apple-darwin/clang
- aarch64-apple-darwin/clang
Expand All @@ -50,9 +50,9 @@ jobs:
# - target: i686-pc-windows-msvc/msvc
# architecture: Win32
# runner: windows-2022
- target: x86_64-pc-windows-msvc/msvc
architecture: x64
runner: windows-2022
# - target: x86_64-pc-windows-msvc/msvc
# architecture: x64
# runner: windows-2022
# - target: aarch64-pc-windows-msvc/msvc
# architecture: ARM64
# runner: windows-2022
Expand Down
1 change: 1 addition & 0 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ __pragma(warning(disable: 4201))
#include "cpython/pyfpe.h"
#include "cpython/tracemalloc.h"
#include "immutability.h"
#include "region.h"

#ifdef _MSC_VER
__pragma(warning(pop)) // warning(disable: 4201)
Expand Down
8 changes: 8 additions & 0 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ struct _typeobject {

/* A callback called before a type is frozen. */
prefreezeproc tp_prefreeze;

/* FIXME(regions): xFrednet: Just adding this field at the end will not
* fly on the main branch. We either want another indicator or proper
* integration, potentially using a union to support the old 32 bit
* `tp_flags` and the extended 64 bit ones. For now let's bikeshed this
* task and just use a new 32bit flag field appended here.
*/
uint32_t tp_flags2;
};

#define _Py_ATTR_CACHE_UNUSED (30000) // (see tp_versions_used)
Expand Down
2 changes: 2 additions & 0 deletions Include/cpython/tupleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# error "this header file must not be included directly"
#endif

#include "region.h"

typedef struct {
PyObject_VAR_HEAD
/* Cached hash. Initially set to -1. */
Expand Down
4 changes: 3 additions & 1 deletion Include/internal/pycore_cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PyCell_SwapTakeRef(PyCellObject *cell, PyObject *value, int* result)
}
else {
*result = -1;
PyRegion_RemoveLocalRef(value);
Py_XDECREF(value);
}
Py_END_CRITICAL_SECTION();
Expand All @@ -38,6 +39,7 @@ PyCell_SetTakeRef(PyCellObject *cell, PyObject *value)
{
int result = 0;
PyObject *old_value = PyCell_SwapTakeRef(cell, value, &result);
PyRegion_RemoveRef(cell, old_value);
Py_XDECREF(old_value);
return result;
}
Expand All @@ -51,7 +53,7 @@ PyCell_GetRef(PyCellObject *cell)
#ifdef Py_GIL_DISABLED
res = _Py_XNewRefWithLock(cell->ob_ref);
#else
res = Py_XNewRef(cell->ob_ref);
res = PyRegion_XNewRef(cell->ob_ref);
#endif
Py_END_CRITICAL_SECTION();
return res;
Expand Down
Loading
Loading