GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.13] gh-146615: Fix format specifiers in extension modules (GH-1466… · serhiy-storchaka/cpython@6e5c933

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Modules
    • _asynciomodule.c
    • _ssl.c
    • _zoneinfo.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Modules/_asynciomodule.c‎

Copy file name to clipboardExpand all lines: Modules/_asynciomodule.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,7 @@ enter_task(asyncio_state *state, PyObject *loop, PyObject *task)
19431943
PyExc_RuntimeError,
19441944
"Cannot enter into task %R while another " \
19451945
"task %R is being executed.",
1946-
task, item, NULL);
1946+
task, item);
19471947
Py_DECREF(item);
19481948
return -1;
19491949
}
@@ -2062,7 +2062,7 @@ _asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop,
20622062
self->task_log_destroy_pending = 0;
20632063
PyErr_Format(PyExc_TypeError,
20642064
"a coroutine was expected, got %R",
2065-
coro, NULL);
2065+
coro);
20662066
return -1;
20672067
}
20682068

Collapse file

‎Modules/_ssl.c‎

Copy file name to clipboardExpand all lines: Modules/_ssl.c
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3537,15 +3537,11 @@ _ssl__SSLContext_verify_flags_set_impl(PySSLContext *self, PyObject *value)
35373537
static int
35383538
set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what)
35393539
{
3540-
long v;
3540+
int v;
35413541
int result;
35423542

3543-
if (!PyArg_Parse(arg, "l", &v))
3543+
if (!PyArg_Parse(arg, "i", &v))
35443544
return -1;
3545-
if (v > INT_MAX) {
3546-
PyErr_SetString(PyExc_OverflowError, "Option is too long");
3547-
return -1;
3548-
}
35493545

35503546
switch(self->protocol) {
35513547
case PY_SSL_VERSION_TLS_CLIENT: /* fall through */
@@ -3580,7 +3576,7 @@ set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what)
35803576
break;
35813577
default:
35823578
PyErr_Format(PyExc_ValueError,
3583-
"Unsupported TLS/SSL version 0x%x", v);
3579+
"Unsupported TLS/SSL version 0x%x", (unsigned)v);
35843580
return -1;
35853581
}
35863582

@@ -3614,7 +3610,7 @@ set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what)
36143610
}
36153611
if (result == 0) {
36163612
PyErr_Format(PyExc_ValueError,
3617-
"Unsupported protocol version 0x%x", v);
3613+
"Unsupported protocol version 0x%x", (unsigned)v);
36183614
return -1;
36193615
}
36203616
return 0;
Collapse file

‎Modules/_zoneinfo.c‎

Copy file name to clipboardExpand all lines: Modules/_zoneinfo.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ load_data(zoneinfo_state *state, PyZoneInfo_ZoneInfo *self, PyObject *file_obj)
989989
}
990990

991991
if (!PyTuple_CheckExact(data_tuple)) {
992-
PyErr_Format(PyExc_TypeError, "Invalid data result type: %r",
992+
PyErr_Format(PyExc_TypeError, "Invalid data result type: %R",
993993
data_tuple);
994994
goto error;
995995
}

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.