Commit Graph

21625 Commits

Author SHA1 Message Date
Martin v. Löwis 0c160a08f2 Patch #517521: Consider byte strings before Unicode strings
in PyObject_Get/SetAttr.
2002-03-15 13:40:30 +00:00
Michael W. Hudson e5363b7de5 .... 2002-03-15 10:21:59 +00:00
Michael W. Hudson ce00b735cd Fix
[ 530236 ] os.py assumes existence of statvfs_resul

This was pretty dense of me.  Sorry.

2.2.1 candidate.
2002-03-15 10:18:58 +00:00
Martin v. Löwis d4233b2b8c Include Python.h first. Fixes #530159. 2002-03-15 09:16:40 +00:00
Skip Montanaro 4c8349592d make _localized_name instances work more like the tuples they replaced. In
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names).  This closes bug
#503202.
2002-03-15 04:08:38 +00:00
Skip Montanaro 693c6c44c4 added test case to catch index errors with _localized_name class 2002-03-15 03:57:04 +00:00
Skip Montanaro b32302176e first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP. 2002-03-15 02:54:03 +00:00
Neal Norwitz 9672901742 Remove duplicate "import os" 2002-03-14 23:48:18 +00:00
Jack Jansen 86c4d64751 Modifed for new included expat. 2002-03-14 23:14:43 +00:00
Jack Jansen 648c8920bd Updated for new included expat and new waste. 2002-03-14 23:13:33 +00:00
Guido van Rossum 8c84255316 "Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
2002-03-14 23:05:54 +00:00
Guido van Rossum 0628dcfe1f "Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.
2002-03-14 23:03:14 +00:00
Tim Peters 06b711cb6d Update master Windows buildno list to reflect impending 2.2.1c1. 2002-03-14 22:48:50 +00:00
Tim Peters fbf74f2acc News about zlib-1.1.4. 2002-03-14 19:06:01 +00:00
Skip Montanaro dc8d40717c update text to refer to ServerProxy class in preference to Server, which is
only retained for backward compatibility with older versions of the library.
2002-03-14 17:35:25 +00:00
Tim Peters 6077f643da Move to zlib 1.1.4 on Windows (the new version that squashes the "double
free" glitch).
Bugfix candidate -- I'll backpatch this into 2.2.1 later this week.
2002-03-13 21:51:55 +00:00
Fred Drake 5d117472b4 Describe how to support the iterator protocol in extension types.
This closes SF bug #420851.
2002-03-13 03:55:11 +00:00
Neal Norwitz 8a11f5dc7b SF #515015, raise exception if code not found in findsource() 2002-03-13 03:14:26 +00:00
Fred Drake e789ea19c1 Extend the list of special characters and magic markup used to produce them
to include various characters used in code samples, URLs, and other special
contexts.
This closes SF bug #525684.
2002-03-13 02:48:24 +00:00
Fred Drake f171ad9d99 Change the way \textasciitilde is implemented so it works more consistently
(dropping tildes into data that still goes through LaTeX-like processing is
a bad idea).
2002-03-13 02:44:50 +00:00
Martin v. Löwis dc0b61d0b1 Verify arguments for nl_langinfo. Fixes #528879. 2002-03-12 22:05:02 +00:00
Fred Drake 1de5a722d6 Change the example code to prefer PyModule_Add*() instead of using the
module dictionary directly.  Also, be more careful about not re-initializing
globals in the event of re-initialization of a C extension.
2002-03-12 21:49:44 +00:00
Fred Drake 193a3f6d37 Update docstrings to use te attribute names of the new structures returned
by stat and time functions.
This closes SF patch #523271.
2002-03-12 21:38:49 +00:00
Guido van Rossum d70356729f Test for the fix I just checked in to moduleobject.c.
Bugfix candidate.
2002-03-12 20:43:31 +00:00
Guido van Rossum cd637aae56 Fix for SF bug #529050 - ModuleType.__new__ crash.
There were several places that assumed the md_dict field was always
set, but it needn't be.  Fixed these to be more careful.

I changed PyModule_GetDict() to initialize md_dict to a new dictionary
if it's NULL.

Bugfix candidate.
2002-03-12 20:37:02 +00:00
Fred Drake 6ccdccd35d Add a note that Py_None needs the same reference count treatment as any
other PyObject *.
This closes SF bug #494007.
2002-03-12 20:12:54 +00:00
Fred Drake f981617645 "level" keyword argument in example should be "stacklevel".
This closes SF bug #517684.
2002-03-12 19:49:31 +00:00
Skip Montanaro 57fd45ea07 back out spurious change from 1.22 2002-03-12 19:48:03 +00:00
Skip Montanaro 59b40c0828 Popen3 and Popen4 should be in __all__ 2002-03-12 19:16:19 +00:00
Jack Jansen 524a098f54 Add a -Wno-long-double flag to the compile flags on Mac OS X. Fixes bug
525481. (Probably not a 2.2.1 candidate, unless the fix that introduced a
long double into objimpl.h (rev. 2.44) is backported to 2.2.1).
2002-03-12 15:25:52 +00:00
Fred Drake 8b68862680 Set/update self.cwd properly. 2002-03-12 14:26:37 +00:00
Tim Peters 8f01b680c8 Change Windows file.truncate() to (a) restore the original file position,
and (b) stop trying to prevent file growth.

Beef up the file.truncate() docs.

Change test_largefile.py to stop assuming that f.truncate() moves the
file pointer to the truncation point, and to verify instead that it leaves
the file position alone.  Remove the test for what happens when a
specified size exceeds the original file size (it's ill-defined, according
to the Single Unix Spec).
2002-03-12 03:04:44 +00:00
Steven M. Gava 9d142adfce fixes to tabwidth code removal 2002-03-12 02:33:52 +00:00
Steven M. Gava 63f6714c3a remove tabwidth (for tabs) config stuff,
because of the way the tk text widget handles
tabs they must remain a fixed size in idle
2002-03-12 00:52:42 +00:00
Steven M. Gava b1585417d1 further work on dynamic config changes;
editor font
2002-03-12 00:21:56 +00:00
Fred Drake 314bae50b9 Documentation for PyObject_GetIter(), contributed by Greg Chapman
(with only minor changes by Fred).
This closes SF bug #498607.
2002-03-11 18:46:29 +00:00
Fred Drake e38b7e8fe9 Make the extension manual format using the Makefile; recent changes broke
the dependency information.
2002-03-11 18:42:08 +00:00
Neal Norwitz 1af5e35a98 Fix typo 2002-03-11 14:44:12 +00:00
Guido van Rossum c9e9e40b7b Add a check that SF bug 516727 is really fixed. 2002-03-11 13:21:25 +00:00
Sjoerd Mullender 556a938d10 Changed C++ comment into standard comment. 2002-03-11 09:20:47 +00:00
Martin v. Löwis db04489953 Patch #443899: Check modes on files before performing operations.
Use IOErrors where file objects use them.
2002-03-11 06:46:52 +00:00
Guido van Rossum c7f4541260 Update version number in README. 2002-03-11 01:05:32 +00:00
Tim Peters fb05db2cae file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.
2002-03-11 00:24:00 +00:00
Guido van Rossum 15d529aec5 Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
2002-03-11 00:07:13 +00:00
Just van Rossum a2168eceb0 mkalias() now also works for folders. Fixes bug #515830. 2002-03-10 19:28:02 +00:00
Martin v. Löwis b5255114d1 Access the exception argument to see whether it starts with '500'.
Fixes #527855.
2002-03-10 15:59:58 +00:00
Guido van Rossum dfce3bf908 Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
2002-03-10 14:11:16 +00:00
Tim Peters d674e17e96 SF patch 499062: Minor typo in test_generators.py.
There's no actual patch there.  It's an objection that Guido's example
doesn't actually generator "leaves", so change the comment that says
it does.
2002-03-10 07:59:13 +00:00
Martin v. Löwis 7d1cd6947d Patch #504224: add plan9 threads include to thread.c. 2002-03-09 12:10:54 +00:00
Martin v. Löwis 3484a18af1 Patch #494045: patches errno and stat to cope on plan9. 2002-03-09 12:07:51 +00:00