Sourced from actions/setup-python's releases.
v7.0.0
What's Changed
Enhancements
- Migrate to ESM and upgrade dependencies by
@priyagupta108in actions/setup-python#1330- Pin SHA commits and update docs with latest versions by
@HarithaVattikutiin actions/setup-python#1338- Remove the pip-install input by
@gowridurgadin actions/setup-python#1336Bug Fix
- Fix to Classify stderr warning messages as warnings instead of errors in annotations by
@lmvysakhin actions/setup-python#1335- Validate and retry manifest fetch to prevent silent failures by
@priyagupta108in actions/setup-python#1332Dependency Upgrade
- Bump certifi from 2020.6.20 to 2024.7.4 in /tests/data by
@dependabotin actions/setup-python#1328- Remove EOL Python versions and Bumps numpy text fixture by
@priya-kinthaliin actions/setup-python#1333- Upgrade
@actions/cacheto 6.2.0 by@philip-gaiin actions/setup-python#1337New Contributors
@lmvysakhmade their first contribution in actions/setup-python#1335@philip-gaimade their first contribution in actions/setup-python#1337Full Changelog: https://github.com/actions/setup-python/compare/v6...v7.0.0
v6.3.0
What's Changed
Enhancement
- Add RHEL support and include Linux distro in cache keys by
@priyagupta108in actions/setup-python#1323- Fix pip cache error handling on Windows by
@priyagupta108in actions/setup-python#1040Dependency update
- Upgrade minimatch from 3.1.2 to 3.1.5 by
@dependabotin actions/setup-python#1281- Upgrade actions dependencies by
@gowridurgadwith@Copilotin actions/setup-python#1303- Upgrade
@actions/cacheto 5.1.0, log cache write denied by@jasonginin actions/setup-python#1324- Upgrade dependency versions and test workflow configuration by
@HarithaVattikutiin actions/setup-python#1322Documentation
- Update advanced-usage.md by
@Dunky-Zin actions/setup-python#811New Contributors
@gowridurgadwith@Copilotmade their first contribution in actions/setup-python#1303@jasonginmade their first contribution in actions/setup-python#1324@Dunky-Zmade their first contribution in actions/setup-python#811Full Changelog: https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0
v6.2.0
What's Changed
Dependency Upgrades
- Upgrade dependencies to Node 24 compatible versions by
@salmanmkcin actions/setup-python#1259
... (truncated)
5fda3b9
Pin SHA commits and update docs with latest versions (#1338)4ab7e95
Merge pull request #1337
from actions/philip-gai/bump-actions-cache-6-2-00f3a009
Remove the pip-install input (#1336)f8cf429
Migrate to ESM and upgrade dependencies (#1330)54baeea
Validate and retry manifest fetch to prevent silent failures (#1332)c709277
Annotation code fix (#1335)6849080
remove EOL Python versions and Bumps numpy text fixture (#1333)0903b46
Bump certifi from 2020.6.20 to 2024.7.4 in /tests/data
(#1328)A "producer" allocator owns the exported batch; if the C Data release callback fires, the
+ * producer drains to zero. A too-small consumer allocator forces an OOM part-way through the
+ * import. The test asserts the producer drains, confirming the release callback fired despite the
+ * failure.
+ */
+final class ImportOutOfMemoryTest {
+ private static final int ROWS = 1024;
+ private static final int VALUE_BYTES = 256;
+ private static final int COLUMNS = 4;
+ // Far smaller than the exported batch, so the import OOMs part-way through the buffers.
+ private static final long TINY_LIMIT = 16 * 1024;
+
+ private RootAllocator root;
+
+ @BeforeEach
+ public void setUp() {
+ root = new RootAllocator(Long.MAX_VALUE);
+ }
+
+ @AfterEach
+ public void tearDown() {
+ root.close();
+ }
+
+ @Test
+ public void importOomDoesNotLeakExportedArray() {
+ // "producer" owns only the exported batch buffers; the C Data struct containers live on a
+ // separate allocator (they are consumed/closed by import, which would otherwise muddy the
+ // producer's balance). So producer draining to zero is an exact signal that the array's release
+ // callback fired.
+ try (BufferAllocator producer = root.newChildAllocator("producer", 0, Long.MAX_VALUE);
+ BufferAllocator structs = root.newChildAllocator("structs", 0, Long.MAX_VALUE)) {
+ try (ArrowArray array = ArrowArray.allocateNew(structs);
+ ArrowSchema schema = ArrowSchema.allocateNew(structs)) {
+ exportBatch(producer, array, schema);
+ assertTrue(
+ producer.getAllocatedMemory() > 0, "producer holds the exported batch before import");
+
+ // A consumer allocator far too small to hold the batch: the import throws part-way through.
+ try (BufferAllocator consumer = root.newChildAllocator("consumer", 0, TINY_LIMIT);
+ CDataDictionaryProvider provider = new CDataDictionaryProvider()) {
+ Schema importSchema = Data.importSchema(consumer, schema, provider);
+ try (VectorSchemaRoot importRoot = VectorSchemaRoot.create(importSchema, consumer)) {
+ Exception thrown =
+ assertThrows(
+ Exception.class,
+ () -> Data.importIntoVectorSchemaRoot(consumer, array, importRoot, provider));
+ assertTrue(
+ hasOutOfMemoryCause(thrown),
+ "mid-import failure must be an allocator OOM: " + thrown);
+ }
+ }
+
+ // The array's release callback must have fired despite the mid-import OOM, freeing the
+ // whole exported batch. On the unfixed retain-before-wrap code the batch is stranded.
+ assertEquals(
+ 0L,
+ producer.getAllocatedMemory(),
+ "import OOM leaked the exported batch (producer not drained)");
+ }
+ }
+ }
+
+ /** True if {@code t} is, or is caused by, an Arrow {@link OutOfMemoryException}. */
+ private static boolean hasOutOfMemoryCause(Throwable t) {
+ for (Throwable cause = t; cause != null; cause = cause.getCause()) {
+ if (cause instanceof OutOfMemoryException) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Builds a wide multi-column VarChar batch on {@code alloc} and exports it into the C structs.
+ */
+ private void exportBatch(BufferAllocator alloc, ArrowArray array, ArrowSchema schema) {
+ byte[] value = new byte[VALUE_BYTES];
+ for (int i = 0; i < value.length; i++) {
+ value[i] = (byte) 'x';
+ }
+ List