Commit Graph

20751 Commits

Author SHA1 Message Date
Steven M. Gava 3b55a891a1 back in harness on new config system 2001-11-21 05:56:26 +00:00
Marc-André Lemburg 72f8213ba4 Fix for bug #438164: %-formatting using Unicode objects.
This patch also does away with an incompatibility between Jython
and CPython.
2001-11-20 15:18:49 +00:00
Marc-André Lemburg 0c4d8d05a8 Fix for bug #480188: printing unicode objects 2001-11-20 15:17:25 +00:00
Barry Warsaw 4586d2c91c test_formatdate(): Remove the unnecessary ldate calculation.
test_formatdate_zoneoffsets() => test_formatdate_localtime(): Do the
sign corrected calculation of the zone offset.
2001-11-19 18:38:42 +00:00
Barry Warsaw e5739a69a7 formatdate(): Jason Mastaler correctly points out that divmod with a
negative modulus won't return the right values.  So always do positive
modulus on an absolute value and twiddle the sign as appropriate after
the fact.
2001-11-19 18:36:43 +00:00
Barry Warsaw 75a40fcc3a test_formatdate(), test_formatdate_zoneoffsets(): Two changes. First,
use the correct way to test for epoch, by looking at the year
component of gmtime(0).  Add clause for Unix epoch and Mac epoch (Tim,
what is Windows epoch?).

Also, get rid of the strptime() test, it was way too problematic given
that strptime() is missing on many platforms and issues with locales.
Instead, simply test that formatdate() gets the numeric timezone
calculation correct for the altzone and timezone.
2001-11-19 16:31:06 +00:00
Barry Warsaw cd45a36959 formatdate(): The calculation of the minutes part of the zone was
incorrect for "uneven" timezones.  This algorithm should work for even
timezones (e.g. America/New_York) and uneven timezones (e.g.
Australia/Adelaide and America/St_Johns).

Closes SF bug #483231.
2001-11-19 16:28:07 +00:00
Martin v. Löwis fba64e1eca Test for negative buffer sizes. Fixes #482871. 2001-11-19 10:41:26 +00:00
Fred Drake 27ae311864 Avoid trailing blank lines in the output. 2001-11-19 05:28:29 +00:00
Fred Drake 00c96aeba6 Adjust input pre-processing so that a comment on the last line does not
break the processor; this will do the right thing.
2001-11-19 05:27:40 +00:00
Fred Drake e70dbe0fc5 Update the platform notes for the CGIHTTPServer module; it works on more
platforms now, and has since Python 2.0.
This closes SF bug #482943.
2001-11-19 05:16:35 +00:00
Fred Drake 63c4f907a9 Another name... 2001-11-19 04:35:58 +00:00
Fred Drake 7064d3b581 Fix the default value for feature_namespaces, per discussions on the XML-SIG
mailing list.  This causes the docs to match the default implementation.
2001-11-19 04:34:50 +00:00
Barry Warsaw 7a1bea64f8 test_formatdate(): A test that has a mild hope of working on Mac,
which has a different epoch than *nix.  Jack may need to twiddle the
details.
2001-11-18 23:15:58 +00:00
Barry Warsaw 69ab5836ae Paul Rubin reminds me that of course a class's constructor /could/ get
called, if the pickler found a __getinitargs__() method.
2001-11-18 16:24:01 +00:00
Just van Rossum f376ef0996 a whole bunch of OSX tweaks 2001-11-18 14:12:43 +00:00
Fred Drake ebbd14d7c2 Clarified a couple of issues for the startElement*() handlers:
- the attrs value may be re-used by the parser, so the implementation
  cannot rely on owning the object.
- an element with no namespace encountered in namespace mode will have a URI
  of None, not "" (startElementNS() only).

Fixed a couple of minor markup issues as well.
2001-11-18 04:58:28 +00:00
Tim Peters af0a883041 Relatively large expansion of the docs for gc.garbage. 2001-11-18 04:51:17 +00:00
Tim Peters 36515e28ed Since the MAGIC number scheme is going to break on January 1st, document
what it is more carefully and point out some of the subtleties.
2001-11-18 04:06:29 +00:00
Fred Drake 8188e792d9 assert.h was not always included by Python.h; make sure we import it for
older versions.  (Thanks to Martijn Faassen.)
2001-11-18 02:36:07 +00:00
Fred Drake ef6373a4f6 Exhibit good form in C code: always provide docstrings in method tables, and
always fill in all slots of table entries.
Fixed a few minor markup errors.
2001-11-17 06:50:42 +00:00
Fred Drake 50ecc15d05 Add omitted word for clarity. 2001-11-17 06:39:18 +00:00
Fred Drake 3176b08874 Update to use more modern calling conventions; also avoid a magic number
in the function table.  Add a docstring for the function as well, since
examples should show good form.
2001-11-17 06:30:20 +00:00
Fred Drake e012e35460 Bump the version number; used to identify the Python runtime we link to. 2001-11-17 06:28:08 +00:00
Tim Peters 1ec040feb3 Update Windows installer for 2.2c1. 2001-11-17 00:24:45 +00:00
Tim Peters b3c9af17d9 Add skeleton for 2.2c1 news. 2001-11-17 00:21:57 +00:00
Barry Warsaw 0c0565dd7f Toughen up the security warnings a bit. 2001-11-16 22:28:17 +00:00
Barry Warsaw 5e17d20743 Add a clarification that the email package always deals in native line
endings, and that it is smtplib's job to convert those to RFC 2821
line endings when sending the message.
2001-11-16 22:16:04 +00:00
Barry Warsaw 754b7123e0 Bumping version number. 2001-11-16 21:12:25 +00:00
Fred Drake dd2487d759 Post-release bumps. Do *NOT* merge into the 2.2b2 branch. 2001-11-16 17:34:38 +00:00
Barry Warsaw 012852ba7f Merged in NEWS changes from the r22b2 branch. 2001-11-16 16:17:27 +00:00
Fred Drake 666ca80b63 Clean up some markup a little bit more. Make this work with the PDF format,
which is a little more strict than the other formats on some things (fixable,
but not tonight).
2001-11-16 06:02:55 +00:00
Fred Drake 5545219bf6 Document the urlsplit() and urlunsplit() functions. 2001-11-16 03:22:15 +00:00
Fred Drake 5751a22ede Fix parsing of parameters from a URL; urlparse() did not check that it only
split parameters from the last path segment.  Introduces two new functions,
urlsplit() and urlunsplit(), that do the simpler job of splitting the URL
without monkeying around with the parameters field, since that was not being
handled properly.
This closes bug #478038.
2001-11-16 02:52:57 +00:00
Fred Drake c66ff203bb Switched a couple of sections around.
Cleaned up some markup nits.
Add a few more of the Tk-related modules to the list of modules.
2001-11-16 01:05:27 +00:00
Barry Warsaw 69b2d75fc7 A few minor updates to make it clear(er) that pickle should be used
instead of marshal for object serialization.

Fred, please proofread!
2001-11-15 23:55:12 +00:00
Barry Warsaw 9b481ff3d6 A change to sync with pickle.py:
find_class(): We no longer mask all exceptions[1] by transforming them
into SystemError.  The latter is definitely not the right thing to do,
so we let any exceptions that occur in the PyObject_GetAttr() call to
simply propagate up if they occur.

[1] Note that pickle only masked ImportError, KeyError, and
AttributeError, but cPickle masked all exceptions.
2001-11-15 23:45:26 +00:00
Barry Warsaw bf4d959d28 Two changes:
load_inst(): Implement the security hook that cPickle already had.
When unpickling callables which are not classes, we look to see if the
object has an attribute __safe_for_unpickling__.  If this exists and
has a true value, then we can call it to create the unpickled object.
Otherwise we raise an UnpicklingError.

find_class(): We no longer mask ImportError, KeyError, and
AttributeError by transforming them into SystemError.  The latter is
definitely not the right thing to do, so we let the former three
exceptions simply propagate up if they occur, i.e. we remove the
try/except!
2001-11-15 23:42:58 +00:00
Barry Warsaw f595fd975d A massive rewrite affecting both the pickle and cPickle module
documentation.  This addresses previously undocumented parts of the
public interfaces, the differences between pickle and cPickle,
security concerns, and on and on.

Fred please proofread!
2001-11-15 23:39:07 +00:00
Barry Warsaw d44e7ad702 Minor updates to add more pointers to the pickle documentation, and to
clarify some of the interface.
2001-11-15 23:37:26 +00:00
Fred Drake fd4f069b12 The turtle docs will be moving to another location in the Tkinter chapter. 2001-11-15 22:10:46 +00:00
Fred Drake 482b9a8c0c Clean up the descriptions of multi-signature functions so we do the right
thing in the index.
2001-11-15 20:41:03 +00:00
Guido van Rossum 3fc08d23c7 Group dict[ionary] news together; and use dict() instead of
dictionary().
2001-11-15 20:33:10 +00:00
Guido van Rossum 3d27df0734 Correct the description of mixed multiple inheritance: the code
special-cases classic classes, it doesn't do anything about other
cases where different metaclasses are involved (except for the trivial
case where one metaclass is a subclass of the others).  Also note that
it's metaclass, not metatype.
2001-11-15 20:27:54 +00:00
Tim Peters 76f7fe37bb News about mixing classic and new-style classes in MI. 2001-11-15 20:02:21 +00:00
Tim Peters 330bdfe335 Bump Windows buildno for 2.2b2. 2001-11-15 19:50:51 +00:00
Fred Drake bc1491f60f Thanks for the Tkinter chapter, Mike! 2001-11-15 17:26:10 +00:00
Fred Drake 53556861df Add entries for the new Tkinter chapter. 2001-11-15 17:25:29 +00:00
Fred Drake 7cf4e5b329 Tkinter chapter, contributed by Mike Clarkson. Based in part on the "Tkinter
Life Preserver" by Matt Conway.
2001-11-15 17:22:04 +00:00
Tim Peters 144b98dab8 More simple test cases for mixed classic+new multiple inheritance. 2001-11-14 23:56:45 +00:00