| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
characters. (GH-21035)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove:
* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
|
|
|
| |
No longer import the re module if it is not needed.
|
|
|
|
|
| |
test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python now gets the absolute path of the script filename specified on
the command line (ex: "python3 script.py"): the __file__ attribute of
the __main__ module, sys.argv[0] and sys.path[0] become an absolute
path, rather than a relative path.
* Add _Py_isabs() and _Py_abspath() functions.
* _PyConfig_Read() now tries to get the absolute path of
run_filename, but keeps the relative path if _Py_abspath() fails.
* Reimplement os._getfullpathname() using _Py_abspath().
* Use _Py_isabs() in getpath.c.
|
|
|
|
|
| |
Ensure custom formatwarning function can receive line as positional argument.
Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
|
|
|
|
|
| |
The warnings module now suggests to enable tracemalloc if the source
is specified, tracemalloc module is available, but tracemalloc is not
tracing memory allocations.
|
|
|
| |
Fixed also testing the "always" warning filter.
|
|
|
| |
Add missing warning filter to test_exec_filename().
|
|
|
| |
More consistent with how other parts of Python find the filename (e.g. tracebacks and pdb).
|
|
|
|
| |
Fix test_warnings.test_module_globals() when python3 is run with
-Werror.
|
|
|
| |
Don't crash on warnings.warn_explicit() if module_globals is not a dict.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- primary change is to add a new default filter entry for
'default::DeprecationWarning:__main__'
- secondary change is an internal one to cope with plain
strings in the warning module's internal filter list
(this avoids the need to create a compiled regex object
early on during interpreter startup)
- assorted documentation updates, including many more
examples of configuring the warnings settings
- additional tests to ensure that both the pure Python and
the C accelerated warnings modules have the expected
default configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than supporting dev mode directly in the warnings module, this
instead adjusts the initialisation code to add an extra 'default'
entry to sys.warnoptions when dev mode is enabled.
This ensures that dev mode behaves *exactly* as if `-Wdefault` had
been passed on the command line, including in the way it interacts
with `sys.warnoptions`, and with other command line flags like `-bb`.
Fix also bpo-20361: have -b & -bb options take precedence over any
other warnings options.
Patch written by Nick Coghlan, with minor modifications of Victor Stinner.
|
|
|
|
|
|
|
|
| |
(#4534)
* Add most_recent_first parameter to tracemalloc.Traceback.format to allow
reversing the order of the frames in the output
* Reversed default sorting of tracemalloc.Traceback frames
* Allowed negative limit, truncating from the other side.
|
|
|
|
|
|
|
| |
The warnings module doesn't leak memory anymore in the hidden
warnings registry for the "ignore" action of warnings filters.
The warn_explicit() function doesn't add the warning key to the
registry anymore for the "ignore" action.
|
|
|
|
| |
__name__ global. (#3717)
|
|
|
|
| |
warnings.warn_explicit. (#3219)
|
|
|
|
|
| |
warnings.defaultaction. (#3496)
Patch by Oren Milman.
|
|
|
|
| |
not a dictionary. (#3485)
|
| |
|
|
|
|
| |
bpo-26568, bpo-30812: Fix test_showwarnmsg_missing(): restore the
attribute after removing it.
|
| |
|
|
|
|
| |
The fix for catch_warnings() is the issue #28835 (not the issue #28089).
|
|
|
|
|
| |
Issue #28089: Fix a regression introduced in warnings.catch_warnings(): call
warnings.showwarning() if it was overriden inside the context manager.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
head and fix whitespace.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Check the user warning in test_error_after_default() to not pollute the output,
and check the warning logged into stderr.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Based on patch by Alex Shkop.
|
| |
| |
| |
| | |
Use -Wd comment line option to log the ResourceWarning.
|
| |
| |
| |
| | |
Use -Wd comment line option to log the ResourceWarning.
|
|\ \
| |/
| |
| |
| |
| | |
Issue #21925: warnings.formatwarning() now catches exceptions when calling
linecache.getline() and tracemalloc.get_object_traceback() to be able to log
ResourceWarning emitted late during the Python shutdown process.
|
| |
| |
| |
| |
| |
| | |
Issue #21925: warnings.formatwarning() now catches exceptions on
linecache.getline(...) to be able to log ResourceWarning emitted late during
the Python shutdown process.
|
| |
| |
| |
| |
| | |
test_warnings: only run test_improper_option() and test_warnings_bootstrap()
once. The unit test doesn't depend on self.module.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Issue #26567: normalize newlines in test_tracemalloc.
|
| |
| |
| |
| | |
Issue #26567.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|