| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
_PyErr_ChainExceptions() function.
|
| |
|
|
|
|
|
|
| |
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
|
|
|
|
|
|
|
| |
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
|
|
|
|
|
|
|
| |
_PyUnicode_CompareWithId() is faster than PyUnicode_CompareWithASCIIString()
when both strings are equal and interned.
Add also _PyId_builtins identifier for "builtins" common string.
|
|
|
|
|
|
|
| |
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
|
| |
|
| |
|
|
|
|
|
| |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
|
|
|
| |
filenames anymore on Windows.
|
|
|
|
|
|
|
|
| |
* Catch PyFile_WriteString() and PyFile_WriteObject() errors
* Clear the current exception on _PyObject_GetAttrId() failure
* Use PyUnicode_CompareWithASCIIString() and PyFile_WriteObject() instead of
_PyUnicode_AsString() and strcmp() to avoid Unicode encoding error. stderr
has a more tolerant error handler than utf-8/strict.
|
|
|
|
| |
before PyExc_MemoryError has been initialized by _PyExc_Init()
|
|
|
|
|
|
|
|
|
|
|
|
| |
with an assertion error if they are called with an exception set
(PyErr_Occurred()).
If these functions are called with an exception set, the exception may be
cleared and so the caller looses its exception.
Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to
check if the function succeed with no exception set, or the function failed
with an exception set.
|
| |
|
|
|
|
|
|
| |
failure
PyObject_IsSubclass() can fail and raise a new exception!
|
|
|
|
| |
fails with an assertion error
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.
Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.
Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
|
|
|
|
| |
Patch by Serhiy Storchaka.
|
|
|
|
| |
Patch by Alon Horev with update by Alexey Kachayev.
|
|
|
|
| |
Patch by Stefan Behnel.
|
| |
|
| |
|
|
|
|
|
|
| |
Add INCREFs, fix args->kwargs, and a second args==NULL check was removed,
left over from a merger with another function. Instead, checking msg==NULL
does what that used to do in a roundabout way.
|
|
|
|
| |
function
|
|
|
|
|
|
|
|
| |
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).
Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
|
|
|
|
|
|
| |
instead of surrogateescape
So it would be possible to support more error handlers later.
|
|
|
|
| |
UTF-8
|
| |
|
|
|
|
|
|
|
|
| |
works properly.
PyErr_SetFromErrnoWithFilenameObject() was already fixed by the changeset
793c75177d28. This commit fixes PyErr_SetExcFromWindowsErrWithFilenameObject(),
used on Windows.
|
| |
|
| |
|
|
|
|
| |
"except" works properly.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
filesystem encoding instead of UTF-8.
|
|
|
|
| |
data (including local variables caught in the stack trace) alive infinitely.
|
|
|
|
|
|
|
|
| |
is silent by default,
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
|
|
|
|
| |
PyUnicode_FromString(), to decode the filename.
|
| |
|
| |
|
|
|
|
|
|
|
| |
would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite
recursion.
Fixes issue 3605.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
|
|
|
| |
PyUnicode_DecodeFSDefault() instead of PyUnicode_FromString()
|
| |
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77088 | georg.brandl | 2009-12-28 09:34:58 +0100 (Mo, 28 Dez 2009) | 1 line
#7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72698 | hirokazu.yamamoto | 2009-05-17 11:52:09 +0900 | 1 line
Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
........
r72699 | hirokazu.yamamoto | 2009-05-17 11:58:36 +0900 | 1 line
Added NEWS for r72698.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71024 | georg.brandl | 2009-04-02 04:47:44 +0200 (Do, 02 Apr 2009) | 4 lines
In PyErr_GivenExceptionMatches, temporarily bump the recursion
limit, so that in the most common case PyObject_IsSubclass will
not raise a recursion error we have to ignore anyway.
........
r71058 | georg.brandl | 2009-04-02 20:09:04 +0200 (Do, 02 Apr 2009) | 3 lines
PyErr_NormalizeException may not set an error, so convert the PyErr_SetObject
call on hitting the recursion limit into just assigning it to the arguments provided.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from inside
an 'except' clause), the exception __context__ would be reset to None.
This crases the interpreter if this precisely happens inside PyErr_SetObject.
- now the __context__ is properly preserved
- in any case, PyErr_SetObject now saves the current exc_value in a local variable, to
avoid such crashes in the future.
Reviewer: Antoine Pitrou.
|