| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Patch #1357836:
Prevent an invalid memory read from test_coding in case the done flag is set.
In that case, the loop isn't entered. I wonder if rather than setting
the done flag in the cases before the loop, if they should just exit early.
This code looks like it should be refactored.
Backport candidate (also the early break above if decoding_fgets fails)
|
| |
|
|
|
|
|
| |
Free coding spec (cs) if there was an error to prevent mem leak.
Maybe backport candidate.
[Bugfix seems applicable to 2.4 to me. --amk]
|
| |
|
|
|
| |
Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
Also bug #1435487 (dup).
|
| |
|
|
|
| |
Apply SF patch #1101726: Fix buffer overrun in tokenizer.c when a source file
with a PEP 263 encoding declaration results in long decoded line.
|
| |
|
|
|
|
|
| |
modes like non-interactive modes. This allows for non-latin-1 users
to write unicode strings directly and sets Japanese users free from
weird manual escaping <wink> in shift_jis environments.
(Reviewed by Martin v. Loewis)
|
| |
|
|
|
| |
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
|
| | |
|
| |
|
|
|
|
| |
Remove the usage of PyErr_WarnExplicit() since this could cause
sensitive information from the source files to appear in e.g.
log files.
|
| |
|
|
| |
mark. Added unit test.
|
| |
|
|
|
| |
Ensure that the 'size' arg is correctly passed to the encoding reader to
prevent buffer overflows.
|
| | |
|
| |
|
|
| |
Cast param to isalnum() to int.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The
difference is that the latter requires a to be a tuple; the former
allows other values and wraps them in a tuple if necessary; it
involves two more levels of C function calls to accomplish all that.)
|
| |
|
|
|
| |
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
be longer than the old string.
|
| | |
|
| |
|
|
| |
this was trying to assert, but the name it referenced didn't exist.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.
See PEP278 for details.
|
| |
|
|
| |
Consequences for Jython still unknown (but raised on Jython-Dev).
|
| |
|
|
| |
PyTokenizer_Get: error if exponent contains no digits (3e, 2.0e+, ...).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces:
- A new operator // that means floor division (the kind of division
where 1/2 is 0).
- The "future division" statement ("from __future__ import division)
which changes the meaning of the / operator to implement "true
division" (where 1/2 is 0.5).
- New overloadable operators __truediv__ and __floordiv__.
- New slots in the PyNumberMethods struct for true and floor division,
new abstract APIs for them, new opcodes, and so on.
I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.
Not yet implemented are warnings (default off) when / is used with int
or long arguments.
This has been on display since 7/31 as SF patch #443474.
Flames to /dev/null.
|
| |
|
|
| |
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
|
| |
|
|
| |
This should match the situation in the 1.6b1 tree.
|
| |
|
|
|
| |
Michael Hudson, and support in general for the augmented assignment syntax.
The graminit.c patch is large!
|
| |
|
|
|
|
| |
Work around intrcheck.c's desire to pass 'PyErr_CheckSignals' to
'Py_AddPendingCall' by providing a (static) wrapper function that has the
right number of arguments.
|
| |
|
|
|
|
|
| |
used for indentation related errors. This patch includes Ping's
improvements for indentation-related error messages.
Closes SourceForge patches #100734 and #100856.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
| | |
|
| |
|
|
|
| |
tab-setting magic much smarter, more correct, and more easily
extensible.
|
| |
|
|
| |
(Unicode and raw Unicode).
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
no difference, but avoids triggering an optimizer bug in the AIX
compiler where the loop unrolling does the wrong thing...
|
| |
|
|
|
| |
variable from a pointer to an index, so a realloc() of the buffer
won't disturb it. Problem found by Vladimir Marangozov.
|
| |
|
|
| |
'\377' for EOF.
|
| | |
|