Thomas Wouters [Wed, 1 Mar 2006 01:01:55 +0000 (01:01 +0000)]
Fix DBEnv's set_tx_timestamp wrapper to be slightly more correct on
non-32bit platforms. Will still only allow 32 bits in a timestamp on Win64,
but at least it won't crash, and it'll work right on platforms where longs
are big enough to contain time_t's.
(A better-working, although conceptually less-right fix would have been to
use Py_ssize_t here, but Martin and Tim won't let me.)
Thomas Wouters [Tue, 28 Feb 2006 23:09:08 +0000 (23:09 +0000)]
Move #include to outside "extern C {}", before Tim figures out it'll break
VC++.
Thomas Wouters [Tue, 28 Feb 2006 22:50:17 +0000 (22:50 +0000)]
Regenerate.
Neal Norwitz [Tue, 28 Feb 2006 22:47:29 +0000 (22:47 +0000)]
Don't pollute namespace as bad as before. All the types are static now.
Thomas Wouters [Tue, 28 Feb 2006 22:42:15 +0000 (22:42 +0000)]
Make 'as' an actual keyword when with's future statement is used. Not
actually necessary for functionality, but good for transition.
Martin v. Löwis [Tue, 28 Feb 2006 22:41:29 +0000 (22:41 +0000)]
Change non-ASCII warning into a SyntaxError.
Thomas Wouters [Tue, 28 Feb 2006 22:40:55 +0000 (22:40 +0000)]
Include code.h more sanely.
Neal Norwitz [Tue, 28 Feb 2006 22:36:46 +0000 (22:36 +0000)]
No need to export PySTEntry_New, it is only used in symtable.c
Tim Peters [Tue, 28 Feb 2006 22:02:16 +0000 (22:02 +0000)]
Set eol-style on new .py files.
Guido van Rossum [Tue, 28 Feb 2006 21:57:43 +0000 (21:57 +0000)]
Updates to the with-statement:
- 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.
Martin v. Löwis [Tue, 28 Feb 2006 21:41:30 +0000 (21:41 +0000)]
unparse.py can now unparse itself.
Neal Norwitz [Tue, 28 Feb 2006 20:40:50 +0000 (20:40 +0000)]
Add a note about removing the file once the bug is fixed
Tim Peters [Tue, 28 Feb 2006 20:39:06 +0000 (20:39 +0000)]
Its right now.
Neal Norwitz [Tue, 28 Feb 2006 20:24:18 +0000 (20:24 +0000)]
Ignore .pyc files
Neal Norwitz [Tue, 28 Feb 2006 20:06:49 +0000 (20:06 +0000)]
Note that as generates a warning too
Neal Norwitz [Tue, 28 Feb 2006 20:03:28 +0000 (20:03 +0000)]
Martin owns PEP 353 and did most of the work
Neal Norwitz [Tue, 28 Feb 2006 20:02:42 +0000 (20:02 +0000)]
Make __future__ features similar for with and absolute import since they were both added before a1
Thomas Wouters [Tue, 28 Feb 2006 20:02:27 +0000 (20:02 +0000)]
Generally inehrit codeflags that are in PyCF_MASK, instead of writing it out
in multiple places. This makes compile()/eval()/etc also inherit the
absolute-import codeflag, like division and with-statement already were.
Jeremy Hylton [Tue, 28 Feb 2006 19:57:06 +0000 (19:57 +0000)]
Add some stats collection in debugging mode.
No good way to extract output yet.
Tim Peters [Tue, 28 Feb 2006 19:05:29 +0000 (19:05 +0000)]
Gave README a .txt extension.
Thomas Wouters [Tue, 28 Feb 2006 19:02:24 +0000 (19:02 +0000)]
from __future__ import with_statement addon for 'with', mostly written by
Neal.
Neal Norwitz [Tue, 28 Feb 2006 19:02:05 +0000 (19:02 +0000)]
Add directory which contains known ref leaks. Some of these are likely to be system dependent (like test_gestalt).
Jeremy Hylton [Tue, 28 Feb 2006 18:52:28 +0000 (18:52 +0000)]
Use simple PyList to implement list of PyObject pointers
Tim Peters [Tue, 28 Feb 2006 18:44:41 +0000 (18:44 +0000)]
Set EOL style to native.
Tim Peters [Tue, 28 Feb 2006 18:33:35 +0000 (18:33 +0000)]
Another bit of unconstification.
Tim Peters [Tue, 28 Feb 2006 18:30:36 +0000 (18:30 +0000)]
Whitespace normalization.
Jeremy Hylton [Tue, 28 Feb 2006 18:29:00 +0000 (18:29 +0000)]
Tabify
Neal Norwitz [Tue, 28 Feb 2006 18:05:43 +0000 (18:05 +0000)]
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).
Jeremy Hylton [Tue, 28 Feb 2006 17:58:27 +0000 (17:58 +0000)]
Remove asdl_seq_APPEND() and simplify asdl seq implementation.
Clarify intended use of set_context() and check errors at all call sites.
Neal Norwitz [Tue, 28 Feb 2006 17:53:58 +0000 (17:53 +0000)]
Update comments
Jeremy Hylton [Tue, 28 Feb 2006 17:53:04 +0000 (17:53 +0000)]
Real arena implementation
Replace the toy arena implementation with a real one,
based on allocating 8K chunks of memory by default.
Neal Norwitz [Tue, 28 Feb 2006 17:46:48 +0000 (17:46 +0000)]
George Yoshida points out that the special characters
from Tools/compiler/ast.txt are not used anywhere else in asttable.txt.
So remove "\&".
Jeremy Hylton [Tue, 28 Feb 2006 17:46:23 +0000 (17:46 +0000)]
Test case to cover subscription bug from SF
1333982
Thomas Wouters [Tue, 28 Feb 2006 16:37:25 +0000 (16:37 +0000)]
Wups, add NEWS item I'd written but not checked in.
Thomas Wouters [Tue, 28 Feb 2006 16:09:29 +0000 (16:09 +0000)]
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.
Fredrik Lundh [Tue, 28 Feb 2006 12:11:57 +0000 (12:11 +0000)]
markup glitch (spotted by George Yoshida)
Anthony Baxter [Tue, 28 Feb 2006 07:21:42 +0000 (07:21 +0000)]
XXX something for amk's attention
Guido van Rossum [Tue, 28 Feb 2006 00:40:16 +0000 (00:40 +0000)]
Forgot to explain the effect of the new opcode.
Sigh -- we really should have one place for all opcode metadata.
Martin v. Löwis [Tue, 28 Feb 2006 00:37:04 +0000 (00:37 +0000)]
Generate return statement.
Martin v. Löwis [Tue, 28 Feb 2006 00:32:31 +0000 (00:32 +0000)]
Regenerate.
Guido van Rossum [Tue, 28 Feb 2006 00:32:16 +0000 (00:32 +0000)]
Update the compiler package to compile the with-statement.
Jeremy, please review!
Martin v. Löwis [Tue, 28 Feb 2006 00:30:54 +0000 (00:30 +0000)]
Add generation of the version.
Neal Norwitz [Tue, 28 Feb 2006 00:26:30 +0000 (00:26 +0000)]
Ignore resource file
Martin v. Löwis [Tue, 28 Feb 2006 00:12:47 +0000 (00:12 +0000)]
Add support for version field on Modules
Brett Cannon [Mon, 27 Feb 2006 23:39:10 +0000 (23:39 +0000)]
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.
Tim Peters [Mon, 27 Feb 2006 23:29:46 +0000 (23:29 +0000)]
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")).
Neal Norwitz [Mon, 27 Feb 2006 23:24:48 +0000 (23:24 +0000)]
Finish removal of CO_GENERATOR_ALLOWED.
Martin v. Löwis [Mon, 27 Feb 2006 23:10:11 +0000 (23:10 +0000)]
unconst.
Thomas Wouters [Mon, 27 Feb 2006 22:49:54 +0000 (22:49 +0000)]
Clarify C-style exception handling with proper label name.
Thomas Wouters [Mon, 27 Feb 2006 22:48:55 +0000 (22:48 +0000)]
Fix assertions.
Guido van Rossum [Mon, 27 Feb 2006 22:32:47 +0000 (22:32 +0000)]
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).
Martin v. Löwis [Mon, 27 Feb 2006 21:41:03 +0000 (21:41 +0000)]
Start of a source code unparser.
Neal Norwitz [Mon, 27 Feb 2006 21:08:23 +0000 (21:08 +0000)]
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.
Brett Cannon [Mon, 27 Feb 2006 20:03:56 +0000 (20:03 +0000)]
Don't filter out OverflowWarning; should be a test failure if it is raised by
the interpreter in 2.5 .
Martin v. Löwis [Mon, 27 Feb 2006 19:57:01 +0000 (19:57 +0000)]
Make or_test similar to test, not testlist.
Martin v. Löwis [Mon, 27 Feb 2006 19:56:30 +0000 (19:56 +0000)]
Skip over doc strings.
Thomas Wouters [Mon, 27 Feb 2006 19:44:56 +0000 (19:44 +0000)]
Convert array.array.insert to use Py_ssize_t (like the rest already does.)
Jeremy Hylton [Mon, 27 Feb 2006 17:29:29 +0000 (17:29 +0000)]
Fix parsing of subscriptlist.
(Armin's SF bug report).
d = {}
d[1,] = 1
Now handled correctly
Martin v. Löwis [Mon, 27 Feb 2006 17:20:04 +0000 (17:20 +0000)]
More unconsting.
Tim Peters [Mon, 27 Feb 2006 17:15:31 +0000 (17:15 +0000)]
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.
Thomas Wouters [Mon, 27 Feb 2006 17:14:45 +0000 (17:14 +0000)]
And some more cleanup.
Thomas Wouters [Mon, 27 Feb 2006 17:05:19 +0000 (17:05 +0000)]
Clean up from-import handling.
Martin v. Löwis [Mon, 27 Feb 2006 17:01:22 +0000 (17:01 +0000)]
unconst.
Jeremy Hylton [Mon, 27 Feb 2006 16:50:35 +0000 (16:50 +0000)]
Simplify ast_for_trailer() in anticipation of more changes.
Tim Peters [Mon, 27 Feb 2006 16:50:01 +0000 (16:50 +0000)]
Trimmed trailing whitespace.
Neal Norwitz [Mon, 27 Feb 2006 16:47:12 +0000 (16:47 +0000)]
Add an entry for 308
Thomas Wouters [Mon, 27 Feb 2006 16:46:22 +0000 (16:46 +0000)]
Fix old not-reading-pep-308-right artifact.
Martin v. Löwis [Mon, 27 Feb 2006 16:46:16 +0000 (16:46 +0000)]
Revert backwards-incompatible const changes.
Neal Norwitz [Mon, 27 Feb 2006 16:31:12 +0000 (16:31 +0000)]
Note version added for conditional expressions
Thomas Wouters [Mon, 27 Feb 2006 16:25:11 +0000 (16:25 +0000)]
Update for PEP 308 patch.
Martin v. Löwis [Mon, 27 Feb 2006 16:11:03 +0000 (16:11 +0000)]
Handle testlist_safe and or_test like testlist.
Martin v. Löwis [Mon, 27 Feb 2006 16:03:39 +0000 (16:03 +0000)]
Alias non-terminals introduced for backwards compatibility.
Thomas Wouters [Mon, 27 Feb 2006 15:43:57 +0000 (15:43 +0000)]
Fix assertion errors in debug build, brought on by PEP 308 patch.
Martin v. Löwis [Mon, 27 Feb 2006 15:23:19 +0000 (15:23 +0000)]
Create _ast module.
Cleanup Python-ast.c generation.
Martin v. Löwis [Mon, 27 Feb 2006 15:16:21 +0000 (15:16 +0000)]
Check for a not-found rlconf.h by testing for None.
Anthony Baxter [Mon, 27 Feb 2006 06:49:54 +0000 (06:49 +0000)]
regenerated. please read PEP 306 when changing Python's grammar!
Thomas Wouters [Mon, 27 Feb 2006 00:24:13 +0000 (00:24 +0000)]
PEP 308 implementation, including minor refdocs and some testcases. It
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.
The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:
>>> (x for x in lambda:0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence
changes into
>>> (x for x in lambda: 0)
File "<stdin>", line 1
(x for x in lambda: 0)
^
SyntaxError: invalid syntax
Since there's no way the former version can be useful, it's probably a
bugfix ;)
Martin v. Löwis [Mon, 27 Feb 2006 00:09:50 +0000 (00:09 +0000)]
Avoid reinitializing the types twice.
Martin v. Löwis [Sun, 26 Feb 2006 23:40:20 +0000 (23:40 +0000)]
Stop generating empty arrays.
Neal Norwitz [Sun, 26 Feb 2006 22:29:38 +0000 (22:29 +0000)]
Oops, I forgot to check this in with the change to Grammar/Grammar.
Implement change suggested by Jiwon Seo on python-dev.
['(' gen_for ')'] is redundant with test, so remove it.
Martin v. Löwis [Sun, 26 Feb 2006 22:12:35 +0000 (22:12 +0000)]
Check whether there are flags.
Martin v. Löwis [Sun, 26 Feb 2006 20:51:25 +0000 (20:51 +0000)]
Fix iterating over cmpop_ty lists.
Martin v. Löwis [Sun, 26 Feb 2006 19:42:26 +0000 (19:42 +0000)]
Generate code to recursively copy an AST into
a tree of Python objects. Expose this through compile().
Brett Cannon [Sun, 26 Feb 2006 19:27:29 +0000 (19:27 +0000)]
Remove line meant to test trailing whitespace since that kind of whitespace is
automatically removed.
Also annotate what each line is meant to test.
Tim Peters [Sun, 26 Feb 2006 04:21:50 +0000 (04:21 +0000)]
Whitespace normalization.
Guido van Rossum [Sat, 25 Feb 2006 23:32:30 +0000 (23:32 +0000)]
Oops. Fix syntax for C89 compilers.
Guido van Rossum [Sat, 25 Feb 2006 22:38:04 +0000 (22:38 +0000)]
- Patch
1433928:
- The copy module now "copies" function objects (as atomic objects).
- dict.__getitem__ now looks for a __missing__ hook before raising
KeyError.
- Added a new type, defaultdict, to the collections module.
This uses the new __missing__ hook behavior added to dict (see above).
Neal Norwitz [Sat, 25 Feb 2006 15:43:10 +0000 (15:43 +0000)]
Per discussion on python-dev, remove CO_GENERATOR_ALLOWED. Leave comment about not removing yet.
Brett Cannon [Sat, 25 Feb 2006 14:53:26 +0000 (14:53 +0000)]
Move the vimrc file to the newly created Vim/ directory.
Brett Cannon [Sat, 25 Feb 2006 14:52:53 +0000 (14:52 +0000)]
Add a script that auto-generates a Vim syntax highlighting file for Python.
Just symlink or copy python.vim to ~/.vim/syntax/ . Also included is a sample
Python file with basic expressions to make sure they are highlighted.
Also add a Vim directory in Misc to hold all Vim configuration files.
Neal Norwitz [Fri, 24 Feb 2006 23:11:14 +0000 (23:11 +0000)]
Implement change suggested by Jiwon Seo on python-dev.
['(' gen_for ')'] is redundant with test, so remove it.
Neal Norwitz [Fri, 24 Feb 2006 15:39:29 +0000 (15:39 +0000)]
Fix a couple of warnings on Mac OS X.
Jack Jansen [Thu, 23 Feb 2006 15:12:19 +0000 (15:12 +0000)]
On OSX, use --arch_only `arch` in stead of --arch_only ppc, so things will
build for the current CPU.
Jack Jansen [Thu, 23 Feb 2006 15:02:23 +0000 (15:02 +0000)]
If the readline library is found try and determine whether it's the broken
MacOSX 10.4 readline, and don't build the readline module in that case.
Jack Jansen [Thu, 23 Feb 2006 14:54:30 +0000 (14:54 +0000)]
Got rid of byte-order dependencies.
Georg Brandl [Wed, 22 Feb 2006 11:46:55 +0000 (11:46 +0000)]
Fix casing of function names.
Georg Brandl [Wed, 22 Feb 2006 11:30:06 +0000 (11:30 +0000)]
RFE #
1436243: make integers in [0..256] preallocated.
Neal Norwitz [Wed, 22 Feb 2006 07:24:06 +0000 (07:24 +0000)]
Allow buildbot to pass extra test flags to regrtest (specifically -r) via the environment.
Neal Norwitz [Wed, 22 Feb 2006 05:51:48 +0000 (05:51 +0000)]
George Yoshida's fix.
Georg Brandl [Tue, 21 Feb 2006 22:17:46 +0000 (22:17 +0000)]
Add test for classmethod ./. keyword args.