| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
bpo-33930: Fix typo in the test name. (GH-27733)
(cherry picked from commit f08e6d1bb3c5655f184af88c6793e90908bb6338)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
| |
objects (GH-27678) (GH-27721)
(cherry picked from commit bfc2d5a5c4550ab3a2fadeb9459b4bd948ff61a2)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae2e5f81e096c32839f211c68a749a4435a)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
* Always set the text attribute.
* Correct the offset attribute for non-ascii sources.
(cherry picked from commit 0cc6b5e559b8303b18fdd56c2befd900fe7b5e35)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
(cherry picked from commit 8f4ef3b019ce380022018587571b0f970e668de3)
|
|
|
|
|
|
| |
* Copy test_exceptions.test_unraisable() to
test_sys.UnraisableHookTest().
* Use catch_unraisable_exception() in test_coroutines,
test_exceptions, test_generators.
|
|
|
|
|
|
|
|
| |
(GH-10633)
The lineno and col_offset attributes of AST nodes for list comprehensions,
generator expressions and tuples are now point to the opening parenthesis or
square brace. For tuples without parenthesis they point to the position
of the first item.
|
|
|
|
|
|
| |
Also point to start of tokens in parsing errors.
Fixes bpo-34683
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.
|
|
|
|
| |
Subclasses such as IndentError and TabError should not have this message
applied.
|
|
|
|
|
|
|
| |
`PyArg_ParseTuple*` (#916)
Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.
|
|
|
| |
attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_unraisable() of test_exceptions expects that PyErr_WriteUnraisable(method)
fails on repr(method).
Before the previous change (7b8df4a5d81d), slot_tp_finalize() called
PyErr_WriteUnraisable() with a PyMethodObject. In this case, repr(method) calls
repr(self) which is BrokenRepr.__repr__() and the calls raises a new exception.
After the previous change, slot_tp_finalize() uses an unbound method: repr() is
called on a regular __del__() method which doesn't call repr(self). repr()
doesn't fail anymore.
PyErr_WriteUnraisable() doesn't call __repr__() anymore, so remove BrokenRepr
unit test.
|
| |
|
|\
| |
| |
| | |
invalid keyword args.
|
|/
|
|
| |
invalid keyword args.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This restores details lost in revision 097f4fda61a4 (since Python 3.3,
related to the new OSError subclasses). Further additions:
* Markup for attributes and constructor signature
* Explain "winerror" and "filename2"
* Extend test to check for filename2 defaulting to None
* Clarify that the constructor can return a subclass
I have intentionally left out any details of allowing more than five
arguments, or how the "args" attribute is set for four or more arguments.
These details seem to be dependent on the Python version and platform.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Patch by Martin Panter.
|
| |
|
| |
|
|
|
|
| |
initialized (closes #21134)
|
| |
|
|
|
|
|
|
| |
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.
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| | |
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
|
| |
| |
| |
| |
| | |
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
|
| | |
|
| |
| |
| |
| | |
ModuleNotFoundError.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ImportError.
The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.
This should allow for the common idiom of::
try:
import something
except ImportError:
pass
to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).
This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|