]> granicus.if.org Git - python/log
python
18 years agoimprove reporting of illegal section nesting (provide location which
Fred Drake [Fri, 31 Mar 2006 05:30:19 +0000 (05:30 +0000)]
improve reporting of illegal section nesting (provide location which
caused detection of the error)

18 years agofix sectioning: cannot skip section levels
Fred Drake [Fri, 31 Mar 2006 05:28:38 +0000 (05:28 +0000)]
fix sectioning: cannot skip section levels

18 years agotest_main(): Restore the decimal context that was in
Tim Peters [Fri, 31 Mar 2006 04:11:16 +0000 (04:11 +0000)]
test_main():  Restore the decimal context that was in
effect at the time test_decimal was imported.  Else
running test_decimal had the bad side effect of
permanently changing the decimal context in effect.
That caused text_tokenize to fail if it ran after
test_decimal.

18 years agoRepaired a number of errors in this test:
Tim Peters [Fri, 31 Mar 2006 03:17:30 +0000 (03:17 +0000)]
Repaired a number of errors in this test:

- The doctests in decistmt() weren't run at all when
  test_tokenize was run via regrtest.py.

- Some expected output in decistmt() was Windows-specific
  (but nobody noticed because the doctests weren't getting
  run).

- test_roundtrip() didn't actually test anything when
  running the tests with -O.  Now it does.

- Changed test_roundtrip() to show the name of the input
  file when it fails.  That would have saved a lot of
  time earlier today.

- Added a bunch of comments.

18 years agoSF patch #1458476 with modifications based on discussions in python-dev. This
Barry Warsaw [Thu, 30 Mar 2006 22:45:35 +0000 (22:45 +0000)]
SF patch #1458476 with modifications based on discussions in python-dev.  This
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update().  The latter two are considered non-public.  Tests and
documentation (for the public API) are included.

18 years agoInsert a safety space after numbers as well as names in untokenize().
Guido van Rossum [Thu, 30 Mar 2006 21:43:35 +0000 (21:43 +0000)]
Insert a safety space after numbers as well as names in untokenize().

18 years agoAdd '-Wno-deprecated-warnings' to the compile flags for the Carbon extensions
Ronald Oussoren [Thu, 30 Mar 2006 20:18:33 +0000 (20:18 +0000)]
Add '-Wno-deprecated-warnings' to the compile flags for the Carbon extensions
on OSX 10.4 or later. This stops the compiler for complaining about calls to
deprecated functions in these extensions, they are supposed to wrap as much
of Carbon as possible.

18 years agoTry to fix test_loading on openbsd.
Thomas Heller [Thu, 30 Mar 2006 19:16:15 +0000 (19:16 +0000)]
Try to fix test_loading on openbsd.

18 years agoOops - this should not have gone in.
Thomas Heller [Thu, 30 Mar 2006 18:29:25 +0000 (18:29 +0000)]
Oops - this should not have gone in.

18 years agoOutput more info when the test fails.
Thomas Heller [Thu, 30 Mar 2006 17:49:55 +0000 (17:49 +0000)]
Output more info when the test fails.

18 years agoMinor bugs in the __index__ code (PEP 357), with tests.
Armin Rigo [Thu, 30 Mar 2006 14:04:02 +0000 (14:04 +0000)]
Minor bugs in the __index__ code (PEP 357), with tests.

18 years agowhitespace normalisation
Anthony Baxter [Thu, 30 Mar 2006 12:59:11 +0000 (12:59 +0000)]
whitespace normalisation

18 years agoThat one was a mistake.
Georg Brandl [Thu, 30 Mar 2006 12:19:07 +0000 (12:19 +0000)]
That one was a mistake.

18 years agoRemove unnecessary casts from type object initializers.
Georg Brandl [Thu, 30 Mar 2006 11:58:57 +0000 (11:58 +0000)]
Remove unnecessary casts from type object initializers.

18 years agoRemove unnecessary casts in type object initializers.
Georg Brandl [Thu, 30 Mar 2006 11:57:00 +0000 (11:57 +0000)]
Remove unnecessary casts in type object initializers.

18 years agoTry to build _ctypes on x86 openbsd.
Thomas Heller [Thu, 30 Mar 2006 11:51:58 +0000 (11:51 +0000)]
Try to build _ctypes on x86 openbsd.

18 years agoChecking in the test for PEP 357.
Armin Rigo [Thu, 30 Mar 2006 11:28:43 +0000 (11:28 +0000)]
Checking in the test for PEP 357.

This is from the SF tracker as well; for some reason the
content of test_index.py was lost and an empty file was
checked in instead.

18 years agoFixed bug #1459029 - unicode reprs were double-escaped.
Anthony Baxter [Thu, 30 Mar 2006 10:54:07 +0000 (10:54 +0000)]
Fixed bug #1459029 - unicode reprs were double-escaped.

18 years agoFixed bug #1459029 - unicode reprs were double-escaped.
Anthony Baxter [Thu, 30 Mar 2006 10:53:17 +0000 (10:53 +0000)]
Fixed bug #1459029 - unicode reprs were double-escaped.
Backed out an old patch from 2000.

18 years agoMark the upload command as new in 2.5, per Neal Norwitz's request.
Phillip J. Eby [Thu, 30 Mar 2006 07:09:06 +0000 (07:09 +0000)]
Mark the upload command as new in 2.5, per Neal Norwitz's request.

18 years agofill in refcount information for APIs first documented in Python 2.5
Fred Drake [Thu, 30 Mar 2006 03:04:41 +0000 (03:04 +0000)]
fill in refcount information for APIs first documented in Python 2.5

18 years agomerge revision 43437 from the release24-maint branch:
Fred Drake [Thu, 30 Mar 2006 02:58:38 +0000 (02:58 +0000)]
merge revision 43437 from the release24-maint branch:
- update the refcount information (late, but not a bad thing to do...)
- clarify that PyGen_New() steals a reference

18 years agoOops, forgot to checkin the NEWS for --identity
Phillip J. Eby [Thu, 30 Mar 2006 02:16:40 +0000 (02:16 +0000)]
Oops, forgot to checkin the NEWS for --identity

18 years agoImplementation for patch request #1457316: support --identity option
Phillip J. Eby [Thu, 30 Mar 2006 02:12:14 +0000 (02:12 +0000)]
Implementation for patch request #1457316: support --identity option
for setup.py "upload" command.

18 years agoSF bug #1460340: random.sample can raise KeyError
Raymond Hettinger [Wed, 29 Mar 2006 09:13:13 +0000 (09:13 +0000)]
SF bug #1460340:  random.sample can raise KeyError

Fix the hit and miss style of testing for sets and dicts.

18 years agoIn format strings slinging Py_ssize_t, unconditionally
Tim Peters [Tue, 28 Mar 2006 21:44:32 +0000 (21:44 +0000)]
In format strings slinging Py_ssize_t, unconditionally
interpolate PY_FORMAT_SIZE_T instead of #if'ing on
MS_WIN64.

18 years agoadd the ctypes.test subpackage to a normal Unix installation --
Armin Rigo [Tue, 28 Mar 2006 20:30:45 +0000 (20:30 +0000)]
add the ctypes.test subpackage to a normal Unix installation --
otherwise, test/test_ctypes.py fails.  What about ctypes.macholib?

18 years agofix a comment.
Armin Rigo [Tue, 28 Mar 2006 19:27:56 +0000 (19:27 +0000)]
fix a comment.

18 years agoRevert r43399.
Georg Brandl [Tue, 28 Mar 2006 19:19:56 +0000 (19:19 +0000)]
Revert r43399.

18 years agoanswer a question from a comment
Armin Rigo [Tue, 28 Mar 2006 19:10:40 +0000 (19:10 +0000)]
answer a question from a comment

18 years agoMove product_codes in their own file.
Martin v. Löwis [Tue, 28 Mar 2006 18:30:05 +0000 (18:30 +0000)]
Move product_codes in their own file.

18 years agodocument sys.maxint in std objects
Georg Brandl [Tue, 28 Mar 2006 18:02:44 +0000 (18:02 +0000)]
document sys.maxint in std objects

18 years agoBug #1459103: add inter-section links for strftime section.
Georg Brandl [Tue, 28 Mar 2006 12:48:43 +0000 (12:48 +0000)]
Bug #1459103: add inter-section links for strftime section.

18 years agoBug #1459963: urllib2 now normalizes HTTP header names correctly
Georg Brandl [Tue, 28 Mar 2006 12:40:24 +0000 (12:40 +0000)]
Bug #1459963: urllib2 now normalizes HTTP header names correctly
with title().

18 years agoMake the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivision...
Thomas Heller [Tue, 28 Mar 2006 11:00:08 +0000 (11:00 +0000)]
Make the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivisionError.

18 years agoMake uu use floor division instead of classic division.
Georg Brandl [Tue, 28 Mar 2006 10:29:45 +0000 (10:29 +0000)]
Make uu use floor division instead of classic division.
This was discovered by test_email failing with -Qnew.

18 years agoMake test_augassign pass with -Qnew and convert to unittest.
Georg Brandl [Tue, 28 Mar 2006 10:26:45 +0000 (10:26 +0000)]
Make test_augassign pass with -Qnew and convert to unittest.

18 years agoMake xdrlib use floor division instead of classic division.
Georg Brandl [Tue, 28 Mar 2006 10:07:46 +0000 (10:07 +0000)]
Make xdrlib use floor division instead of classic division.
Makes test_xdrlib pass.

18 years agoMake test_coercion pass with -Qnew. Converted to unittest on the occasion.
Georg Brandl [Tue, 28 Mar 2006 10:00:53 +0000 (10:00 +0000)]
Make test_coercion pass with -Qnew. Converted to unittest on the occasion.

18 years agoIn true regression-test spirit, make sure the
Thomas Wouters [Tue, 28 Mar 2006 08:44:55 +0000 (08:44 +0000)]
In true regression-test spirit, make sure the
itertools.tee->instance->attribute->itertools.tee and
itertools.tee->teedataobject->itertools.tee cycles, which can be found now
that itertools.tee and its teedataobject participate in GC, remain findable
and cleanable. The test won't fail when they aren't, but at least the
frequent hunt-refleaks runs would spot the rise in refleaks.

18 years agoAdd an example of a generator->freevar->cell->generator reference-cycle that
Thomas Wouters [Tue, 28 Mar 2006 08:14:24 +0000 (08:14 +0000)]
Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.

18 years agoMake test_decimal work with -Qnew.
Georg Brandl [Tue, 28 Mar 2006 08:06:35 +0000 (08:06 +0000)]
Make test_decimal work with -Qnew.

18 years agoCorrect case in test for Windows 9X.
Martin v. Löwis [Tue, 28 Mar 2006 07:51:51 +0000 (07:51 +0000)]
Correct case in test for Windows 9X.

18 years agoPart of bug 1459808: fiddle test_input_and_raw_input()
Tim Peters [Tue, 28 Mar 2006 07:39:22 +0000 (07:39 +0000)]
Part of bug 1459808:  fiddle test_input_and_raw_input()
so it passes w/ -Qnew.

18 years agoPart of bug 1459808: fiddle so that this passes
Tim Peters [Tue, 28 Mar 2006 07:28:40 +0000 (07:28 +0000)]
Part of bug 1459808:  fiddle so that this passes
with or without -Qnew.

18 years agoTry to get rid of a Coverity warning by consistently using origpending.
Neal Norwitz [Tue, 28 Mar 2006 06:19:28 +0000 (06:19 +0000)]
Try to get rid of a Coverity warning by consistently using origpending.

18 years agoAdd version added info for with statement and context managers
Neal Norwitz [Tue, 28 Mar 2006 05:51:02 +0000 (05:51 +0000)]
Add version added info for with statement and context managers

18 years agoDocument objects that can be used with the ``with`` statement.
Phillip J. Eby [Tue, 28 Mar 2006 00:13:10 +0000 (00:13 +0000)]
Document objects that can be used with the ``with`` statement.

18 years agoFix some missing imports
Phillip J. Eby [Tue, 28 Mar 2006 00:08:22 +0000 (00:08 +0000)]
Fix some missing imports

18 years agoFix contextlib not copying function attributes
Phillip J. Eby [Tue, 28 Mar 2006 00:07:24 +0000 (00:07 +0000)]
Fix contextlib not copying function attributes

18 years agoDocument the contextlib module.
Phillip J. Eby [Mon, 27 Mar 2006 23:58:46 +0000 (23:58 +0000)]
Document the contextlib module.

18 years agodummy_thread needs to support PEP 343 too.
Phillip J. Eby [Mon, 27 Mar 2006 23:32:10 +0000 (23:32 +0000)]
dummy_thread needs to support PEP 343 too.

18 years agoDocument change made to number of preallocated integers.
Georg Brandl [Mon, 27 Mar 2006 22:09:16 +0000 (22:09 +0000)]
Document change made to number of preallocated integers.

18 years agoPatch #1459476: install PKG-INFO metadata alongside distutils-installed packages.
Phillip J. Eby [Mon, 27 Mar 2006 21:55:21 +0000 (21:55 +0000)]
Patch #1459476: install PKG-INFO metadata alongside distutils-installed packages.

18 years agoThe "with" statement needs a __future__. :)
Phillip J. Eby [Mon, 27 Mar 2006 21:42:30 +0000 (21:42 +0000)]
The "with" statement needs a __future__.  :)

18 years agoDocument the "with" statement.
Phillip J. Eby [Mon, 27 Mar 2006 21:06:13 +0000 (21:06 +0000)]
Document the "with" statement.

18 years agoMake itertools.tee and its internal teedataobject participate in GC. This
Thomas Wouters [Mon, 27 Mar 2006 21:02:13 +0000 (21:02 +0000)]
Make itertools.tee and its internal teedataobject participate in GC. This
alone does not solve the leak in test_generators, unfortunately, but it is
part of test_generators' problem and it does solve other cycles.

18 years agoDocument the PEP 343 context manager protocol methods.
Phillip J. Eby [Mon, 27 Mar 2006 19:59:34 +0000 (19:59 +0000)]
Document the PEP 343 context manager protocol methods.

18 years agoDrop information about 2.4 DLLs.
Martin v. Löwis [Mon, 27 Mar 2006 16:35:13 +0000 (16:35 +0000)]
Drop information about 2.4 DLLs.

18 years agoAllow supression of subwcrev.exe invocation on a per-working-copy basis.
Martin v. Löwis [Mon, 27 Mar 2006 16:30:41 +0000 (16:30 +0000)]
Allow supression of subwcrev.exe invocation on a per-working-copy basis.

18 years agoWhitespace for generated code.
Walter Dörwald [Mon, 27 Mar 2006 15:11:56 +0000 (15:11 +0000)]
Whitespace for generated code.

18 years agoTagging for release r25a0
Anthony Baxter [Mon, 27 Mar 2006 13:37:36 +0000 (13:37 +0000)]
Tagging for release r25a0

18 years agooops. lets try that one more time
Anthony Baxter [Mon, 27 Mar 2006 13:35:34 +0000 (13:35 +0000)]
oops. lets try that one more time

18 years agoTagging for release r25a0
Anthony Baxter [Mon, 27 Mar 2006 12:12:48 +0000 (12:12 +0000)]
Tagging for release r25a0

18 years agoTagging for release svn+ssh://pythondev@svn.python.org/python//tags/r25a0
Anthony Baxter [Mon, 27 Mar 2006 11:56:58 +0000 (11:56 +0000)]
Tagging for release svn+ssh://pythondev@svn.python.org/python//tags/r25a0

18 years agomore testing.
Anthony Baxter [Mon, 27 Mar 2006 11:53:34 +0000 (11:53 +0000)]
more testing.

18 years agoAdd product ids for 2.5.
Martin v. Löwis [Mon, 27 Mar 2006 09:51:16 +0000 (09:51 +0000)]
Add product ids for 2.5.

18 years agoWhitespace.
Walter Dörwald [Mon, 27 Mar 2006 09:02:04 +0000 (09:02 +0000)]
Whitespace.

18 years agoFix SF bug #1458903 with AST compiler.
Neal Norwitz [Mon, 27 Mar 2006 08:58:23 +0000 (08:58 +0000)]
Fix SF bug #1458903 with AST compiler.

def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.

Add tests for this case and the proper way to unpack a tuple of one:
def foo((x,)):

test_inpsect was incorrect before.  I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.

18 years agoFind a source file in srcdir to allow to build outside of srcdir.
Hye-Shik Chang [Mon, 27 Mar 2006 08:43:11 +0000 (08:43 +0000)]
Find a source file in srcdir to allow to build outside of srcdir.

18 years agoFix reference leaks introduced by the recent incremental codec
Hye-Shik Chang [Mon, 27 Mar 2006 08:24:54 +0000 (08:24 +0000)]
Fix reference leaks introduced by the recent incremental codec
changes.

18 years agoMention patch id for the CJK part of the patch and
Walter Dörwald [Mon, 27 Mar 2006 08:15:44 +0000 (08:15 +0000)]
Mention patch id for the CJK part of the patch and
the name of the two new C functions.

18 years agotagging for release 2.5a0
Anthony Baxter [Mon, 27 Mar 2006 01:11:38 +0000 (01:11 +0000)]
tagging for release 2.5a0

18 years agoupdating snapshot.
Anthony Baxter [Mon, 27 Mar 2006 01:11:07 +0000 (01:11 +0000)]
updating snapshot.

18 years agoYears in the making.
Tim Peters [Sun, 26 Mar 2006 23:27:58 +0000 (23:27 +0000)]
Years in the making.

objimpl.h, pymem.h:  Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build.  They're aliases for the
system free() now.

_subprocess.c/sp_handle_dealloc():  Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).

pythonrun.c, tokenizer.c, parsermodule.c:  I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject.  Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.

If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.

18 years agoBug #1457264: parse http://host?query correctly in urllib
Georg Brandl [Sun, 26 Mar 2006 20:59:38 +0000 (20:59 +0000)]
Bug #1457264: parse http://host?query correctly in urllib

18 years agoFix typo.
Martin v. Löwis [Sun, 26 Mar 2006 16:40:47 +0000 (16:40 +0000)]
Fix typo.

18 years agoPatch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis [Sun, 26 Mar 2006 10:02:34 +0000 (10:02 +0000)]
Patch from Aldo Cortesi: expected skips for OpenBSD.

18 years agoProvide more debug output, to diagnose OpenBSD test failures.
Martin v. Löwis [Sun, 26 Mar 2006 09:50:11 +0000 (09:50 +0000)]
Provide more debug output, to diagnose OpenBSD test failures.

18 years agoUtilize %zd for Py_ssize_t formatting instead of casting to long.
Hye-Shik Chang [Sun, 26 Mar 2006 06:53:37 +0000 (06:53 +0000)]
Utilize %zd for Py_ssize_t formatting instead of casting to long.

18 years agoAllow long objects as a position value of error callbacks returned.
Hye-Shik Chang [Sun, 26 Mar 2006 06:21:34 +0000 (06:21 +0000)]
Allow long objects as a position value of error callbacks returned.

18 years agoregsub is gone, nothing to ignore
Neal Norwitz [Sun, 26 Mar 2006 04:59:27 +0000 (04:59 +0000)]
regsub is gone, nothing to ignore

18 years agoTry to handle sys.getfilesystemencoding() returning None.
Neal Norwitz [Sun, 26 Mar 2006 03:11:57 +0000 (03:11 +0000)]
Try to handle sys.getfilesystemencoding() returning None.
ascii seems like the safest bet that it will exist.  I wonder if utf-8
would be a better choice?  This should get test_fileinput passing on OpenBSD.

18 years agoTighten an overbroad and misleading assertion.
Raymond Hettinger [Sun, 26 Mar 2006 03:11:29 +0000 (03:11 +0000)]
Tighten an overbroad and misleading assertion.
(Reported by Jim Jewett.)

18 years agoPatch #1443155: Add the incremental codecs support for CJK codecs.
Hye-Shik Chang [Sun, 26 Mar 2006 02:34:59 +0000 (02:34 +0000)]
Patch #1443155: Add the incremental codecs support for CJK codecs.
(reviewed by Walter Dörwald)

18 years agoGuarantee evaluation order for izip(). Document its creative uses and its limitations.
Raymond Hettinger [Sun, 26 Mar 2006 01:41:25 +0000 (01:41 +0000)]
Guarantee evaluation order for izip().  Document its creative uses and its limitations.

18 years agoTry to fix broken compile on openbsd.
Neal Norwitz [Sun, 26 Mar 2006 00:29:48 +0000 (00:29 +0000)]
Try to fix broken compile on openbsd.

18 years agoGet rid of warnings on some platforms by using %u for a size_t.
Neal Norwitz [Sat, 25 Mar 2006 23:55:39 +0000 (23:55 +0000)]
Get rid of warnings on some platforms by using %u for a size_t.

18 years agoAdd section headers and examples.
Raymond Hettinger [Sat, 25 Mar 2006 23:26:43 +0000 (23:26 +0000)]
Add section headers and examples.

18 years agoSF bug # 1457358 and patch # 1458419, floor division not documented. Patch by Andy.
Neal Norwitz [Sat, 25 Mar 2006 21:25:30 +0000 (21:25 +0000)]
SF bug # 1457358 and patch # 1458419, floor division not documented.  Patch by Andy.

Will backport.

18 years agoFound this in an old email message from Hartmut Goebel.
Skip Montanaro [Sat, 25 Mar 2006 14:12:03 +0000 (14:12 +0000)]
Found this in an old email message from Hartmut Goebel.

18 years agofix typo
Georg Brandl [Sat, 25 Mar 2006 13:12:56 +0000 (13:12 +0000)]
fix typo

18 years agoDon't decrement below zero. And add more tests.
Raymond Hettinger [Sat, 25 Mar 2006 12:15:04 +0000 (12:15 +0000)]
Don't decrement below zero.  And add more tests.

18 years agoMore extensive comment on __exit__ handling, per Guido's request.
Phillip J. Eby [Sat, 25 Mar 2006 04:32:12 +0000 (04:32 +0000)]
More extensive comment on __exit__ handling, per Guido's request.

18 years agoWhitespace normalization.
Tim Peters [Sat, 25 Mar 2006 01:50:43 +0000 (01:50 +0000)]
Whitespace normalization.

18 years agoYield is now allowed in try-finally, so update docs accordingly
Phillip J. Eby [Sat, 25 Mar 2006 00:46:43 +0000 (00:46 +0000)]
Yield is now allowed in try-finally, so update docs accordingly

18 years agoFix a problem with @contextmanager not detecting a broken generator
Phillip J. Eby [Sat, 25 Mar 2006 00:28:24 +0000 (00:28 +0000)]
Fix a problem with @contextmanager not detecting a broken generator
that yields after a throw().  Make @contextmanager not reraise
exceptions, but return a false value in that case instead.  Add test
cases for both behaviors.

18 years agoSupport throw() of string exceptions.
Phillip J. Eby [Sat, 25 Mar 2006 00:05:50 +0000 (00:05 +0000)]
Support throw() of string exceptions.

18 years agoRevert previous change. Wasn't ready yet.
Raymond Hettinger [Fri, 24 Mar 2006 23:55:32 +0000 (23:55 +0000)]
Revert previous change.  Wasn't ready yet.

18 years agoAdd more tests
Raymond Hettinger [Fri, 24 Mar 2006 23:47:53 +0000 (23:47 +0000)]
Add more tests