Commit Graph

7372 Commits

Author SHA1 Message Date
Skip Montanaro b3b22f3a29 flesh out open() docstring 2003-01-21 01:53:09 +00:00
Tim Peters 327098a613 New rule for tzinfo subclasses handling both standard and daylight time:
When daylight time ends, an hour repeats on the local clock (for example,
in US Eastern, the clock jumps from 1:59 back to 1:00 again).  Times in
the repeated hour are ambiguous.  A tzinfo subclass that wants to play
with astimezone() needs to treat times in the repeated hour as being
standard time.  astimezone() previously required that such times be
treated as daylight time.  There seems no killer argument either way,
but Guido wants the standard-time version, and it does seem easier the
new way to code both American (local-time based) and European (UTC-based)
switch rules, and the astimezone() implementation is simpler.
2003-01-20 22:54:38 +00:00
Kurt B. Kaiser 0b743441a6 ...and the old pyclbr.py faked Function instances with Class instances
which had empty method and super attributes.  ClassBrowser.IsExpandable()
could not handle the missing attributes.  SF Bug 667787.
2003-01-20 04:49:37 +00:00
Walter Dörwald ea4250df7d Add comments and remove duplicate tests. 2003-01-20 02:34:07 +00:00
Walter Dörwald e28be59686 Port test_userdict.py to PyUnit. From SF patch #662807,
with additional tests for setdefault(), pop() and popitem().
2003-01-19 23:26:59 +00:00
Walter Dörwald 28256f276e Port test_unicode.py to PyUnit and add tests for error
cases and a few methods. This increases code coverage
in Objects/unicodeobject.c from 81% to 85%.
(From SF patch #662807)
2003-01-19 16:59:20 +00:00
Walter Dörwald 919497ea74 Combine test_b1.py and test_b2.py into test_builtin.py,
port the tests to PyUnit and add many tests for error
cases. This increases code coverage in Python/bltinmodule.c
from 75% to 92%. (From SF patch #662807, with
assert_(not fcmp(x, y)) replaced with assertAlmostEqual(x, y)
where possible)
2003-01-19 16:23:59 +00:00
Raymond Hettinger 2e7b748a9e SF patch #634557: inspect.BlockFinder didn't do a good enough job finding
the end of code blocks.

Patch contributed by Patrick O'Brien.
2003-01-19 13:21:20 +00:00
Tim Peters 80cebc16aa SF patch 670194: Performance enhancement for _strptime.py.
From Brett Cannon.  Mostly speedups via caching format string ->
compiled regexp.
2003-01-19 04:40:44 +00:00
Raymond Hettinger 6550051691 SF bug #668906: class browser raises AttributeError
The Py2.3 updates to the pyclbr module return both Class and Function
objects.  The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".

Fixed by adding a guard.
2003-01-19 02:37:41 +00:00
Raymond Hettinger 9543b34006 SF patch #670423: Add missing identity tests to operator.c 2003-01-18 23:22:20 +00:00
Tim Peters 08e54270f2 SF patch 670012: Compatibility changes for _strptime.py.
Patch from Brett Cannon:

    First, the 'y' directive now handles [00, 68] as a suffix for the
    21st century while [69, 99] is treated as the suffix for the 20th
    century (this is for Open Group compatibility).

    strptime now returns default values that make it a valid date ...

    the ability to pass in a regex object to use instead of a format
    string (and the inverse ability to have strptime return a regex object)
    has been removed. This is in preparation for a future patch that will
    add some caching internally to get a speed boost.
2003-01-18 03:53:49 +00:00
Jack Jansen e58962af4d Fixed the first two bugs in the new file dialogs (found by Just):
- AskFileForSave didn't work for string return values
- filterProc didn't work.
2003-01-17 23:13:03 +00:00
Just van Rossum 504377d4dd make sure src exists before creating a symlink 2003-01-17 20:02:06 +00:00
Raymond Hettinger 7b0cf76b72 * Migrate sample distribution test from random.py to test_random.py.
* Use Sets module to more clearly articulate a couple of tests.
2003-01-17 17:23:23 +00:00
Jack Jansen f0d12da482 Added methods AskFileForOpen(), AskFileForSave() and AskFolder(). These
are going to replace StandardGetFile() and friends. Main differences are
that these allow you to ask for specific datatypes to be returned (FSSpec,
FSRef, string, unicode or subtypes thereof) and that they provide access
to underlying features of Navigation Services through keyword arguments.
2003-01-17 16:04:39 +00:00
Gregory P. Smith b6c9f78074 bugfix: do not double-close DB cursor during deallocation when the
underlying DB has already been closed (and thus all of its cursors).
        This fixes a potential segfault.
        SF pybsddb bug id 667343
bugfix: close the DB object when raising an exception due to an error
        during DB.open.  This prevents an exception when closing the
        environment about not all databases being closed.
        SF pybsddb bug id 667340
2003-01-17 08:42:50 +00:00
Gregory P. Smith c25fd3fb48 bugfix: disallow use of DB_TXN after commit() or abort(), prevents a
coredump or segmentation violation.

Sourceforge patch ID 664896:
http://sourceforge.net/tracker/index.php?func=detail&aid=664896&group_id=13900&atid=313900

The bug was reported on the pybsddb-users mailing list.
2003-01-17 07:52:59 +00:00
Kurt B. Kaiser 5ec186b1cb Patch 611069 (Christos Georgiou) IDLE TODO:left/right when selected text
M EditorWindow.py
M NEWS.txt
M TODO.txt
2003-01-17 04:04:06 +00:00
Kurt B. Kaiser 9fd0799ff5 SF Bug 667812: Some Linux distros have Alt and Meta reversed. 2003-01-16 21:40:21 +00:00
Raymond Hettinger 6aa1c3f4cc Let test_random cover the endpoints.
Strengthen slicing tests.
Improved variable names.
2003-01-16 14:00:15 +00:00
Raymond Hettinger a9f18dc0f0 Test optional slice arguments.
Add backwards compatibility test.
2003-01-16 13:02:25 +00:00
Raymond Hettinger 4422375c72 Added doctest for examples in the library reference.
Added random test from bisect to augment the finite precomputed checks.
2003-01-16 12:31:36 +00:00
Raymond Hettinger d230550a6b Convert to unittest format so that more tests can be added cleanly. 2003-01-16 12:02:35 +00:00
Martin v. Löwis 6f2adc7cd0 Catch IOErrors. 2003-01-16 11:02:43 +00:00
Martin v. Löwis 71b755646a Support copying booleans. Fixes #668925. 2003-01-16 10:40:00 +00:00
Mark Hammond d800ae12f2 This test previously failed when run from the 'test' directory. In that
case, the test module created is actually a sub-package of 'test', thus
the module is named 'test.areallylongpackage...' - this caused failure.

Replace the hard-coded module names with __name__ attributes, which
correctly reflects any hierarchy.
2003-01-16 04:56:52 +00:00
Jack Jansen 8834009338 On Mac OS X calling setlocale will raise locale.Error. This isn't fatal,
so just continue testing. Fixes #668787.
2003-01-15 23:43:02 +00:00
Jack Jansen 62fe75509c Checking in Brett Cannon's patch #662053, which fixes bug #661354.
_strptime can now handle getting two empty strings as the timezone information.
2003-01-15 22:59:39 +00:00
Jack Jansen 791f7d4783 Added ismount().
Fixes #661762, bugfix candidate.
2003-01-15 22:45:48 +00:00
Jack Jansen 2d0909b9cb Implemented FSCatalogInfo structure support, and used this to implement
FSSpec.SetDates() and GetDates(). Closes #662836.
2003-01-15 22:36:16 +00:00
Raymond Hettinger 2dc505e058 * Add test for __cmp__()
* Add doctest for example in the library reference manual
2003-01-15 16:15:38 +00:00
Martin v. Löwis 0c6774d92b Patch #661719: Expose compilation errors as exceptions on request. 2003-01-15 11:51:06 +00:00
Martin v. Löwis d69663d300 Patch #473586: Implement CGIXMLRPCRequestHandler. 2003-01-15 11:37:23 +00:00
Kurt B. Kaiser 6fa0911f5a Updated IDLE Help to reflect changes in Additional Help Source
Configuration implementation.
2003-01-14 22:06:11 +00:00
Kurt B. Kaiser 8e92bf7699 M Bindings.py
M EditorWindow.py
M NEWS.txt
M config-main.def
M configDialog.py
M configHandler.py
M configHelpSourceEdit.py
M configSectionNameDialog.py

- Change default: IDLE now starts with Python Shell.

- Removed the File Path from the Additional Help Sources scrolled list.

- Add capability to access Additional Help Sources on the web if the
  Help File Path begins with //http or www.  (Otherwise local path is
  validated, as before.)

- Additional Help Sources were not being posted on the Help menu in the
  order entered.  Implement sorting the list by [HelpFiles] 'option'
  number.

- Add Browse button to New Help Source dialog.  Arrange to start in
  Python/Doc if platform is Windows, otherwise start in current directory.

- Put the Additional Help Sources directly on the Help menu instead of in
  an Extra Help cascade menu.  Rearrange the Help menu so the Additional
  Help Sources come last.  Update help.txt appropriately.

- Fix Tk root pop-ups in configSectionNameDialog.py  and configDialog.py
2003-01-14 22:03:31 +00:00
Guido van Rossum 50e92235e7 Explicitly raise an exception in __cmp__ -- this clarifies that cmp()
is not supported on sets.  (Unfortunately, sorting a list of sets may
still return random results because it uses < exclusively, but for
sets that inly implements a partial ordering.  Oh well.)
2003-01-14 16:45:04 +00:00
Raymond Hettinger 2d375f78a5 SF bug #661184: inspect.getsource bug
inspect.getsource would crash with one line definitions like:
   def f(x): return x
or
   f = lambda x: x
2003-01-14 02:19:36 +00:00
Just van Rossum 9896ea24f9 make sure Info.plist has a CFBundleIdentifier entry 2003-01-13 23:30:04 +00:00
Tim Peters ddc82ea944 A new test here was failing on Windows, because the test before it never
managed to delete the @test file it intended to delete.  Also, I don't
see a reason to create a 4MB file in the new test, so cut it back to 16K.
2003-01-13 21:38:45 +00:00
Guido van Rossum 87fec22476 Duh. cmdqueue should be an instance variable, not a class variable.
This was introduced in 1998 in rev. 1.13, where I imported extensive
patches that, I am sad to say, I didn't review as carefully as I
should have.
2003-01-13 21:18:54 +00:00
Guido van Rossum eef260757c Duh. The do_EOF() implementation was bogus. Make it more like
do_quit() -- but print a blank line first.
2003-01-13 21:13:55 +00:00
Neal Norwitz 1a9975014f Fix SF bug #667147, Segmentation fault printing str subclass
Fix infinite recursion which occurred when printing an object
whose __str__() returned self.

Will backport
2003-01-13 20:13:12 +00:00
Guido van Rossum 41b71b2f4f Fix NameError in getquotaroot(), sanctioned by Piers. 2003-01-13 15:04:26 +00:00
Tim Peters a9bc168f95 Got rid of the internal datetimetz type. 2003-01-11 03:39:11 +00:00
Neal Norwitz e931ed59d3 Fix SF bug # 602259, 3rd parameter for Tkinter.scan_dragto
Add the optional gain parameter and pass it to Tk.
2003-01-10 23:24:32 +00:00
Kurt B. Kaiser a7b804f28a Update documentation. 2003-01-10 21:27:23 +00:00
Kurt B. Kaiser 69e8afcc9f SF bug #652933 (for IdleFork): Open Module "math" Fails (Hettinger)
When a module doesn't have a __path__ attribute, trigger a dialog box
rather than dumping a traceback to the console.

Synch to Python IDLE.
2003-01-10 21:25:20 +00:00
Neal Norwitz e604c02a80 SF #665913, Fix mmap module core dump with unix
Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump.

Will backport.
2003-01-10 20:52:16 +00:00
Kurt B. Kaiser e7a161e60c M configDialog.py
M configHelpSourceEdit.py

1. Attach configHelpSourceEdit error dialogs to parent to avoid Tk root
   pop-ups.
2. Make configHelpSourceEdit OK button the default and bind <Return>.
3. Reformat configHelpSourceEdit.
4. ConfigDialog.SaveAllChangedConfig() had a bug which caused additional
   help sources to be deleted when other config items were changed.
4. Uniform capitalization in configDialog.
5. Update configDialog doc string.
2003-01-10 20:13:57 +00:00