Commit Graph

37453 Commits

Author SHA1 Message Date
Christian Heimes 02c9ab568d Fixed problems in the last commit. Filenames and line numbers weren't reported correctly.
Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.
2007-11-23 12:12:02 +00:00
Christian Heimes 729ab15370 Applied patch #1754273 and #1754271 from Thomas Glee
The patches are adding deprecation warnings for back ticks and <>
2007-11-23 09:10:36 +00:00
Christian Heimes 2336111aef Backport of PCbuild9 fixes from py3k r59130 2007-11-23 07:05:03 +00:00
Brett Cannon eaa2c980ee Fix a bug in the test for using __loader__.get_data(). 2007-11-23 00:06:51 +00:00
Christian Heimes e8954f8ce7 Backport of the PCbuild9 directory from the py3k branch.
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)
2007-11-22 11:21:16 +00:00
Guido van Rossum 64c06e327d Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
With some changes of my own thrown in (e.g. backport of r58107).
2007-11-22 00:55:51 +00:00
Christian Heimes cc7f26bf20 Final fix for #1403
The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.
2007-11-21 02:50:06 +00:00
Amaury Forgeot d'Arc f57375af28 Add a NEWS entry for r59076. 2007-11-21 01:38:26 +00:00
Christian Heimes 3f065a414a Added NEWS entry
Thanks for the reminder, Brett
2007-11-21 01:17:28 +00:00
Brett Cannon 9db1d5a379 Add a missing check before deleting a package's __loader__. 2007-11-21 00:58:03 +00:00
Brett Cannon 43e53f85b6 doctest assumed that a package's __loader__.get_data() method used universal
newlines; it doesn't.  To rectify this the string returned replaces all
instances of os.linesep with '\n' to fake universal newline support.

Backport candidate.
2007-11-21 00:47:36 +00:00
Christian Heimes 901071bde5 Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress 2007-11-21 00:46:21 +00:00
Brett Cannon 0e5edf5afd Remove a unneeded line that had typos. 2007-11-21 00:16:20 +00:00
Amaury Forgeot d'Arc 5087980c1e The incremental decoder for utf-7 must preserve its state between calls.
Solves issue1460.

Might not be a backport candidate: a new API function was added,
and some code may rely on details in utf-7.py.
2007-11-20 23:31:27 +00:00
Nick Coghlan 8c4592a77a Backport some main.c cleanup from the py3k branch 2007-11-20 14:55:57 +00:00
Christian Heimes 547867e13a Another fix for test_shutil. Martin pointed out that it breaks some build bots 2007-11-20 03:21:02 +00:00
Martin v. Löwis 0ffdacd53b Patch #1468: Package Lib/test/*.pem. 2007-11-20 02:46:02 +00:00
Christian Heimes 044d709111 Fixed bug #1470 2007-11-20 01:48:48 +00:00
Guido van Rossum 4673e19d8b Fix the OSX failures in this test -- they were due to /tmp being a symlink
to /private/tmp.  Adding a call to os.path.realpath() to temp_dir() fixed it.
2007-11-19 17:50:22 +00:00
Guido van Rossum 089816ba0b Make this work stand-alone, too. 2007-11-19 17:35:24 +00:00
Facundo Batista c0458830fb Fixed detail in add_type() explanation (issue 1463). 2007-11-19 16:30:24 +00:00
Nick Coghlan 8f6793b540 Enable some test_cmd_line_script debugging output to investigate failure on Mac OSX buildbot 2007-11-19 13:56:27 +00:00
Walter Dörwald 183744d6b9 Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
calling codecs.utf_8_decode() with final==True, which falled with incomplete
byte sequences. Fix and test by James G. Sack.
2007-11-19 12:41:10 +00:00
Walter Dörwald fc7e72d1c6 Fix typo in comment. 2007-11-19 12:14:05 +00:00
Neal Norwitz 76e4d62822 Use a slightly more recent version than 1.5.2b2. 2007-11-19 01:46:20 +00:00
Nick Coghlan 327a39b047 Patch #1739468: Directories and zipfiles containing __main__.py are now executable 2007-11-18 11:56:28 +00:00
Brett Cannon 5cf449cfb2 Remove a confusing sentence about pth files and which directories are searched
for them.

Closes issue #1431.  Thanks Giambattista Bloisi for the help.
2007-11-17 07:07:29 +00:00
Raymond Hettinger 8465ae8cea Fix signature in example 2007-11-17 01:51:22 +00:00
Facundo Batista 6f7e6fb7a2 Made _ParseTupleFinds only defined to unicodeobject.c 2007-11-16 19:16:15 +00:00
Facundo Batista 292a069b88 Fix for stupid error (I need to remember to do a full 'make clean + make'
cycle before the tests...). Sorry.
2007-11-16 18:41:24 +00:00
Facundo Batista 57d5669f4b Now in find, rfind, index, and rindex, you can use None as defaults,
as usual with slicing (both with str and unicode strings).  This
fixes issue 1259.

For str only the stringobject.c file was modified.  But for unicode,
I needed to repeat in the four functions a lot of code, so created
a new function that does part of the job for them (and placed it in
find.h, following a suggestion of Barry).

Also added tests for this behaviour.
2007-11-16 18:04:14 +00:00
Guido van Rossum 5397fd1a51 A patch from issue 1378 by roudkerk:
Currently on Windows set_error() make use of a large array which maps
socket error numbers to error messages.

This patch removes that array and just lets PyErr_SetExcFromWindowsErr()
generate the message by using the Win32 function FormatMessage().
2007-11-16 00:24:44 +00:00
Bill Janssen 414c2b0819 add the certificate for the Python SVN repository for testing SSL 2007-11-15 23:03:03 +00:00
Raymond Hettinger bc693491eb Add example for use cases requiring default values. 2007-11-15 22:39:34 +00:00
Raymond Hettinger 7c3738e11c Example of multiple replacements. 2007-11-15 03:16:09 +00:00
Raymond Hettinger 213ae014db Fixup example in docs. 2007-11-15 02:58:20 +00:00
Raymond Hettinger 5681cbce81 Small improvement to the implementation of __replace__(). 2007-11-15 02:55:42 +00:00
Raymond Hettinger eeeb9c4445 Accept Issac Morland's suggestion for __replace__ to allow multiple replacements
(suprisingly, this simplifies the signature, improves clarity, and is comparably fast).
Update the docs to reflect a previous change to the function name.
Add an example to the docs showing how to override the default __repr__ method.
2007-11-15 02:44:53 +00:00
Raymond Hettinger b5e5d0741a Add test for __fields__ being read-only 2007-11-14 23:02:30 +00:00
Raymond Hettinger 78f27e001b Make __fields__ read-only. Suggested by Issac Morland 2007-11-14 22:56:16 +00:00
Georg Brandl b5b6f3c46e Remove dead link from random docs. 2007-11-14 13:59:09 +00:00
Amaury Forgeot d'Arc 0d75f09177 Merge from py3k branch:
Correction for issue1265 (pdb bug with "with" statement).

When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set.  This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.

It is necessary to save/restore the exception around the call to the trace
function.

This happens a lot with py3k: isinstance() of an ABCMeta instance runs
    def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        return any(cls.__subclasscheck__(c)
                   for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.

Backport candidate, even if the case is less frequent in 2.5.
2007-11-13 21:54:28 +00:00
Guido van Rossum 0288cb0ba8 Add the test from issue 1704621 (the issue itself is already fixed here). 2007-11-12 20:06:40 +00:00
Christian Heimes 1bc4af4bdd readline module cleanup
fixed indention to tabs
use Py_RETURN_NONE macro
added more error checks to on_completion_display_matches_hook

open question: Does PyList_SetItem(l, i, o) steal a reference to o in the case of an error?
2007-11-12 18:58:08 +00:00
Walter Dörwald edc526c161 Fix TextCalendar.prweek(). This closes issue #1427. 2007-11-12 10:01:33 +00:00
Martin v. Löwis 63bf149a26 Patch #1418: Make the AC_REPLACE_FUNCS object files actually work. 2007-11-12 05:14:05 +00:00
Martin v. Löwis f354894e7b Only set rl_completion_display_matches_hook if there
is a Python hook function. Fixes #1425.
2007-11-12 04:53:02 +00:00
Andrew M. Kuchling abfe45368c Re-word sentence 2007-11-12 01:25:21 +00:00
Christian Heimes ced1646b9e Fix for #1427: Error in standard module calendar
the prweek() method is still broken and I can't figure out how it suppose to work.
2007-11-12 01:20:56 +00:00
Christian Heimes 3d4c316f17 Added new decorator syntax to property.__doc__
Guido prefers _x over __x.
2007-11-12 01:15:40 +00:00