Commit Graph

25429 Commits

Author SHA1 Message Date
Kurt B. Kaiser 7cca3d8ef0 Improve exception handling. 2002-12-31 23:18:00 +00:00
Neal Norwitz 13af1142fc Try to get compilation working for cygwin 2002-12-31 21:55:16 +00:00
Jason Tishler bbe8961698 Patch #660485: Cygwin _tkinter Tcl/Tk 8.3 patch
The attached patch enables Cygwin Python to
build cleanly against the latest Cygwin Tcl/Tk
which is based on Tcl/Tk 8.3. It also prevents
building against the real X headers, if installed.
2002-12-31 20:30:46 +00:00
Fred Drake 8f1f8f13e4 The trunk is (nominally) post-alpha. 2002-12-31 20:26:25 +00:00
Guido van Rossum a3a243e977 Merge to trunk from release branch:
Plug the leak that Tim just reported.
2002-12-31 19:50:03 +00:00
Barry Warsaw b1dcbd223e Make two tests non-locale-dependent 2002-12-31 19:27:45 +00:00
Andrew M. Kuchling f15fb2926b Results of a rewrite pass 2002-12-31 18:34:54 +00:00
Fred Drake 0f8e543159 - use classdesc where we can (for better indexing)
- more style consistency crud
2002-12-31 18:31:48 +00:00
Jeremy Hylton 1856541142 Replace all but one explicit emit('SET_LINENO') with call to set_lineno().
Remove broken code in visitDict().  I assume the code was trying to
add set lineno events for each line of a dict constructor, but I think
it was using the wrong object (node instead of k or v).
2002-12-31 18:26:17 +00:00
Tony Lownds cf94ee817c Don't let the docstring end up in __main__.__doc__ 2002-12-31 18:22:37 +00:00
Barry Warsaw bc38baffbd test01_close_dbenv_before_db(): Added an XXX comment that this test is
BerkeleyDB version dependent.
2002-12-31 18:21:43 +00:00
Neal Norwitz 0aae2b07d7 Comment out test, since it hangs on HPUX, still investigating 2002-12-31 18:21:11 +00:00
Jeremy Hylton accb62b28e SF patch [ 597919 ] compiler package and SET_LINENO
A variety of changes from Michael Hudson to get the compiler working
with 2.3.  The primary change is the handling of SET_LINENO:

# The set_lineno() function and the explicit emit() calls for
# SET_LINENO below are only used to generate the line number table.
# As of Python 2.3, the interpreter does not have a SET_LINENO
# instruction.  pyassem treats SET_LINENO opcodes as a special case.

A few other small changes:
 - Remove unused code from pycodegen and pyassem.
 - Fix error handling in parsermodule.  When PyParser_SimplerParseString()
   fails, it sets an exception with detailed info.  The parsermodule
   was clobbering that exception and replacing it was a generic
   "could not parse string" exception.  Keep the original exception.
2002-12-31 18:17:44 +00:00
Fred Drake 436eadd455 General style conformance. Markup some unmarked constructs. 2002-12-31 18:13:11 +00:00
Kurt B. Kaiser 2cb540253b Update (slightly) for Alpha release 2002-12-31 18:12:04 +00:00
Martin v. Löwis 64aa5f6982 Remove bogus test; the master is not a terminal on Solaris and HP-UX. 2002-12-31 18:05:15 +00:00
Kurt B. Kaiser 085ce5a77a Move history to HISTORY.txt 2002-12-31 17:57:44 +00:00
Kurt B. Kaiser f5934dd5f8 Update for Alpha 0 Release 2002-12-31 17:56:18 +00:00
Guido van Rossum f970d61c92 Add recipe for creating NEWS.html. 2002-12-31 17:51:30 +00:00
Tim Peters 521fc15e62 A new, and much hairier, implementation of astimezone(), building on
an idea from Guido.  This restores that the datetime implementation
never passes a datetime d to a tzinfo method unless d.tzinfo is the
tzinfo instance whose method is being called.  That in turn allows
enormous simplifications in user-written tzinfo classes (see the Python
sandbox US.py and EU.py for fully fleshed-out examples).

d.astimezone(tz) also raises ValueError now if d lands in the one hour
of the year that can't be expressed in tz (this can happen iff tz models
both standard and daylight time).  That it used to return a nonsense
result always ate at me, and it turned out that it seemed impossible to
force a consistent nonsense result under the new implementation (which
doesn't know anything about how tzinfo classes implement their methods --
it can only infer properties indirectly).  Guido doesn't like this --
expect it to change.

New tests of conversion between adjacent DST-aware timezones don't pass
yet, and are commented out.

Running the datetime tests in a loop under a debug build leaks 9
references per test run, but I don't believe the datetime code is the
cause (it didn't leak the last time I changed the C code, and the leak
is the same if I disable all the tests that invoke the only function
that changed here).  I'll pursue that next.
2002-12-31 17:36:56 +00:00
Martin v. Löwis ba2f875d90 Eliminate C++ comment. 2002-12-31 17:34:30 +00:00
Raymond Hettinger f621232c0d Use funcdesc instead of classdesc to be consistent with out sections. 2002-12-31 17:24:50 +00:00
Fred Drake e2c649126e Further cleanup of exceptions. All interpolation-related exceptions
now derive from InterpolationError, which is not raised directly (only
subclasses get raised).  This matches what the docs already said.
2002-12-31 17:23:27 +00:00
Skip Montanaro 6c5bc3457c Bernhard Herzog's paragraph and string-filling code. I've been using it for
a month or two with great success.  Barry may want to tweak it some, but I
think it's a worthwhile enough addition to get some more people trying it
out.
2002-12-31 16:56:20 +00:00
Tony Lownds d8a6c5f4f4 Keep __main__ namespace clean 2002-12-31 16:52:44 +00:00
Just van Rossum 5e156add1f modulefinder.py moved to Lib/ 2002-12-31 16:38:01 +00:00
Raymond Hettinger 6222958500 Spelling fix 2002-12-31 16:37:03 +00:00
Guido van Rossum 768158c11b Fix an out-of-bound index in pmerge() discovered by Zooko (SF bug
645404).  I'm not 100% sure this is the right fix, so I'll keep the
bug report open for Samuele, but this fixes the index error and passes
the test suite (and I can't see why it *shouldn't* be the right fix
:-).
2002-12-31 16:33:01 +00:00
Just van Rossum e29310a2b3 patch attached to sf item #643711:
any_missing() returns less bogus missing modules.

- I've rewritten scan_code() more or less from scratch,
factored bits and pieces out for readability.
- keep track of global assignments and failed imports per
module; use this to determine whether the Y in "from X
import Y" is a submodule or just a global name. This is not
100% doable: you can't tell which symbols are imported when
doing a star import of a non-Python module short of actually
importing it.
- added a new method to ModuleFinder: any_missing_maybe(),
which returns *two* lists, one with certain misses, one with
possible misses. The possible misses are *very* often false
alarms, so it's useful to keep this list separate.
any_misses() now simply returns the union of
any_missing_maybe().

TODO: documentation, test_modulefinder.py
2002-12-31 16:33:00 +00:00
Raymond Hettinger cbd6cd2312 Add markup for time object.
Cleanup whitespace.
Fix unbalanced parenthesis.
2002-12-31 16:30:49 +00:00
Just van Rossum 41c554fbec moving modulefinder.py to the standard library 2002-12-31 16:27:33 +00:00
Neal Norwitz 6700e47b3c Fix compilation errors on HPUX11 2002-12-31 16:16:07 +00:00
Kurt B. Kaiser 6655e4bc27 Whitespace Normalization 2002-12-31 16:03:23 +00:00
Tim Peters 9532298c82 Removed the now-untrue (or soon-to-be untrue) part of the astimezone()
docs.  Replaced it with an XXX block, because the hoped-for treatment
of DST endcases remains unclear (Guido doesn't really like raising an
exception when it's impossible to deliver a correct result, but so
far I have no way in hand to consistently deliver a defined incorrect
result either).
2002-12-31 16:01:47 +00:00
Just van Rossum 3f0b542f25 removed unused get_short() function 2002-12-31 15:47:42 +00:00
Guido van Rossum ae5488609a Set the release date. 2002-12-31 15:47:36 +00:00
Eric S. Raymond 2852cbaf26 Document the new ,netrc awareness in nntplib. 2002-12-31 15:28:44 +00:00
Fred Drake f91b4619e0 Barry raised reasonable objections to the macro name \mimeheader, so
we'll simply revert to \mailheader since there's no other good name.
2002-12-31 15:23:09 +00:00
Fred Drake f14730a49a - correct the deprecation markups so this formats again
- some minor cleanups
2002-12-31 15:10:49 +00:00
Martin v. Löwis c8b2e770cf Restore signalhandler in case of error. Fix type of signal handler. 2002-12-31 14:30:26 +00:00
Raymond Hettinger c5f5f87f74 Complete the markup for timedelta objects.
Fix a curly brace that should have been a paren.
2002-12-31 14:26:54 +00:00
Andrew M. Kuchling ae3bbf57bf Add posix.loadavg()
Add some times
2002-12-31 14:03:45 +00:00
Guido van Rossum 5ee95474c1 Revert SF patch 659809 -- it causes double options that can cause breakage. 2002-12-31 13:48:29 +00:00
Neal Norwitz f3edea5b90 Use the name (path) specified in the parameter list 2002-12-31 13:38:28 +00:00
Martin v. Löwis b96152c42e Add getloadavg. 2002-12-31 13:20:15 +00:00
Martin v. Löwis 96a60e4af5 Patch #658927: Add getctime to os.path.
Document that getatime and getmtime may return floats.
2002-12-31 13:11:54 +00:00
Martin v. Löwis 24a880b499 Patch #656590: /dev/ptmx support for ptys. 2002-12-31 12:55:15 +00:00
Neal Norwitz b70557f13d Make sure zip_path is null-terminated, since it's on the stack 2002-12-31 12:45:12 +00:00
Martin v. Löwis 5c37a7717d Document standard encodings. 2002-12-31 12:39:07 +00:00
Neal Norwitz a8aed02f1e Make sure zip_path is null-terminated, since it's on the stack 2002-12-31 12:35:41 +00:00