Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6d3964d
Add skeleton of _decimal module
msimacek Oct 5, 2026
def4c0f
Support native lists in GetListStorageNode
msimacek Oct 6, 2026
339eff3
Implement Decimal creation
msimacek Oct 6, 2026
5a1f93b
Implement Decimal context
msimacek Oct 6, 2026
034ae16
Implement basic Decimal arithmetics
msimacek Oct 8, 2026
c6dbbd3
Implement more slots and methods
msimacek Oct 9, 2026
0614887
Implement remaining decimal methods
msimacek Oct 9, 2026
571a323
Implement remaining decimal context methods
msimacek Oct 9, 2026
f7719b2
Add fast path for creating decimals from strings
msimacek Oct 12, 2026
4188a4b
Reduce graph size
msimacek Oct 12, 2026
b649537
Precompute powers of ten and limits
msimacek Oct 13, 2026
1be904e
Add fast path for Decimal to string
msimacek Oct 13, 2026
baa0d6b
Avoid string concatenations
msimacek Oct 13, 2026
9ee4a61
Cache decimal module state on the context
msimacek Oct 13, 2026
e3b4e10
Avoid relying on maxsize in decimal tests
msimacek Oct 14, 2026
a4ce555
Profile rounding mode in quantize
msimacek Oct 14, 2026
e2158c2
Add inline cache to contextvar lookup
msimacek Oct 14, 2026
ace8d31
Intern decimal rounding constants
msimacek Oct 14, 2026
c651aaa
Match CPython decimal argument names
msimacek Oct 14, 2026
4b9f2a8
Distinguish exact decimal construction from context conversion
msimacek Oct 14, 2026
290ca35
Retag decimal tests
msimacek Oct 14, 2026
ea1e548
Add tests for decimal module
msimacek Oct 14, 2026
a96e89d
Hardcode PyObject size when getting basicsize
msimacek Oct 14, 2026
3c8f93e
Fix a few math issues
msimacek Oct 14, 2026
f3837b3
Few math performance improvements
msimacek Oct 16, 2026
f20e009
Fix decimal grouping in C locale in float and decimal formatting
msimacek Oct 16, 2026
b4d760d
Optimize decimal formatting
msimacek Oct 16, 2026
98333a1
Add changelog entry
msimacek Oct 16, 2026
acb83a7
Fix invalid native class in tests
msimacek Oct 19, 2026
9c63e71
Fix C context type mismatch
msimacek Oct 19, 2026
4ca7e17
Add missing BoundaryCallData
msimacek Oct 19, 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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This changelog summarizes major changes between GraalVM versions of the Python
language runtime. The main focus is on user-observable behavior of the engine.

## Version 25.6
- New Java-based `decimal` module with significanlty better performance

## Version 25.5
- Added `select.poll()` on Linux and Mac OS
- Better Windows console support and Windows version reporting

## Version 25.4
* Remove BouncyCastle entirely. BouncyCastle was only needed for legacy RSA, DSA, and EC private keys versions 0 and 1. To support these from Python embeddings, BouncyCastle must now be explicitly enabled by adding the `org.graalvm.python:python-bouncycastle-support` Maven _and_ adding `bcprov-jdk18on`, `bcpkix-jdk18on`, and `bcutil-jdk18on` dependencies.

Expand Down
2 changes: 1 addition & 1 deletion graalpython/com.oracle.graal.python.cext/src/capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ PY_TRUFFLE_TYPE(PyClassMethodDescr_Type, "classmethod_descriptor", &
PY_TRUFFLE_TYPE(PyCode_Type, "code", &PyType_Type, sizeof(PyTypeObject)) \
PY_TRUFFLE_TYPE(PyCmpWrapper_Type, "KeyWrapper", &PyType_Type, sizeof(PyObject)) \
PY_TRUFFLE_TYPE(PyComplex_Type, "complex", &PyType_Type, sizeof(PyComplexObject)) \
PY_TRUFFLE_TYPE(PyContext_Type, "Context", &PyType_Type, sizeof(PyObject)) \
PY_TRUFFLE_TYPE(PyContext_Type, "_contextvars.Context", &PyType_Type, sizeof(PyObject)) \
PY_TRUFFLE_TYPE(PyContextToken_Type, "Token", &PyType_Type, sizeof(PyObject)) \
PY_TRUFFLE_TYPE(PyContextVar_Type, "ContextVar", &PyType_Type, sizeof(PyObject)) \
PY_TRUFFLE_TYPE(_PyCoroWrapper_Type, "coroutine_wrapper", &PyType_Type, sizeof(PyObject)) \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -42,6 +42,7 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

Expand Down Expand Up @@ -80,6 +81,26 @@ public void testHamtSetLookup() {
assertEquals(1, hamt.lookup(1, 1));
}

@Test
public void testLookupEntry() {
Hamt.Entry first = new Hamt.Entry(1, 1, 42);
Hamt.Entry collision = new Hamt.Entry(2, 1, 99);
Hamt.Entry otherBranch = new Hamt.Entry(3, 32, 88);
Hamt empty = new Hamt();
assertNull(empty.lookupEntry(1, 1));
Hamt values = empty.withEntry(first).withEntry(collision).withEntry(otherBranch);
assertSame(first, values.lookupEntry(1, 1));
assertSame(collision, values.lookupEntry(2, 1));
assertSame(otherBranch, values.lookupEntry(3, 32));
assertNull(values.lookupEntry(4, 1));
Hamt.Entry replacement = new Hamt.Entry(3, 32, 89);
Hamt changed = values.withEntry(replacement);
assertSame(replacement, changed.lookupEntry(3, 32));
assertSame(first, values.lookupEntry(1, 1));
assertEquals(89, changed.lookup(3, 32));
assertEquals(88, values.lookup(3, 32));
}

@Test
public void testBitmapExtremes() {
Hamt hamt = new Hamt();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def test_inherit_slots_with_managed_class(self):
tp_alloc="test_alloc",
tp_traverse="test_traverse",
tp_methods='{"call_tp_alloc", (PyCFunction)testslots_tp_alloc, METH_O | METH_STATIC, ""}',
tp_flags='Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC',
tp_flags='Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC',
tp_free='PyObject_GC_Del',
ready_code="ClassWithTpAllocType.tp_new = PyBaseObject_Type.tp_new;"
)
Expand Down
Loading
Loading