| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
(GH-11077) (GH-11106)
(cherry picked from commit 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-5337) (#6536)
When an unawaited coroutine is collected very late in shutdown --
like, during the final GC at the end of PyImport_Cleanup -- then it
was triggering an interpreter abort, because we'd try to look up the
"warnings" module and not only was it missing (we were prepared for
that), but the entire module system was missing (which we were not
prepared for).
I've tried to fix this at the source, by making the utility function
get_warnings_attr robust against this in general. Note that it already
has the convention that it can return NULL without setting an error,
which is how it signals that the attribute it was asked to fetch is
missing, and that all callers already check for NULL returns.
There's a similar check for being late in shutdown at the top of
warn_explicit, which might be unnecessary after this fix, but I'm not
sure so I'm going to leave it..
(cherry picked from commit dba976b8a28d6e5daa66ef31a6a7c694a9193f6a)
Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
|
|
|
|
|
|
| |
(GH-3803) (#3829)
(forgot to remove it in GH-3219)
(cherry picked from commit 8b4ff53c440dfcde40fbeb02c5e666c85190528f)
|
|
|
|
|
| |
warnings.warn_explicit. (GH-3219) (#3775)
(cherry picked from commit 91fb0afe181986b48abfc6092dcca912b39de51d)
|
|
|
|
|
| |
bad __name__ global. (GH-3717) (#3730)
(cherry picked from commit 5d3e80021ab33360191eb0fbff34e0246c913884)
|
|
|
|
|
|
| |
warnings.defaultaction. (GH-3496) (#3509)
Patch by Oren Milman..
(cherry picked from commit 9d984fd2b097c8c29479d1c3eb740995fe1ccb0d)
|
|
|
|
|
| |
is not a dictionary. (GH-3485). (#3494)
(cherry picked from commit 252033d50effa08046ac34fcc406bc99796ab88b)
|
|\
| |
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| |
| |
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
|\ \
| |/
| |
| | |
in places where Py_DECREF was used.
|
| |
| |
| |
| | |
in places where Py_DECREF was used.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
Don't check if the dict key exists before getting the key. Instead get the key
and handle error.
|
| |
| |
| |
| |
| |
| | |
Issue #26592: _warnings.warn_explicit() now tries to import the warnings module
(Python implementation) if the source parameter is set to be able to log the
traceback where the source was allocated.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26604:
* Add a new optional source parameter to _warnings.warn() and warnings.warn()
* Modify asyncore, asyncio and _pyio modules to set the source parameter when
logging a ResourceWarning warning
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26567:
* Add a new function PyErr_ResourceWarning() function to pass the destroyed
object
* Add a source attribute to warnings.WarningMessage
* Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where
source object was allocated.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26568: add new _showwarnmsg() and _formatwarnmsg() functions to the
warnings module.
The C function warn_explicit() now calls warnings._showwarnmsg() with a
warnings.WarningMessage as parameter, instead of calling warnings.showwarning()
with multiple parameters.
_showwarnmsg() calls warnings.showwarning() if warnings.showwarning() was
replaced. Same for _formatwarnmsg(): call warnings.formatwarning() if it was
replaced.
|
|/
|
|
| |
private functions.
|
|
|
|
| |
macro Py_SETREF.
|
|
|
|
| |
by the warnings.warn(stacklevel=) parameter.
|
|\ |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
|
|\ \ \
| |/ /
| | |
| | | |
modified.
|
| | |
| | |
| | |
| | | |
modified.
|
|/ /
| |
| |
| | |
Initial patch by Phil Elson.
|
| |
| |
| |
| |
| |
| |
| | |
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
|
| |
| |
| |
| |
| |
| |
| | |
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
|
| |
| |
| |
| |
| |
| | |
shutdown
After more tests, I now think that it is the safest option.
|
| |
| |
| |
| | |
call a Python function with an exception set
|
| |
| |
| |
| | |
with an exception set
|
| |
| |
| |
| |
| | |
Warnings may be emitted during Python shutdown, like "unclosed file XXX".
During shutdown, globals()['__main__'] may be None.
|
| |
| |
| |
| | |
characters.
|
| |
| |
| |
| |
| |
| |
| | |
finalization.
sys.argv is set to None during Python finalization: add PyList_Check() to avoid
a crash in PyList_Size().
|
| |
| |
| |
| | |
filenames anymore on Windows.
|
| |
| |
| |
| |
| |
| |
| |
| | |
_Py_DisplaySourceLine()
For example, _PyGC_DumpShutdownStats() calls PyErr_WarnExplicitFormat() while
the import machinery does not work anymore, _Py_DisplaySourceLine() fails when
trying to import the io module.
|
|/
|
|
|
|
| |
stderr remains usable.
(should fix Windows buildbot failures on test_gc)
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
And PyUnicode_GetSize() => PyUnicode_GetLength()
|
| |
| |
| |
| | |
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
|
| | |
|