]> granicus.if.org Git - python/log
python
19 years agoRemove gcc (4.0.x) warning about uninitialized value by explicitly setting
Thomas Wouters [Wed, 1 Mar 2006 21:58:30 +0000 (21:58 +0000)]
Remove gcc (4.0.x) warning about uninitialized value by explicitly setting
the sentinel value in the main function, rather than the helper. This
function could possibly do with an early-out if any of the helper calls ends
up with a len of 0, but I doubt it really matters (how common are malformed
hangul syllables, really?)

19 years agoMake Py_ssize_t-clean.
Thomas Wouters [Wed, 1 Mar 2006 21:50:07 +0000 (21:50 +0000)]
Make Py_ssize_t-clean.

19 years agoMake Py_ssize_t-clean.
Thomas Wouters [Wed, 1 Mar 2006 21:37:32 +0000 (21:37 +0000)]
Make Py_ssize_t-clean.

19 years agoFix more memory leaks. Will backport to 2.4.
Martin v. Löwis [Wed, 1 Mar 2006 21:33:54 +0000 (21:33 +0000)]
Fix more memory leaks. Will backport to 2.4.

19 years agoFix C99-ism, and add XXX to comment
Thomas Wouters [Wed, 1 Mar 2006 21:31:21 +0000 (21:31 +0000)]
Fix C99-ism, and add XXX to comment

19 years agoMake failures in test cases print failing source file.
Martin v. Löwis [Wed, 1 Mar 2006 21:11:49 +0000 (21:11 +0000)]
Make failures in test cases print failing source file.

19 years agoUpdate for 'with' statement.
Brett Cannon [Wed, 1 Mar 2006 20:53:08 +0000 (20:53 +0000)]
Update for 'with' statement.

19 years agoFix a bug in nested() - if one of the sub-context-managers swallows the
Guido van Rossum [Wed, 1 Mar 2006 17:10:01 +0000 (17:10 +0000)]
Fix a bug in nested() - if one of the sub-context-managers swallows the
exception, it should not be propagated up.  With unit tests.

19 years agoChange GC refcount to Py_ssize_t.
Martin v. Löwis [Wed, 1 Mar 2006 16:56:25 +0000 (16:56 +0000)]
Change GC refcount to Py_ssize_t.

19 years agoReconst parameters that lost their const in the AST merge.
Martin v. Löwis [Wed, 1 Mar 2006 16:55:42 +0000 (16:55 +0000)]
Reconst parameters that lost their const in the AST merge.

19 years agoFix warning that texcheck complained about.
Martin v. Löwis [Wed, 1 Mar 2006 16:37:55 +0000 (16:37 +0000)]
Fix warning that texcheck complained about.

19 years agoTabify and reflow some long lines.
Jeremy Hylton [Wed, 1 Mar 2006 15:47:05 +0000 (15:47 +0000)]
Tabify and reflow some long lines.

Much of the peephole optimizer is now indented badly, but it's about
to be revised anyway.

19 years agoAdd missing DECREF.
Jeremy Hylton [Wed, 1 Mar 2006 15:02:24 +0000 (15:02 +0000)]
Add missing DECREF.

19 years agomarkup glitch (spotted by George Yoshida)
Fredrik Lundh [Wed, 1 Mar 2006 12:43:53 +0000 (12:43 +0000)]
markup glitch (spotted by George Yoshida)

19 years agoRemove svn:mime-type (inexplicably set to a binary type),
Tim Peters [Wed, 1 Mar 2006 06:28:58 +0000 (06:28 +0000)]
Remove svn:mime-type (inexplicably set to a binary type),
and set svn:eol-style to native, on some text files.

19 years agoSet svn:eol-style to native.
Tim Peters [Wed, 1 Mar 2006 06:19:04 +0000 (06:19 +0000)]
Set svn:eol-style to native.

19 years agoFix parsing of exception_hierarchy.txt when a platform-specific exception is
Brett Cannon [Wed, 1 Mar 2006 06:10:48 +0000 (06:10 +0000)]
Fix parsing of exception_hierarchy.txt when a platform-specific exception is
specified.  Hopefully this wll bring warming to Tim's Windows-loving heart.

19 years agoDocument new Py_ssize_t API.
Martin v. Löwis [Wed, 1 Mar 2006 05:47:11 +0000 (05:47 +0000)]
Document new Py_ssize_t API.

19 years agoUse %ld and casts to long for refcount printing, in absense of a universally
Thomas Wouters [Wed, 1 Mar 2006 05:41:20 +0000 (05:41 +0000)]
Use %ld and casts to long for refcount printing, in absense of a universally
available %zd format character. Mark with an XXX comment so we can fix this,
later.

19 years agoUse %zd format characters for Py_ssize_t types.
Thomas Wouters [Wed, 1 Mar 2006 05:38:39 +0000 (05:38 +0000)]
Use %zd format characters for Py_ssize_t types.

19 years agoRemove redundant isinstance() check.
Thomas Wouters [Wed, 1 Mar 2006 05:34:22 +0000 (05:34 +0000)]
Remove redundant isinstance() check.

19 years agoPut back the essence of Jeremy's original XXX comment.
Thomas Wouters [Wed, 1 Mar 2006 05:32:33 +0000 (05:32 +0000)]
Put back the essence of Jeremy's original XXX comment.

19 years agoAdd tool to check documentation against declaration.
Martin v. Löwis [Wed, 1 Mar 2006 05:18:07 +0000 (05:18 +0000)]
Add tool to check documentation against declaration.

19 years agoMake documentation match the implementation.
Martin v. Löwis [Wed, 1 Mar 2006 05:16:03 +0000 (05:16 +0000)]
Make documentation match the implementation.

19 years agoRepair mangled code in the Windows flavor of
Tim Peters [Wed, 1 Mar 2006 04:35:45 +0000 (04:35 +0000)]
Repair mangled code in the Windows flavor of
posix__getfullpathname().

In partial answer to the now-deleted XXX comment:

/* XXX(twouters) Why use 'et#' here at all? insize isn't used */

`insize` is an input parameter too, and it was left uninitialized,
leading to seemingly random failures.

19 years agoAdd Misc/NEWS entry for Misc/Vim/vim_syntax.py . Also use conditional
Brett Cannon [Wed, 1 Mar 2006 04:28:00 +0000 (04:28 +0000)]
Add Misc/NEWS entry for Misc/Vim/vim_syntax.py .  Also use conditional
expression for the hell of it.

19 years agoPEP 352 implementation. Creates a new base class, BaseException, which has an
Brett Cannon [Wed, 1 Mar 2006 04:25:17 +0000 (04:25 +0000)]
PEP 352 implementation.  Creates a new base class, BaseException, which has an
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.

19 years agoUse Py_ssize_t for PyArg_UnpackTuple arguments.
Martin v. Löwis [Wed, 1 Mar 2006 04:06:10 +0000 (04:06 +0000)]
Use Py_ssize_t for PyArg_UnpackTuple arguments.

19 years agoRemove unused field.
Martin v. Löwis [Wed, 1 Mar 2006 04:04:20 +0000 (04:04 +0000)]
Remove unused field.

19 years agoMake ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.
Martin v. Löwis [Wed, 1 Mar 2006 04:02:43 +0000 (04:02 +0000)]
Make ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.

19 years agoPy_ssize_t-ify.
Thomas Wouters [Wed, 1 Mar 2006 01:05:10 +0000 (01:05 +0000)]
Py_ssize_t-ify.

19 years agoFix DBEnv's set_tx_timestamp wrapper to be slightly more correct on
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.)

19 years agoMove #include to outside "extern C {}", before Tim figures out it'll break
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++.

19 years agoRegenerate.
Thomas Wouters [Tue, 28 Feb 2006 22:50:17 +0000 (22:50 +0000)]
Regenerate.

19 years agoDon't pollute namespace as bad as before. All the types are static now.
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.

19 years agoMake 'as' an actual keyword when with's future statement is used. Not
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.

19 years agoChange non-ASCII warning into a SyntaxError.
Martin v. Löwis [Tue, 28 Feb 2006 22:41:29 +0000 (22:41 +0000)]
Change non-ASCII warning into a SyntaxError.

19 years agoInclude code.h more sanely.
Thomas Wouters [Tue, 28 Feb 2006 22:40:55 +0000 (22:40 +0000)]
Include code.h more sanely.

19 years agoNo need to export PySTEntry_New, it is only used in symtable.c
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

19 years agoSet eol-style on new .py files.
Tim Peters [Tue, 28 Feb 2006 22:02:16 +0000 (22:02 +0000)]
Set eol-style on new .py files.

19 years agoUpdates to the with-statement:
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.

19 years agounparse.py can now unparse itself.
Martin v. Löwis [Tue, 28 Feb 2006 21:41:30 +0000 (21:41 +0000)]
unparse.py can now unparse itself.

19 years agoAdd a note about removing the file once the bug is fixed
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

19 years agoIts right now.
Tim Peters [Tue, 28 Feb 2006 20:39:06 +0000 (20:39 +0000)]
Its right now.

19 years agoIgnore .pyc files
Neal Norwitz [Tue, 28 Feb 2006 20:24:18 +0000 (20:24 +0000)]
Ignore .pyc files

19 years agoNote that as generates a warning too
Neal Norwitz [Tue, 28 Feb 2006 20:06:49 +0000 (20:06 +0000)]
Note that as generates a warning too

19 years agoMartin owns PEP 353 and did most of the work
Neal Norwitz [Tue, 28 Feb 2006 20:03:28 +0000 (20:03 +0000)]
Martin owns PEP 353 and did most of the work

19 years agoMake __future__ features similar for with and absolute import since they were both...
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

19 years agoGenerally inehrit codeflags that are in PyCF_MASK, instead of writing it out
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.

19 years agoAdd some stats collection in debugging mode.
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.

19 years agoGave README a .txt extension.
Tim Peters [Tue, 28 Feb 2006 19:05:29 +0000 (19:05 +0000)]
Gave README a .txt extension.

19 years agofrom __future__ import with_statement addon for 'with', mostly written by
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.

19 years agoAdd directory which contains known ref leaks. Some of these are likely to be system...
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).

19 years agoUse simple PyList to implement list of PyObject pointers
Jeremy Hylton [Tue, 28 Feb 2006 18:52:28 +0000 (18:52 +0000)]
Use simple PyList to implement list of PyObject pointers

19 years agoSet EOL style to native.
Tim Peters [Tue, 28 Feb 2006 18:44:41 +0000 (18:44 +0000)]
Set EOL style to native.

19 years agoAnother bit of unconstification.
Tim Peters [Tue, 28 Feb 2006 18:33:35 +0000 (18:33 +0000)]
Another bit of unconstification.

19 years agoWhitespace normalization.
Tim Peters [Tue, 28 Feb 2006 18:30:36 +0000 (18:30 +0000)]
Whitespace normalization.

19 years agoTabify
Jeremy Hylton [Tue, 28 Feb 2006 18:29:00 +0000 (18:29 +0000)]
Tabify

19 years agoInstead of printing the exception when you interrupt a test (Ctrl-C),
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).

19 years agoRemove asdl_seq_APPEND() and simplify asdl seq implementation.
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.

19 years agoUpdate comments
Neal Norwitz [Tue, 28 Feb 2006 17:53:58 +0000 (17:53 +0000)]
Update comments

19 years agoReal arena implementation
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.

19 years agoGeorge Yoshida points out that the special characters
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 "\&".

19 years agoTest case to cover subscription bug from SF 1333982
Jeremy Hylton [Tue, 28 Feb 2006 17:46:23 +0000 (17:46 +0000)]
Test case to cover subscription bug from SF 1333982

19 years agoWups, add NEWS item I'd written but not checked in.
Thomas Wouters [Tue, 28 Feb 2006 16:37:25 +0000 (16:37 +0000)]
Wups, add NEWS item I'd written but not checked in.

19 years agoSF patch #1438387, PEP 328: relative and absolute imports.
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.

19 years agomarkup glitch (spotted by George Yoshida)
Fredrik Lundh [Tue, 28 Feb 2006 12:11:57 +0000 (12:11 +0000)]
markup glitch (spotted by George Yoshida)

19 years agoXXX something for amk's attention
Anthony Baxter [Tue, 28 Feb 2006 07:21:42 +0000 (07:21 +0000)]
XXX something for amk's attention

19 years agoForgot to explain the effect of the new opcode.
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.

19 years agoGenerate return statement.
Martin v. Löwis [Tue, 28 Feb 2006 00:37:04 +0000 (00:37 +0000)]
Generate return statement.

19 years agoRegenerate.
Martin v. Löwis [Tue, 28 Feb 2006 00:32:31 +0000 (00:32 +0000)]
Regenerate.

19 years agoUpdate the compiler package to compile the with-statement.
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!

19 years agoAdd generation of the version.
Martin v. Löwis [Tue, 28 Feb 2006 00:30:54 +0000 (00:30 +0000)]
Add generation of the version.

19 years agoIgnore resource file
Neal Norwitz [Tue, 28 Feb 2006 00:26:30 +0000 (00:26 +0000)]
Ignore resource file

19 years agoAdd support for version field on Modules
Martin v. Löwis [Tue, 28 Feb 2006 00:12:47 +0000 (00:12 +0000)]
Add support for version field on Modules

19 years agoCheck the return code for PyErr_Warn() when warning about raising string
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.

19 years agoPyErr_ProgramText(): Grrrrrr.
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")).

19 years agoFinish removal of CO_GENERATOR_ALLOWED.
Neal Norwitz [Mon, 27 Feb 2006 23:24:48 +0000 (23:24 +0000)]
Finish removal of CO_GENERATOR_ALLOWED.

19 years agounconst.
Martin v. Löwis [Mon, 27 Feb 2006 23:10:11 +0000 (23:10 +0000)]
unconst.

19 years agoClarify C-style exception handling with proper label name.
Thomas Wouters [Mon, 27 Feb 2006 22:49:54 +0000 (22:49 +0000)]
Clarify C-style exception handling with proper label name.

19 years agoFix assertions.
Thomas Wouters [Mon, 27 Feb 2006 22:48:55 +0000 (22:48 +0000)]
Fix assertions.

19 years agoPEP 343 -- the with-statement.
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).

19 years agoStart of a source code unparser.
Martin v. Löwis [Mon, 27 Feb 2006 21:41:03 +0000 (21:41 +0000)]
Start of a source code unparser.

19 years agoEven though we don't currently use unicode or complex numbers in the test,
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.

19 years agoDon't filter out OverflowWarning; should be a test failure if it is raised by
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 .

19 years agoMake or_test similar to test, not testlist.
Martin v. Löwis [Mon, 27 Feb 2006 19:57:01 +0000 (19:57 +0000)]
Make or_test similar to test, not testlist.

19 years agoSkip over doc strings.
Martin v. Löwis [Mon, 27 Feb 2006 19:56:30 +0000 (19:56 +0000)]
Skip over doc strings.

19 years agoConvert array.array.insert to use Py_ssize_t (like the rest already does.)
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.)

19 years agoFix parsing of subscriptlist.
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

19 years agoMore unconsting.
Martin v. Löwis [Mon, 27 Feb 2006 17:20:04 +0000 (17:20 +0000)]
More unconsting.

19 years agoPatch 1413181, by Gabriel Becedillas.
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.

19 years agoAnd some more cleanup.
Thomas Wouters [Mon, 27 Feb 2006 17:14:45 +0000 (17:14 +0000)]
And some more cleanup.

19 years agoClean up from-import handling.
Thomas Wouters [Mon, 27 Feb 2006 17:05:19 +0000 (17:05 +0000)]
Clean up from-import handling.

19 years agounconst.
Martin v. Löwis [Mon, 27 Feb 2006 17:01:22 +0000 (17:01 +0000)]
unconst.

19 years agoSimplify ast_for_trailer() in anticipation of more changes.
Jeremy Hylton [Mon, 27 Feb 2006 16:50:35 +0000 (16:50 +0000)]
Simplify ast_for_trailer() in anticipation of more changes.

19 years agoTrimmed trailing whitespace.
Tim Peters [Mon, 27 Feb 2006 16:50:01 +0000 (16:50 +0000)]
Trimmed trailing whitespace.

19 years agoAdd an entry for 308
Neal Norwitz [Mon, 27 Feb 2006 16:47:12 +0000 (16:47 +0000)]
Add an entry for 308

19 years agoFix old not-reading-pep-308-right artifact.
Thomas Wouters [Mon, 27 Feb 2006 16:46:22 +0000 (16:46 +0000)]
Fix old not-reading-pep-308-right artifact.

19 years agoRevert backwards-incompatible const changes.
Martin v. Löwis [Mon, 27 Feb 2006 16:46:16 +0000 (16:46 +0000)]
Revert backwards-incompatible const changes.

19 years agoNote version added for conditional expressions
Neal Norwitz [Mon, 27 Feb 2006 16:31:12 +0000 (16:31 +0000)]
Note version added for conditional expressions