Skip to content
Draft
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-24.04]
python-version: [3.9, '3.10', pypy3.11, graalpy-24.2,
python-version: [3.9, '3.10', pypy3.11-nightly, graalpy-24.2,
3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t]
runs-on: ${{ matrix.os }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-24.04]
python-version: [pypy3.11, "3.x", 3.14]
python-version: [pypy3.11-nightly, "3.x", 3.14]
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion fmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ format_long_internal(MPZ_Object *value, const InternalFormatSpec *format)
Py_ssize_t prefix = 0;
NumberFieldWidths spec;
int32_t x = -1;
gmp_state *state = PyType_GetModuleState(Py_TYPE(value));

/* Locale settings, either from the actual locale or
from a hard-code pseudo-locale */
Expand Down Expand Up @@ -1025,7 +1026,7 @@ format_long_internal(MPZ_Object *value, const InternalFormatSpec *format)
if (format->sign != '+' && format->sign != ' '
&& format->width == -1 && format->type != 'n'
&& !format->thousands_separators
&& MPZ_CheckExact(value))
&& MPZ_CheckExact(state, value))
{
/* Fast path */
return MPZ_to_str(value, base, format->alternate ? OPT_PREFIX : 0);
Expand Down
Loading