| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
go (way) over, but those are harder to fix without suffering in readability.
|
| |
|
|
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
| |
|
| |
|
|
|
|
| |
signed chars in frameobject.c which can occur with opcodes > 127
|
|
|
|
| |
masked by a generic one with the message "unpack non-sequence".
|
|
|
|
| |
sq_ass_slice instead of the sq_slice slot.
|
| |
|
| |
|
|
|
|
|
|
|
| |
I can't think of an easy way to test this behavior. It only occurs
when the file system default encoding and the interpreter default
encoding are different, such that you can open the file but not decode
its name.
|
|
|
|
|
|
|
| |
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError. Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
|
|
|
|
| |
the PREDICT macros.
|
|
|
|
| |
instead of just a dictionary. (backporting...)
|
|
|
|
|
|
|
| |
sys.callstats() match its docstring.
Backport candidate. Though it's an API change, this is a pretty obscure
portion of the API.
|
|
|
|
|
|
| |
Verify that PyEval_Get{Globals,Locals} returned valid pointers.
Klocwork 231-232
|
|
|
|
|
|
|
| |
I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
|
|
|
|
| |
were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
|
|
|
|
| |
Klocwork #233
|
| |
|
| |
|
|
|
|
| |
at the NeedForSpeed sprint.
|
|
|
|
|
|
| |
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
|
|
|
|
| |
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
|
|
|
|
|
| |
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
set_exc_info(), reset_exc_info(): By exploiting the
likely (who knows?) invariant that when an exception's
`type` is NULL, its `value` and `traceback` are also NULL,
save some cycles in heavily-executed code.
This is a "a kronar saved is a kronar earned" patch: the
speedup isn't reliably measurable, but it obviously does
reduce the operation count in the normal (no exception
raised) path through PyEval_EvalFrameEx().
The tim-exc_sanity branch tries to push this harder, but
is still blowing up (at least in part due to pre-existing
subtle bugs that appear to have no other visible
consequences!).
Not a bugfix candidate.
|
|
|
|
| |
but Trent's copy thinks that it's an anachronism...
|
|
|
|
| |
LOCAL inlining; also added some missing whitespace
|
|
|
|
|
| |
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
|
|
|
|
| |
with PyObject_CallFunctionObjArgs, which is 30% faster.
|
| |
|
|
|
|
| |
if a continue inside a try failed.
|
|
|
|
|
| |
is NULL, so there's no reason to do anything with it. In the second case,
we know frame->f_exc_type is not NULL, so we can just do an INCREF.
|
| |
|
|
|
|
| |
was having funny effects when called on >2Gb strings ;P
|
| |
|
|
|
|
| |
in Python/Python-ast.c. Not sure what to do about those.
|
|
|
|
|
|
|
|
| |
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
|
|
|
|
|
|
| |
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
|
|
|
|
| |
(reviewed by Neal Norwitz)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New semantics for __exit__() -- it must re-raise the exception
if type is not None; the with-statement itself doesn't do this.
(See the updated PEP for motivation.)
- Added context managers to:
- file
- thread.LockType
- threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore}
- decimal.Context
- Added contextlib.py, which defines @contextmanager, nested(), closing().
- Unit tests all around; bot no docs yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- IMPORT_NAME takes an extra argument from the stack: the relativeness of
the import. Only passed to __import__ when it's not -1.
- __import__() takes an optional 5th argument for the same thing; it
__defaults to -1 (old semantics: try relative, then absolute)
- 'from . import name' imports name (be it module or regular attribute)
from the current module's *package*. Likewise, 'from .module import name'
will import name from a sibling to the current module.
- Importing from outside a package is not allowed; 'from . import sys' in a
toplevel module will not work, nor will 'from .. import sys' in a
(single-level) package.
- 'from __future__ import absolute_import' will turn on the new semantics
for import and from-import: imports will be absolute, except for
from-import with dots.
Includes tests for regular imports and importhooks, parser changes and a
NEWS item, but no compiler-package changes or documentation changes.
|
|
|
|
|
| |
exceptions. This was triggered when 'warnings' had a filter set to "error"
that caught the string exception deprecation warning.
|