Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04]
python-version: [pypy3.11, "graalpy-25.0", "3.x"]
python-version: [pypy3.11-nightly, "graalpy-25.0", "3.x"]
steps:
- uses: actions/checkout@v6
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
Loading