| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
statement.
|
|
|
|
| |
by a future statement.
|
| |
|
| |
|
| |
|
|
|
|
| |
own interfered with including Python.h. Remove Python's assert.h.
|
|
|
|
| |
redefinition problem.
|
|
|
|
| |
buffer overrun avoidance.
|
|
|
|
|
| |
perrdetail.token is unitialized when there is a syntax
error in a file.
|
|
|
|
| |
Ugly, but it works.
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
parsed correctly. Now they are.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is really stupid because it cannot be suppressed or altered using
the warning framework; that's because the warning framework is built
on Python interpreter internals, and the parser generator doesn't have
access to any of those (you cannot use anything of type PyObject * in
the parser).
But it's better than nothing, and implementing a proper check for this
appears to require modifying compile.c in a dozen places, for which I
don't have the stamina today. I promise we'll do better in 2.2a2.
At least it tells you the filename and line number (unlike the first
hack I considered :-).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that 'yield' is a keyword. This doesn't help test_generators at all! I
don't know why not. These things do work now (and didn't before this
patch):
1. "from __future__ import generators" now works in a native shell.
2. Similarly "python -i xxx.py" now has generators enabled in the
shell if xxx.py had them enabled.
3. This program (which was my doctest proxy) works fine:
from __future__ import generators
source = """\
def f():
yield 1
"""
exec compile(source, "", "single") in globals()
print type(f())
|
|
|
|
|
|
|
|
| |
the yield statement. I figure we have to have this in before I can
release 2.2a1 on Wednesday.
Note: test_generators is currently broken, I'm counting on Tim to fix
this.
|
|
|
|
| |
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
#115555.
The error from s_push() on stack overflow was -1, which was passed
through unchanged by push(), but not tested for by push()'s caller --
which only expected positive error codes. Fixed by changing s_push()
to return E_NOMEM on stack overflow. (Not quite the proper error code
either, but I can't be bothered adding a new E_STACKOVERFLOW error
code in all the right places.)
|
|
|
|
| |
Fred, check this!
|
|
|
|
|
|
|
|
| |
Add definitions of INT_MAX and LONG_MAX to pyport.h.
Remove includes of limits.h and conditional definitions of INT_MAX
and LONG_MAX elsewhere.
This closes SourceForge patch #101659 and bug #115323.
|
|
|
|
|
|
| |
and this breaks the AIX build with an INT_MAX redefinition error.
"config.h" is included in pgenheaders.h, so moving this down fixes the
problem.
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
| |
|
|
|
|
|
|
|
| |
fork. This solves the test_fork1 problem. (ceval.c, signalmodule.c,
intrcheck.c)
SourceForge: [ Patch #101226 ] make threading fork-safe
|
|
|
|
|
| |
Michael Hudson, and support in general for the augmented assignment syntax.
The graminit.c patch is large!
|
|
|
|
|
|
|
|
|
| |
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit. This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.
This closes the implementation portion of SourceForge patch #100893.
|
|
|
|
| |
This also avoids a warning in anal mode.
|
|
|
|
|
|
| |
fields token and expected must also be initialized, otherwise the
tests in parsetok() can generate uninitialized memory read errors.
This quiets an Insure warning.
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
| |
Leave the actual #define in for API compatibility.
|
|
|
|
|
|
|
| |
handlers "return void", according to ANSI C.
Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
Left RETSIGTYPE in the config stuff, because it's not clear to
me that others aren't relying on it (e.g., extension modules).
|
|
|
|
|
|
|
|
|
|
|
| |
#if RETSIGTYPE != void
That isn't C, and MSVC properly refuses to compile it.
Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h
to expand to the correct thing based on RETSIGTYPE. However,
only void is ANSI! Do we still have platforms that return int?
The Unix config mess appears to #define RETSIGTYPE by magic
without being asked to, so I assume it's "a problem" across
Unices still.
|
|
|
|
|
| |
to worry about systems that have signal-handlers return 'int' ? Not all of
the code does, though nothing will break because of it.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
|
|
|
|
|
|
|
| |
used for indentation related errors. This patch includes Ping's
improvements for indentation-related error messages.
Closes SourceForge patches #100734 and #100856.
|
| |
|
| |
|
| |
|
| |
|
| |
|