Commit Graph

33254 Commits

Author SHA1 Message Date
Neal Norwitz
edc8f1366a Add directory which contains known ref leaks. Some of these are likely to be system dependent (like test_gestalt). 2006-02-28 19:02:05 +00:00
Jeremy Hylton
99b4ee6373 Use simple PyList to implement list of PyObject pointers 2006-02-28 18:52:28 +00:00
Tim Peters
400cbc3a44 Set EOL style to native. 2006-02-28 18:44:41 +00:00
Tim Peters
85b1052efe Another bit of unconstification. 2006-02-28 18:33:35 +00:00
Tim Peters
710ab3b5f8 Whitespace normalization. 2006-02-28 18:30:36 +00:00
Jeremy Hylton
08533fdad6 Tabify 2006-02-28 18:29:00 +00:00
Neal Norwitz
14ca327f99 Instead of printing the exception when you interrupt a test (Ctrl-C),
print the status so far and suppress printing the exception (but still exit).
2006-02-28 18:05:43 +00:00
Jeremy Hylton
a829313d7b Remove asdl_seq_APPEND() and simplify asdl seq implementation.
Clarify intended use of set_context() and check errors at all call sites.
2006-02-28 17:58:27 +00:00
Neal Norwitz
03bdedd574 Update comments 2006-02-28 17:53:58 +00:00
Jeremy Hylton
77f1bb2778 Real arena implementation
Replace the toy arena implementation with a real one,
based on allocating 8K chunks of memory by default.
2006-02-28 17:53:04 +00:00
Neal Norwitz
77e42fff31 George Yoshida points out that the special characters
from Tools/compiler/ast.txt are not used anywhere else in asttable.txt.
So remove "\&".
2006-02-28 17:46:48 +00:00
Jeremy Hylton
7b03bade2b Test case to cover subscription bug from SF 1333982 2006-02-28 17:46:23 +00:00
Thomas Wouters
fb609f4215 Wups, add NEWS item I'd written but not checked in. 2006-02-28 16:37:25 +00:00
Thomas Wouters
f7f438ba3b SF patch #1438387, PEP 328: relative and absolute imports.
- 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.
2006-02-28 16:09:29 +00:00
Fredrik Lundh
d3188639c3 markup glitch (spotted by George Yoshida) 2006-02-28 12:11:57 +00:00
Anthony Baxter
d615110949 XXX something for amk's attention 2006-02-28 07:21:42 +00:00
Guido van Rossum
baf3eb2410 Forgot to explain the effect of the new opcode.
Sigh -- we really should have one place for all opcode metadata.
2006-02-28 00:40:16 +00:00
Martin v. Löwis
b003f041bb Generate return statement. 2006-02-28 00:37:04 +00:00
Martin v. Löwis
ace990cf5a Regenerate. 2006-02-28 00:32:31 +00:00
Guido van Rossum
7ad94f011e Update the compiler package to compile the with-statement.
Jeremy, please review!
2006-02-28 00:32:16 +00:00
Martin v. Löwis
40d8459dbf Add generation of the version. 2006-02-28 00:30:54 +00:00
Neal Norwitz
17e59053fd Ignore resource file 2006-02-28 00:26:30 +00:00
Martin v. Löwis
eae93b763c Add support for version field on Modules 2006-02-28 00:12:47 +00:00
Brett Cannon
a7446e3438 Check the return code for PyErr_Warn() when warning about raising string
exceptions.  This was triggered when 'warnings' had a filter set to "error"
that caught the string exception deprecation warning.
2006-02-27 23:39:10 +00:00
Tim Peters
a7444f47b2 PyErr_ProgramText(): Grrrrrr.
In a Windows debug build, trying to open a file using
an empty string as the name causes assertion death
inside MS's C runtime code.  We probably need to worm
around that in many places.  I'm worming around it here
to stop the new test_with.py from assert-dying in the
Windows debug build (it calls compile() with an empty
string for "the file name", which indirectly leads to
C-level code in Python trying to fopen("", "r")).
2006-02-27 23:29:46 +00:00
Neal Norwitz
0023a2f858 Finish removal of CO_GENERATOR_ALLOWED. 2006-02-27 23:24:48 +00:00
Martin v. Löwis
1d519e4625 unconst. 2006-02-27 23:10:11 +00:00
Thomas Wouters
1175c43a12 Clarify C-style exception handling with proper label name. 2006-02-27 22:49:54 +00:00
Thomas Wouters
bfe51ea5c8 Fix assertions. 2006-02-27 22:48:55 +00:00
Guido van Rossum
c2e20744b2 PEP 343 -- the with-statement.
This was started by Mike Bland and completed by Guido
(with help from Neal).

This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.

There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
2006-02-27 22:32:47 +00:00
Martin v. Löwis
5fec904f84 Start of a source code unparser. 2006-02-27 21:41:03 +00:00
Neal Norwitz
9aaad88393 Even though we don't currently use unicode or complex numbers in the test,
be complete when when checking types.

Yield cannot be tested outside a function, so add a comment to that effect.
2006-02-27 21:08:23 +00:00
Brett Cannon
be66e943c2 Don't filter out OverflowWarning; should be a test failure if it is raised by
the interpreter in 2.5 .
2006-02-27 20:03:56 +00:00
Martin v. Löwis
59977a677c Make or_test similar to test, not testlist. 2006-02-27 19:57:01 +00:00
Martin v. Löwis
415ed937c2 Skip over doc strings. 2006-02-27 19:56:30 +00:00
Thomas Wouters
b9eb5510e6 Convert array.array.insert to use Py_ssize_t (like the rest already does.) 2006-02-27 19:44:56 +00:00
Jeremy Hylton
c7d37264bb Fix parsing of subscriptlist.
(Armin's SF bug report).
d = {}
d[1,] = 1
Now handled correctly
2006-02-27 17:29:29 +00:00
Martin v. Löwis
02cbf4ae4b More unconsting. 2006-02-27 17:20:04 +00:00
Tim Peters
f4e6928c4d Patch 1413181, by Gabriel Becedillas.
PyThreadState_Delete():  if the auto-GIL-state machinery knows about
the thread state, forget it (since the thread state is being deleted,
continuing to remember it can't help, but can hurt if another thread
happens to get created with the same thread id).

I'll backport to 2.4 next.
2006-02-27 17:15:31 +00:00
Thomas Wouters
8622e93eab And some more cleanup. 2006-02-27 17:14:45 +00:00
Thomas Wouters
106203c6e0 Clean up from-import handling. 2006-02-27 17:05:19 +00:00
Martin v. Löwis
b79afb6e3a unconst. 2006-02-27 17:01:22 +00:00
Jeremy Hylton
9ebfbf0a43 Simplify ast_for_trailer() in anticipation of more changes. 2006-02-27 16:50:35 +00:00
Tim Peters
da1329b4f9 Trimmed trailing whitespace. 2006-02-27 16:50:01 +00:00
Neal Norwitz
eb65125dda Add an entry for 308 2006-02-27 16:47:12 +00:00
Thomas Wouters
aa8b6c5855 Fix old not-reading-pep-308-right artifact. 2006-02-27 16:46:22 +00:00
Martin v. Löwis
15e62742fa Revert backwards-incompatible const changes. 2006-02-27 16:46:16 +00:00
Neal Norwitz
f9f61b4aa2 Note version added for conditional expressions 2006-02-27 16:31:12 +00:00
Thomas Wouters
e2dd78c760 Update for PEP 308 patch. 2006-02-27 16:25:11 +00:00
Martin v. Löwis
16c7f71380 Handle testlist_safe and or_test like testlist. 2006-02-27 16:11:03 +00:00