Commit Graph

33755 Commits

Author SHA1 Message Date
Tim Peters c17976e983 Another crack at bug #1460340: make random.sample(dict)
work, this time by ugly brute force.
2006-04-01 00:26:53 +00:00
Thomas Wouters 2a9a6b0e86 In the fdopen(fd, 'a') case on UNIX, don't try to set fd's flags to -1 if
fcntl() and fdopen() both fail. Will backport.
2006-03-31 22:38:19 +00:00
Georg Brandl c90397a7c9 Make test_socket_ssl finally pass on WIn 2006-03-31 21:12:32 +00:00
Georg Brandl ed02eb6aa9 Bug #1177964: make file iterator raise MemoryError on too big files 2006-03-31 20:31:02 +00:00
Georg Brandl 644b1e7aac Add guards against fcntl() not being available on Windows. 2006-03-31 20:27:22 +00:00
Georg Brandl 814727582a Update version number to 2.5 2006-03-31 20:02:40 +00:00
Georg Brandl 54a188aed8 bug #1461855: make os.fdopen() add the O_APPEND flag if using "a" mode.
glibc, for example, does this already on its own, but it seems that
the solaris libc doesn't. This leads to Python code being able to over-
write file contents even though having specified "a" mode.
2006-03-31 20:00:11 +00:00
Georg Brandl dcdfd22bb4 bug #1257988: don't bail out on gethostbyname(gethostname()) failure 2006-03-31 19:34:13 +00:00
Georg Brandl b88e19c1fc bug #1444104: add note about fdopen() to os.open(). 2006-03-31 19:20:13 +00:00
Georg Brandl d49be30938 Disable test_socket_ssl timeout test on Windows. 2006-03-31 19:09:56 +00:00
Georg Brandl ccadf84a1b Patch #1460496: round() now accepts keyword arguments. 2006-03-31 18:54:53 +00:00
Georg Brandl 338ef7d2bd Bug #1445068: getpass.getpass() can now be given an explicit stream
argument to specify where to write the prompt.
2006-03-31 18:42:16 +00:00
Georg Brandl 22ec80bc4f Patch #1462313, bug #1443328: the pickle modules now can handle classes
that have __private names in their __slots__.
2006-03-31 18:25:44 +00:00
Georg Brandl 43f08a85e4 Patch #1380952: fix SSL objects timing out on consecutive read()s 2006-03-31 18:01:16 +00:00
Georg Brandl dd2245f230 Bug #1250170, Patch #1462230: handle socket.gethostname()
failures gracefully
2006-03-31 17:18:06 +00:00
Jeremy Hylton 296aef8ebb Expand comments.
Explicitly clear all elements from arena->a_objects and remove
assert() that refcount is 1.  It's possible for a program to get a
reference to the list via sys.getobjects() or via gc functions.
2006-03-31 16:41:22 +00:00
Martin v. Löwis 22f3a6ae1c Add 2.5 libraries. 2006-03-31 16:19:18 +00:00
Georg Brandl 76a2caebed typos 2006-03-31 16:12:34 +00:00
Georg Brandl 51dbc4c879 traceback now shows error position for all SyntaxError subclasses,
e.g. IndentationError. (bug #1447885)
2006-03-31 15:59:13 +00:00
Georg Brandl 3bf538f13d Complete markup. 2006-03-31 15:38:44 +00:00
Thomas Wouters a6126ba890 Fix the reference leak in test_generators, by explicitly breaking the cycle
we are about to leave behind. An example of the cause of this leak can be
found in the leakers directory, in case we ever want to tackle the
underlying problem.
2006-03-31 15:31:43 +00:00
Walter Dörwald 58917a6083 Bug #947906: An object oriented interface has been added to the calendar
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
2006-03-31 15:26:22 +00:00
Martin v. Löwis 3f144f9fe0 Tagging for release r25a0 2006-03-31 15:21:36 +00:00
Martin v. Löwis abbb5e1f01 Remove tag, to recreate it right away. 2006-03-31 15:20:56 +00:00
Georg Brandl 4c974989d7 Add index entries for new-style/old-style class. 2006-03-31 15:12:16 +00:00
Georg Brandl b227bea292 object() is a function, not a base class. 2006-03-31 15:07:25 +00:00
Georg Brandl 1320cf8e61 Bug #1461610: xmlrpclib has no function "binary". 2006-03-31 14:35:10 +00:00
Walter Dörwald c44e14eba0 Fix typos. 2006-03-31 11:03:57 +00:00
Walter Dörwald 5d23f9a8a3 Don't add multiple empty lines at the end of the codec. With this a
regenerated codec should survive reindent.py unchanged.
2006-03-31 10:13:10 +00:00
Walter Dörwald a35b05ebd0 Clarify what the final argument does in
IncrementalDecoder.decode().
2006-03-31 09:15:29 +00:00
Neal Norwitz 602d339047 Add a NEWS entry for the Alpha fixes 2006-03-31 08:21:40 +00:00
Neal Norwitz dedeeaad04 Get gcc to do strict IEEE math. This flag was already used for cc, just not
gcc.  Without this flag, doing pretty much anything with NaNs causes
a Floating Point Exception signal.  This causes the interpreter to quit.
The failing tests this fixes are:  test_float, test_long, and test_struct.
This is somewhat equivalent to doing signal(SIGFPE, SIG_IGN).

Will verify if this is a problem in 2.4 and backport if necessary (probably).
2006-03-31 06:54:45 +00:00
Fred Drake 7b8cf38927 improve reporting of illegal section nesting (provide location which
caused detection of the error)
2006-03-31 05:30:19 +00:00
Fred Drake 842ab70ecf fix sectioning: cannot skip section levels 2006-03-31 05:28:38 +00:00
Tim Peters 46cc702b72 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.
2006-03-31 04:11:16 +00:00
Tim Peters ef57567de0 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.
2006-03-31 03:17:30 +00:00
Barry Warsaw 176014ffad 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.
2006-03-30 22:45:35 +00:00
Guido van Rossum c259cc9c4c Insert a safety space after numbers as well as names in untokenize(). 2006-03-30 21:43:35 +00:00
Ronald Oussoren 090f81588f 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.
2006-03-30 20:18:33 +00:00
Thomas Heller 0d93a23479 Try to fix test_loading on openbsd. 2006-03-30 19:16:15 +00:00
Thomas Heller 300269ae6f Oops - this should not have gone in. 2006-03-30 18:29:25 +00:00
Thomas Heller b320682577 Output more info when the test fails. 2006-03-30 17:49:55 +00:00
Armin Rigo 314861c568 Minor bugs in the __index__ code (PEP 357), with tests. 2006-03-30 14:04:02 +00:00
Anthony Baxter 4ef3a23a35 whitespace normalisation 2006-03-30 12:59:11 +00:00
Georg Brandl ecdc0a9f46 That one was a mistake. 2006-03-30 12:19:07 +00:00
Georg Brandl d37ac69ee5 Remove unnecessary casts from type object initializers. 2006-03-30 11:58:57 +00:00
Georg Brandl 347b30042b Remove unnecessary casts in type object initializers. 2006-03-30 11:57:00 +00:00
Thomas Heller 3987df5adf Try to build _ctypes on x86 openbsd. 2006-03-30 11:51:58 +00:00
Armin Rigo 5eca19b894 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.
2006-03-30 11:28:43 +00:00
Anthony Baxter 67b6d516ce Fixed bug #1459029 - unicode reprs were double-escaped. 2006-03-30 10:54:07 +00:00