Skip to content

Commit

Permalink
Merge python#31
Browse files Browse the repository at this point in the history
31: Only warn in file init r=ltratt a=nanjekyejoannah

Fixes python#29 

Co-authored-by: Joannah Nanjekye <jnanjeky@unb.ca>
  • Loading branch information
bors[bot] and nanjekyejoannah authored May 22, 2023
2 parents b6f80d7 + 2e6fb73 commit d888130
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,11 +1504,6 @@ Return the octal representation of an integer or long integer.");
static PyObject *
builtin_open(PyObject *self, PyObject *args, PyObject *kwds)
{
if (PyErr_WarnPy3k("The builtin 'open()' function is not supported in 3.x, "
"use the 'io.open()' function instead with the encoding keyword argument", 1) < 0){
return NULL;
}

return PyObject_Call((PyObject*)&PyFile_Type, args, kwds);
}

Expand Down

0 comments on commit d888130

Please sign in to comment.