Commit Graph

10085 Commits

Author SHA1 Message Date
Anthony Baxter 451ae18751 [ 1197218 ] test_locale fix on modern linux
On more modern linuxes (and probably others) straight 'en_US' isn't a
valid locale. Make the code try a couple of alternates.

backport candidate
2005-06-03 15:04:15 +00:00
Michael W. Hudson df88846ebc This is my patch:
[ 1180995 ] binary formats for marshalling floats

Adds 2 new type codes for marshal (binary floats and binary complexes), a
new marshal version (2), updates MAGIC and fiddles the de-serializing of
code objects to be less likely to clobber the real reason for failing if
it fails.
2005-06-03 14:41:55 +00:00
Georg Brandl 268e61cf74 Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.
2005-06-03 14:28:50 +00:00
Michael W. Hudson e7fa1af85b M-x untabify 2005-06-03 13:55:58 +00:00
Gregory P. Smith e4ed2de260 pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
functions written in python.

contributed by <frederic.gobry@epfl.ch>
2005-06-03 07:03:07 +00:00
Andrew M. Kuchling 3554cad009 [Bug #1177831] Exercise (?(id)yes|no) for a group other than the first one 2005-06-02 13:38:45 +00:00
Andrew M. Kuchling c30faa812c [Bug #1177831] Fix generation of code for GROUPREF_EXISTS. Thanks to Andre Malo for the fix. 2005-06-02 13:35:52 +00:00
Neil Schemenauer f36947032f Fix compiler.ast.flatten function so that it works on lists. 2005-06-02 05:55:20 +00:00
Andrew M. Kuchling 76276177de [Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box 2005-06-02 00:10:04 +00:00
Piers Lauder d80ef02ec0 added GET/SETANNOTATION methods 2005-06-01 23:50:52 +00:00
Michael W. Hudson ba283e2b7f This is my patch:
[ 1181301 ] make float packing copy bytes when they can

which hasn't been reviewed, despite numerous threats to check it in
anyway if noone reviews it.  Please read the diff on the checkin list,
at least!

The basic idea is to examine the bytes of some 'probe values' to see if
the current platform is a IEEE 754-ish platform, and if so
_PyFloat_{Pack,Unpack}{4,8} just copy bytes around.

The rest is hair for testing, and tests.
2005-05-27 15:23:20 +00:00
Michael W. Hudson ff52286d4a Fix test_site to not call open('...', 'wU'), as that now raises an error.
Is anyone running the test suite regularly at the moment?
2005-05-27 14:58:06 +00:00
Skip Montanaro bbf12ba7b2 Disallow opening files with modes 'aU' or 'wU' as specified by PEP
278. Closes bug 967182.
2005-05-20 03:07:06 +00:00
Tim Peters fffc4b7b3a Whitespace normalization. 2005-05-18 02:18:09 +00:00
Armin Rigo 57179feec8 This test relied on short-circuiting details of dictobject.py to avoid
crashing, and indirectly on the fact that hash codes in
random.randrange(1000000000) were very unlikely to exhibit collisions.
To see the problem, replace this number with 500 and observe the crash on
either del target[key] or del keys[i].

The fix prevents recursive mutation, just as in the key insertion case.
2005-05-15 13:29:26 +00:00
Skip Montanaro 174dd2219d Add better datetime support to xmlrpclib module. Closes patch #1120353. 2005-05-14 20:54:16 +00:00
Kurt B. Kaiser 935ea9a0b2 Improve subprocess link error notification
M NEWS.txt
M PyShell.py
M rpc.py
2005-05-10 03:44:24 +00:00
Raymond Hettinger 77d08bcfc2 SF bug #1193890: calendar.weekheader not found in __all__ 2005-05-10 03:20:12 +00:00
Kurt B. Kaiser 20345fb8aa Use Queue's blocking feature instead of sleeping in the main
loop.  Patch # 1190163 Michiel de Hoon
2005-05-05 23:29:54 +00:00
Michael W. Hudson abb103b17a Don't use 'is not' to compare strings.
(spotted by reading pypy-svn :)
2005-05-04 11:59:38 +00:00
Raymond Hettinger 42406e6f27 SF patch #1191489: Simplify logic in random.py 2005-04-30 09:02:51 +00:00
Brett Cannon 53e9a8b9f3 Fix error in a docstring where a single quote started the docstring but triple
quote ended it.

Closes bug #1192777.  Thanks Christopher Smith.
2005-04-30 05:50:19 +00:00
Guido van Rossum ebbffd42f3 Fixed a typo in docstring I happened upon. 2005-04-30 00:20:35 +00:00
Brett Cannon c3647ac93e Make subclasses of int, long, complex, float, and unicode perform type
conversion using the proper magic slot (e.g., __int__()).  Also move conversion
code out of PyNumber_*() functions in the C API into the nb_* function.

Applied patch #1109424.  Thanks Walter Doewald.
2005-04-26 03:45:26 +00:00
Martin v. Löwis d7c795e729 Make parse_makefile fallback to environment variables if nothing is
defined in the makefile. Get CFLAGS from the Makefile, instead of
getting OPT, BASE_CFLAGS and EXTRA_CFLAGS individually.
2005-04-25 07:14:03 +00:00
Brett Cannon 08cd598c21 Introduced EXTRA_CFLAGS as an environment variable used by the Makefile. Meant
to be used for flags that change binary compatibility.

Distutils was tweaked to also use the variable if used during compilation of
the interpreter.
2005-04-24 22:26:38 +00:00
Walter Dörwald 43148c8413 Update test to the current readline() behaviour. 2005-04-21 21:45:36 +00:00
Walter Dörwald a4eb2d56a4 Fix comment. 2005-04-21 21:42:35 +00:00
Walter Dörwald bc8e642c1b If the data read from the bytestream in readline() ends in a '\r' read one more
byte, even if the user has passed a size parameter. This extra byte shouldn't
cause a buffer overflow in the tokenizer. The original plan was to return a line
ending in '\r', which might be recognizable as a complete line and skip any '\n'
that was read afterwards. Unfortunately this didn't work, as the tokenizer only
recognizes '\n' as line ends, which in turn lead to joined lines and
SyntaxErrors, so this special treatment of a split '\r\n' has been dropped. (It
can only happen with a temporarily exhausted bytestream now anyway.)
Fixes parts of SF bugs #1163244 and #1175396.
2005-04-21 21:32:03 +00:00
Barry Warsaw b180c06a54 Fix tests dependent on the exception raised by non-settable descriptors. 2005-04-20 19:41:36 +00:00
Tim Peters e890682e52 Whitespace normalization. 2005-04-20 17:45:13 +00:00
Anthony Baxter fa7e6b46ef typo fix, thanks Jeremy Sanders 2005-04-15 06:17:20 +00:00
Brett Cannon f4189916e3 Flush out support for ``class B(): pass`` syntax by adding support to the
'parser' module and 'compiler' package.

Closes patch #1176012.  Thanks logistix.
2005-04-09 02:30:16 +00:00
Brett Cannon 4ebc7e3bd0 Add test for ``class B1(): pass``. 2005-04-09 01:27:37 +00:00
Tim Peters f754f5fd68 test_default_encoding_issues(): Fully restore sys.setdefaultencoding.
test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone.  Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.

Don't know whether this is a bugfix (backport) candidate.
2005-04-08 18:00:59 +00:00
Raymond Hettinger c88a6c75df SF bug #1168983: ftplib.py string index out of range
* resp[:1] in '123' # after Py2.2, this allowed blank responses to pass.
* replace <> with !=
* provide a usage message for empty command line calls

Backport candidate.
2005-04-05 04:31:09 +00:00
Walter Dörwald 714f87821f Fix typos. 2005-04-04 21:42:22 +00:00
Walter Dörwald 7a6dc139de Fix for SF bug #1175396: readline() will now read one more character, if
the last character read is "\r" (and size is None, i.e. we're allowed to
call read() multiple times), so that we can return the correct line ending
(this additional character might be a "\n").

If the stream is temporarily exhausted, we might return the wrong line ending
(if the last character read is "\r" and the next one (after the byte stream
provides more data) is "\n", but at least the atcr member ensure that we
get the correct number of lines (i.e. this "\n" will not be treated as
another line ending.)
2005-04-04 21:38:47 +00:00
Hye-Shik Chang ac89f6ef29 Fix testcase for 64bit BSD systems: long is 8 bytes for those systems
so there's no need to pad after off_t members.  And a small typo fix.
2005-04-04 15:21:04 +00:00
Vinay Sajip 4a70486c37 Added threadName and now using re-entrant lock 2005-03-31 20:16:55 +00:00
Walter Dörwald a6e8a4ad12 Since PyPI only accepts UTF-8 encoded data now, make sure that the data is
properly encoded and include the encoding in the Content-Type header.
2005-03-31 13:57:38 +00:00
Michael W. Hudson e2749cb264 Fix for rather inaccurately titled bug
[ 1165306 ] Property access with decorator makes interpreter crash

Don't allow the creation of unbound methods with NULL im_class, because
attempting to call such crashes.

Backport candidate.
2005-03-30 16:32:10 +00:00
Tim Peters b7e99b642f SF patch 1167316: doctest.py fails self-test if run directly.
Patch by Ilya Sandler.

Bugfix candidate.
2005-03-28 23:50:54 +00:00
Tim Peters eba28bea9b Whitespace normalization. 2005-03-28 01:08:02 +00:00
Tim Peters 700f36c752 Two lines in this file had unbalanced parentheses -- couldn't possibly
work (SyntaxErrors at compile time).

I slammed in what looked like the obvious fixes, but someone who
understands this file should check my work.
2005-03-28 01:05:48 +00:00
Raymond Hettinger fdf3bd6630 SF patch #1171417: bug fix for islice() in docs 2005-03-27 20:11:44 +00:00
Raymond Hettinger 267b868f23 * Fix decimal's handling of foreign types. Now returns NotImplemented
instead of raising a TypeError.  Allows other types to successfully
  implement __radd__() style methods.
* Remove future division import from test suite.
* Remove test suite's shadowing of __builtin__.dir().
2005-03-27 10:47:39 +00:00
Raymond Hettinger e6c470f255 SF bug #1770766: weakref proxy has incorrect __nonzero__ behavior. 2005-03-27 03:04:54 +00:00
Martin v. Löwis ca5d8fea3d Add missing socket import 2005-03-24 19:40:57 +00:00
Fred Drake c6699b7dc4 minor cleanup 2005-03-24 07:00:05 +00:00