Commit Graph

5600 Commits

Author SHA1 Message Date
Martin v. Löwis a55ffaeee9 Add a per-message fallback mechanism for translations. 2002-01-11 06:58:49 +00:00
Martin v. Löwis 1be6419871 Add fallback argument to translation(). Request fallbacks on install.
Fixes #500595.
2002-01-11 06:33:28 +00:00
Fred Drake 925f144274 Fix webbrowser.py security bug: be more careful about what we pass to
os.system().
This closes Python bug #500401, Debian bug #127507.
2002-01-07 15:29:01 +00:00
Mark Hammond e843e482ce Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping. 2002-01-07 02:11:43 +00:00
Marc-André Lemburg f853be980e Restore Python 2.1 StringIO.py behaviour: support concatenating
Unicode string snippets to larger Unicode strings.

This fix should also go into Python 2.2.1.
2002-01-06 17:15:05 +00:00
Fred Drake db519205a2 Time2Internaldate(): Call isinstance() once for each of the type tests
instead of possibly twice by using a sequence of types to check for.
Add a message to the ValueError that can be raised.
2002-01-05 17:17:09 +00:00
Fred Drake 1e2fb57b5f Remove unused imports, clean up trailing whitespace. 2002-01-05 17:12:57 +00:00
Martin v. Löwis ea752fbb86 Check for time.struct_time in addition to tuples. Use 3 characters
for zone hours. Fixes #499169.
2002-01-05 11:31:49 +00:00
Steven M. Gava 0cae01c496 loading core keybindings via new config system plus
further devel of highlight handling
2002-01-04 07:53:06 +00:00
Steven M. Gava c597640515 move core functionality of SearchBindings.py into EditorWindow.py proper
adjust configuration sources accordingly
move SearchBindings.py into the attic now
2002-01-04 03:06:08 +00:00
Steven M. Gava ad4f532f65 further development of highlighting and editor preference handling,
plus misc fixes cleanups for new config system
2002-01-03 12:05:17 +00:00
Steven M. Gava 767a7ee9ad remove futzing with text font 2002-01-03 12:04:01 +00:00
Steven M. Gava 361cfcd69b fixups and improvements 2002-01-03 12:02:37 +00:00
Steven M. Gava dc72f48e26 moving to new config system 2002-01-03 11:51:07 +00:00
Andrew M. Kuchling 1142d595ee Fix typo in label 2002-01-02 16:38:19 +00:00
Neal Norwitz 653d85fc86 SF Patch #494867 test file methods
Test that the file methods raise ValueError when called on a closed file.
Test .isatty()
Test name, closed attributes
2002-01-01 19:11:13 +00:00
Martin v. Löwis 85f98143b7 Print encoded versions of the file names in test application. Fixes #496084 2001-12-30 14:43:56 +00:00
Tim Peters 77902970c5 test_support: add a docstring to vereq().
test_complex:  repair new test's usage of vereq().
2001-12-29 17:34:57 +00:00
Neal Norwitz 5a0f010c67 SF Patch #497487 add test to compare conjugate of a complex number 2001-12-29 14:31:46 +00:00
Neal Norwitz fc37af85bf SF Patch #494873 add tests for complex numbers including calls to int()/long() 2001-12-29 01:02:21 +00:00
Neal Norwitz 32f41536cb SF Patch #494874 add tests for int()/long() invalid parameters 2001-12-29 00:35:20 +00:00
Neal Norwitz 707690132f SF Patch #494872 test repr() of a built-in module 2001-12-29 00:25:42 +00:00
Neal Norwitz 26e5341c00 SF Patch #494876, test invalid parameters to pow() 2001-12-29 00:16:09 +00:00
Guido van Rossum f21b2aafa9 Thread.__bootstrap(): ignore exceptions in the self.__delete() call in
the finally clause.  An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.

This should fix SF bug ##497111: active_limbo_lock error at program
exit.

2.1.2 and 2.2.1 Bugfix candidate!
2001-12-28 22:07:09 +00:00
Guido van Rossum 2764a3a50e Fix for SF bug ##497426: can't deepcopy recursive new objects
deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!
2001-12-28 21:39:03 +00:00
Guido van Rossum 1e91c1444a Fix for SF bug ##497426: can't deepcopy recursive new objects
deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!
2001-12-28 21:33:22 +00:00
Guido van Rossum 24a643416d Update the docstring too. :-) 2001-12-28 20:54:55 +00:00
Guido van Rossum c33e077838 SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password.  This avoids
privacy violations.
2001-12-28 20:54:28 +00:00
Guido van Rossum 2a6f5b38ac _reduce(): Avoid infinite recursion in the pickler when self.__class__
doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and
posix.stat_result.

This fixes the immediate symptoms of SF bug #496873 (cPickle /
time.struct_time loop), replacing the infinite loop with an exception.
2001-12-27 16:27:28 +00:00
Guido van Rossum 2826fade49 Don't set passiveserver to 0 in connect(). See SF bug #495693.
This should definitely be backported to 2.2.1.  I'll leave it to Jack
to decide whether he wants to fix this in MacPython 2.2.
2001-12-23 13:54:19 +00:00
Martin v. Löwis fe7286c252 Regenerated for Linux 2.2.4. 2001-12-22 15:23:50 +00:00
Barry Warsaw 52acb49298 Merge of the release22 branch changes back into the trunk. 2001-12-21 20:04:22 +00:00
Andrew M. Kuchling 3d2d980f50 Suggested by Pete Shinners: treat .m and .mm files as source code.
Question for Jack Jansen: is this reasonable?

Candidate for 2.2 release branch (if Jack thinks it's OK).
2001-12-21 15:34:17 +00:00
Anthony Baxter ed9057083b forward-patch from release21-maint branch:
Make dumbdbm merely "dumb", rather than "terminally broken". Without this
  patch, it's almost impossible to use dumbdbm _without_ causing horrible
  datalossage. With this patch, dumbdbm passes my own horrible torture test,
  as well as the roundup test suite.

  dumbdbm really could do with a smidgin of a rewrite or two, but that's not
  suitable for the release21-maint branch.
2001-12-21 05:13:37 +00:00
Barry Warsaw eae36ac5c3 test_parseaddr_empty(): New test for assuring that
Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty
string.  Built on rfc822, this used to return None.
2001-12-20 16:37:27 +00:00
Guido van Rossum f830a52996 SF patch #495358 (Artur Zaprzala): rfc822.AddressList and "<>" address
rfc822.AddressList incorrectly handles empty address.
    "<>" is converted to None and should be "".
    AddressList.__str__() fails on None.
    I got an email with such an address and my program
    failed processing it.

    Example:
    >>> import rfc822

    >>> rfc822.AddressList("<>").addresslist
    [('', None)]
    >>> str(rfc822.AddressList("<>"))
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.1/rfc822.py", line 753, in __str__
    return ", ".join(map(dump_address_pair,
    self.addresslist))
    TypeError: sequence item 0: expected string, None found

[His solution: in the internal routine AddrlistClass.getrouteaddr(),
initialize adlist to "".]
2001-12-20 15:54:48 +00:00
Tim Peters 2b26a8627b Whitespace normalization. 2001-12-20 06:18:15 +00:00
Fredrik Lundh b6ab93f433 partial merge with current pythonware codebase:
- use repr instead of implied str for doubles
- updated version number to 1.0.0 (for 2.2 final)
2001-12-19 21:40:04 +00:00
Guido van Rossum 04a866170d Add test for pickling new-style class with custom metaclass. 2001-12-19 16:58:54 +00:00
Guido van Rossum f048a8f6d7 Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with a
metaclass, reported by Dan Parisien.

Objects that are instances of custom metaclasses, i.e. whose class is
a subclass of 'type', should be pickled the same as new-style classes
(objects whose class is 'type').  This can't be done through a
dispatch table entry, and the __reduce__ trick doesn't work for these,
since it finds the unbound __reduce__ for instances of the class
(inherited from 'object').  So check explicitly using issubclass().
2001-12-19 16:55:02 +00:00
Fred Drake 5935ff07be Add some additional tests that check more proxy behaviors. 2001-12-19 16:54:23 +00:00
Fred Drake 694ed091af Fix the test control support for the pickle & cPickle tests so the tests run
under regrtest.
2001-12-19 16:42:15 +00:00
Guido van Rossum 1444f67fa0 The test using class initarg failed, because it was lacking a
__safe_for_unpickling__ attribute.
2001-12-19 16:38:29 +00:00
Fred Drake 4f5b49fb56 Make the module docstring agree with reality: the module prvides the
"handler()" function, not the "handle()" function.
2001-12-19 14:27:41 +00:00
Tim Peters 81b61bdc1a TemporaryFileWrapper: fixed typo in new comment. 2001-12-18 23:22:01 +00:00
Tim Peters a255a72f0a TemporaryFileWrapper: cache the value of os.unlink for use by __del__,
to prevent mysterious errors at shutdown due to "os.unlink" turning into
"None.unlink".
2001-12-18 22:32:40 +00:00
Guido van Rossum 99d2fbb823 Move the helper class _closedsocket *into* the _socketobject class.
This way, when a socket object is deleted after the socket module has
already been zapped by module shutdown, we don't get annoying warnings
about exceptions in __del__ methods.
2001-12-18 22:22:25 +00:00
Thomas Heller f499b030bd Recreated after source changes. 2001-12-18 21:08:15 +00:00
Thomas Heller c7cb9ed35f Second part of fix for bug [#483982] Python 2.2b2 bdist_wininst
crashes.

If no external zip-utility is found, the archive is created by the
zipfile module, which behaves different now than in 2.1: if the
zip-file is created in the root directory if the distribution, it will
contain an (empty) version of itself.

This triggered the above bug - so it's better to create the zip-file
far away in the TMP directory.
2001-12-18 20:13:40 +00:00
Guido van Rossum facf24bdc7 Don't use Latex \code{...} in docstrings. 2001-12-17 16:07:06 +00:00