Jack Jansen [Mon, 19 Aug 2002 13:17:39 +0000 (13:17 +0000)]
Merged the MacPython thanks list into the general acknowledgements.
There's really no point in a separate list of thank-you notes.
Raymond Hettinger [Mon, 19 Aug 2002 03:19:09 +0000 (03:19 +0000)]
Added __pow__(a,b) to the operator module. Completes the pattern of
all operators having a counterpart in the operator module.
Closes SF bug #577513.
Tim Peters [Mon, 19 Aug 2002 00:42:29 +0000 (00:42 +0000)]
SF bug 595919: popenN return only text mode pipes
popen2() and popen3() created text-mode pipes even when binary mode
was asked for. This was specific to Windows.
Raymond Hettinger [Sun, 18 Aug 2002 22:22:14 +0000 (22:22 +0000)]
Add Steve Purcell for unittest.py
Jack Jansen [Sun, 18 Aug 2002 21:57:09 +0000 (21:57 +0000)]
Refuse to run if the last bit of the destination path contains a # character.
This is a silly workaround for a rather serious bug in MacOSX: if you take
a long filename and convert it to an FSSpec the fsspec gets a magic
cooky (containing a #, indeed). If you then massage the extension of this
fsspec and convert back to a pathname you may end up referring to the
same file. This could destroy your sourcefile. The problem only occcurs
in MacPython-OS9, not MacPython-OSX (I think).
Closes bug #505562.
Raymond Hettinger [Sun, 18 Aug 2002 20:08:56 +0000 (20:08 +0000)]
Modify splituser() method to allow an @ in the userinfo field.
Jeremy reported that this is not allowed by RFC 2396; however,
other tools support unescaped @'s so we should also.
Apply SF patch 596581 closing bug 581529.
Andrew MacIntyre [Sun, 18 Aug 2002 06:47:19 +0000 (06:47 +0000)]
OS/2 EMX behaves like Windows where file permissions are concerned
Andrew MacIntyre [Sun, 18 Aug 2002 06:32:46 +0000 (06:32 +0000)]
update contact info
Andrew MacIntyre [Sun, 18 Aug 2002 06:31:01 +0000 (06:31 +0000)]
Prep for 2.3:
- update DLL version number
- add files required for 2.3 (no changes to modules though)
- restructure build of pgen.exe
NOTE: As I don't have the VACPP compiler, these changes are untested.
Apart from slightly re-ordering some file lists, and matching file name
casing, I believe these changes are the minimum necessary to build 2.3
with VACPP.
Andrew MacIntyre [Sun, 18 Aug 2002 06:28:21 +0000 (06:28 +0000)]
make port notes current
Andrew MacIntyre [Sun, 18 Aug 2002 06:26:33 +0000 (06:26 +0000)]
Build process updates:
- the security fixes to tempfile have lead to test_tempfile wanting
to create 100 temporary files. as the EMX default is only 40,
the number of file handles has been bumped (up to 250).
- changes to pgen have required restructuring its build support.
Guido van Rossum [Sat, 17 Aug 2002 14:50:24 +0000 (14:50 +0000)]
Get rid of _once(); inlining it takes less code. :-)
Also, don't call gettempdir() in the default expression for the 'dir'
argument to various functions; use 'dir=None' for the default and
insert 'if dir is None: dir = gettemptir()' in the bodies. That way
the work done by gettempdir is postponed until needed.
Guido van Rossum [Sat, 17 Aug 2002 11:41:01 +0000 (11:41 +0000)]
Patch by Zack W to make test_noinherit() more robust: spawn a Python
subprocess that does the right checks. This now works on Windows as
well.
Neal Norwitz [Fri, 16 Aug 2002 23:20:39 +0000 (23:20 +0000)]
Get this to compile again if Py_USING_UNICODE is not defined.
com_error() is static in Python/compile.c.
Neal Norwitz [Fri, 16 Aug 2002 19:28:59 +0000 (19:28 +0000)]
Drop the number of test files to 100 for all the tests
Jeremy Hylton [Fri, 16 Aug 2002 18:36:11 +0000 (18:36 +0000)]
Inline fast_cfunction() in new call_function().
Also, don't handle METH_OLDARGS on the fast path. All the interesting
builtins have been converted to use METH_NOARGS, METH_O, or
METH_VARARGS.
Result is another 1-2% speedup. If I can cobble together 10 of these,
it might make a difference.
Guido van Rossum [Fri, 16 Aug 2002 18:32:53 +0000 (18:32 +0000)]
Remove the outdated PLAN.txt file.
Jeremy Hylton [Fri, 16 Aug 2002 17:47:26 +0000 (17:47 +0000)]
Move body of CALL_FUNCTION opcode into helper function.
This makes the code much easier to ready, because it is at a sane
indentation level. On my box this shows a 1-2% speedup, which means
nothing, except that I'm not going to worry about the performance
effects of the change.
Guido van Rossum [Fri, 16 Aug 2002 17:01:09 +0000 (17:01 +0000)]
Squash a few calls to the hideously expensive PyObject_CallObject(o,a)
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The
difference is that the latter requires a to be a tuple; the former
allows other values and wraps them in a tuple if necessary; it
involves two more levels of C function calls to accomplish all that.)
Guido van Rossum [Fri, 16 Aug 2002 16:14:00 +0000 (16:14 +0000)]
Streamline the fast track for CFunction calls a bit more: there was
nothing special done if keyword arguments were present, so test for
that earlier and fall through to the normal case if there are any.
This ought to slow down CFunction calls with keyword args, but I don't
care; it's a tiny (1%) improvement for pystone.
Jack Jansen [Fri, 16 Aug 2002 09:09:31 +0000 (09:09 +0000)]
Regenerated with PyDoc_STR() around docstrings.
Jack Jansen [Fri, 16 Aug 2002 09:07:42 +0000 (09:07 +0000)]
iUse PyDoc_STR() around docstrings.
Guido van Rossum [Fri, 16 Aug 2002 07:04:56 +0000 (07:04 +0000)]
A nice little speed-up for filter():
- Use PyObject_Call() instead of PyEval_CallObject(), saves several
layers of calls and checks.
- Pre-allocate the argument tuple rather than calling Py_BuildValue()
each time round the loop.
- For filter(None, seq), avoid an INCREF and a DECREF.
Guido van Rossum [Fri, 16 Aug 2002 03:47:49 +0000 (03:47 +0000)]
Fix SF bug 595838 -- buffer in type_new() should not be static. Moved
to inner scope, too.
Tim Peters [Fri, 16 Aug 2002 03:41:39 +0000 (03:41 +0000)]
SF bug 594996: OverflowError in random.randrange
Loosened the acceptable 'start' and 'stop' arguments so that any
Python (bounded) ints can be used. So, e.g., randrange(-sys.maxint-1,
sys.maxint) no longer blows up.
Tim Peters [Fri, 16 Aug 2002 03:40:07 +0000 (03:40 +0000)]
Newly-relaxed limits on random.randrange(). Also added some info about
Karatsuba's better cache behavior with extremely large multiplicands.
Guido van Rossum [Fri, 16 Aug 2002 03:38:10 +0000 (03:38 +0000)]
Mention warnings about defining None.
Guido van Rossum [Fri, 16 Aug 2002 02:48:11 +0000 (02:48 +0000)]
Add warnings for arguments named None. All set. (I could add a
warning for 'global None', but that's either accompanied by an
assignment to None, which will trigger a warning, or not, in which
case it's harmless. :-)
Tim Peters [Fri, 16 Aug 2002 02:27:15 +0000 (02:27 +0000)]
check_events(): This was failing under -O, due to not expecting any
LINE events when not __debug__. But we get them anyway under -O now,
so just stop special-casing non-__debug__ mode.
Guido van Rossum [Fri, 16 Aug 2002 02:24:56 +0000 (02:24 +0000)]
Add warning for None used as keyword argument name in function call.
Still to do: function definition arguments (including *None and
**None).
Guido van Rossum [Fri, 16 Aug 2002 02:13:49 +0000 (02:13 +0000)]
Add warnings for assignment or deletion of variables and attributes
named 'None'. Still to do: function definition parameter lists, and
function call keyword arguments.
Guido van Rossum [Fri, 16 Aug 2002 01:57:32 +0000 (01:57 +0000)]
Minor cleanup of parsename() and parsestr(): the 'struct compiling *'
argument should be called 'c', like everywhere else. Renamed a
complex variable 'c' to 'z' and moved it inside the only scope where
it's used.
Barry Warsaw [Thu, 15 Aug 2002 22:14:24 +0000 (22:14 +0000)]
base64.decodestring('') should return '' instead of raising an
exception. The bug fix for SF #430849 wasn't quite right. This
closes SF bug #595671. I'll backport this to Python 2.2.
Jack Jansen [Thu, 15 Aug 2002 22:05:58 +0000 (22:05 +0000)]
Fixed the bugs in the constant definitions, and in the code to test
them.
The FutureWarnings are still there, until a way has been found to
say "I know what I'm doing here when I say 0xff000000".
Jack Jansen [Thu, 15 Aug 2002 21:48:16 +0000 (21:48 +0000)]
After generating the Python file with definitions try to run it, so
we catch errors during the build process in stead of later during runtime.
Jack Jansen [Thu, 15 Aug 2002 21:31:18 +0000 (21:31 +0000)]
Try to cater for a source tree checked out with MacCVS in stead of
unix cvs. In this case the resource files are actual resource files
in stead of AppleSingle encoded files.
Tim Peters [Thu, 15 Aug 2002 20:10:45 +0000 (20:10 +0000)]
Illustrating by example one good reason not to trust a proof <wink>.
Tim Peters [Thu, 15 Aug 2002 20:06:00 +0000 (20:06 +0000)]
k_mul() comments: In honor of Dijkstra, made the proof that "t3 fits"
rigorous instead of hoping for testing not to turn up counterexamples.
Call me heretical, but despite that I'm wholly confident in the proof,
and have done it two different ways now, I still put more faith in
testing ...
Tim Peters [Thu, 15 Aug 2002 19:41:06 +0000 (19:41 +0000)]
long_mul(): Simplified exit code. In particular, k_mul() returns a
normalized result, so no point to normalizing it again. The number
of test+branches was also excessive.
Michael W. Hudson [Thu, 15 Aug 2002 14:59:02 +0000 (14:59 +0000)]
This is my patch
[ 587993 ] SET_LINENO killer
Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab.
Many sundry changes to document and adapt to this change.
Guido van Rossum [Thu, 15 Aug 2002 14:01:14 +0000 (14:01 +0000)]
Add notes about universal newlines.
Guido van Rossum [Thu, 15 Aug 2002 13:56:35 +0000 (13:56 +0000)]
Fix typo. It's --with-universal-newlines, not
--with-universal-newline.
Skip Montanaro [Thu, 15 Aug 2002 01:34:38 +0000 (01:34 +0000)]
Slight reordering of directories searched for BerkDB libs and include files.
Push /usr/... further down the list - always check /usr/local/... before
/usr/...
Doubt this will help with http://python.org/sf/589427 or not, but these
changes were prompted by my investigation of that bug report. I wasn't able
to reproduce that problem though
Skip Montanaro [Thu, 15 Aug 2002 01:28:54 +0000 (01:28 +0000)]
forgot the best part - the new tests...
see patch 586561
Skip Montanaro [Thu, 15 Aug 2002 01:20:16 +0000 (01:20 +0000)]
provide less mysterious error messages when seeing end-of-line in
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
Andrew M. Kuchling [Thu, 15 Aug 2002 00:40:21 +0000 (00:40 +0000)]
Add 'in' change
Revise sentence
Add two reminders
Guido van Rossum [Wed, 14 Aug 2002 21:20:32 +0000 (21:20 +0000)]
Add news about Fred's change to Py_InitModule4().
Jeremy Hylton [Wed, 14 Aug 2002 21:01:41 +0000 (21:01 +0000)]
Reflow long lines.
Fred Drake [Wed, 14 Aug 2002 20:59:38 +0000 (20:59 +0000)]
Py_InitModule() and friends now accept NULL for the 'methods'
argument. This makes sense now that extension types can support
__init__ directly rather than requiring function constructors.
Fred Drake [Wed, 14 Aug 2002 20:57:56 +0000 (20:57 +0000)]
Py_InitModule4(): Accept NULL for the 'methods' argument. This makes
sense now that extension types can support __init__ directly rather
than requiring function constructors.
Jeremy Hylton [Wed, 14 Aug 2002 19:25:42 +0000 (19:25 +0000)]
Docstring nits: The module is neither proposed nor new.
Martin v. Löwis [Wed, 14 Aug 2002 18:52:54 +0000 (18:52 +0000)]
Added Hisao Suzuki.
Guido van Rossum [Wed, 14 Aug 2002 18:38:27 +0000 (18:38 +0000)]
More changes of DeprecationWarning to FutureWarning.
Jeremy Hylton [Wed, 14 Aug 2002 17:56:13 +0000 (17:56 +0000)]
Explain use of currentThread() in _Condition methods.
Guido van Rossum [Wed, 14 Aug 2002 17:54:48 +0000 (17:54 +0000)]
The filterwarnings() call here should be updated to filter out
FutureWarning.
Jeremy Hylton [Wed, 14 Aug 2002 17:46:40 +0000 (17:46 +0000)]
Explain a little more.
Jeremy Hylton [Wed, 14 Aug 2002 17:43:59 +0000 (17:43 +0000)]
Explain a minor mystery.
Guido van Rossum [Wed, 14 Aug 2002 17:26:30 +0000 (17:26 +0000)]
PyType_Ready(): initialize the base class a bit earlier, so that if we
copy the metatype from the base, the base actually has one!
Tim Peters [Wed, 14 Aug 2002 17:07:32 +0000 (17:07 +0000)]
k_mul() comments: Simplified the simplified explanation of why ah*bh and
al*bl "always fit": it's actually trivial given what came before.
Barry Warsaw [Wed, 14 Aug 2002 16:40:54 +0000 (16:40 +0000)]
More updates describing FutureWarnings.
Tim Peters [Wed, 14 Aug 2002 16:37:10 +0000 (16:37 +0000)]
mkstemp's last argument changed from binary=True to text=False.
Tim Peters [Wed, 14 Aug 2002 16:36:23 +0000 (16:36 +0000)]
k_mul() comments: Explained why there's always enough room to subtract
ah*bh and al*bl. This is much easier than explaining why that's true
for (ah+al)*(bh+bl), and follows directly from the simple part of the
(ah+al)*(bh+bl) explanation.
Guido van Rossum [Wed, 14 Aug 2002 16:11:30 +0000 (16:11 +0000)]
Add news about FutureWarning and PEP 237 stage B0.
Tim predicts that we might as well call this CassandraWarning.
Barry Warsaw [Wed, 14 Aug 2002 16:06:28 +0000 (16:06 +0000)]
Document PyExc_FutureWarning
Barry Warsaw [Wed, 14 Aug 2002 15:51:29 +0000 (15:51 +0000)]
Added a FutureWarning for constructs that will change semantically in
the future. Changed PEP 237 hex constant warnings from
DeprecationWarning to FutureWarning. Updated the documentation.
Martin v. Löwis [Wed, 14 Aug 2002 15:46:02 +0000 (15:46 +0000)]
Patch #550192: Set softspace to 0 in raw_input().
Tim Peters [Wed, 14 Aug 2002 15:41:26 +0000 (15:41 +0000)]
tempfile's mkstemp(): Changed last argument from
binary=True
to
text=False
by BDFL Pronouncement. All other changes follow from this. The change
to the docs is ready to go, but blocked by another JackMacLock in the
doc directory.
Fred Drake [Wed, 14 Aug 2002 15:26:18 +0000 (15:26 +0000)]
Remove a broken example of extreme backward compatibility; it is
simply not relevant any more.
Closes SF bug #595032.
Jason Tishler [Wed, 14 Aug 2002 15:10:09 +0000 (15:10 +0000)]
Patch #595014: Cygwin tempfile patch
Although Cygwin attempts to be as Posix compliant
as possible, it has difficulties unlinking open
files. This is not surprising given that Cygwin is
dependent on Win32 which in turn has this problem
itself.
The attached tempfile patch acknowledges this
Cygwin limitation. Without this patch, Cygwin
fails test_tempfile (i.e., test_has_no_name) as
follows:
$ ./python -E -tt ../Lib/test/regrtest.py -l test_tempfile
test_tempfile
test test_tempfile failed -- Traceback (most recent call last):
File "/home/jt/src/PythonCvs/Lib/test/test_tempfile.py", line 689, in test_has_no_name
self.failOnException("rmdir", ei)
File "/home/jt/src/PythonCvs/Lib/test/test_tempfile.py", line 33, in failOnException
self.fail("%s raised %s: %s" % (what, ei[0], ei[1]))
File "/home/jt/src/PythonCvs/Lib/unittest.py", line 260, in fail
raise self.failureException, msg
AssertionError: rmdir raised exceptions.OSError: [Errno 90] Directory not empty: '/mnt/c/DOCUME~1/jatis/LOCALS~1/Temp/tmpM_z8nj'
Barry Warsaw [Wed, 14 Aug 2002 15:09:12 +0000 (15:09 +0000)]
Patch by Tim to shut up the compiler's DeprecationWarnings on the
high-bit-set hex constants.
Guido van Rossum [Wed, 14 Aug 2002 14:52:02 +0000 (14:52 +0000)]
test_many(): open only 100 temp files, not 1000. Some systems don't
allow that many open files per process. I don't see that 1000 makes
any difference for the test.
Jason Tishler [Wed, 14 Aug 2002 11:13:52 +0000 (11:13 +0000)]
Patch #588564: _locale library patch
This patch enables setup.py to find gettext routines when they are
located in libintl instead of libc. Although I developed this patch for
Cygwin, I hope that it can be easily updated to support other platforms
(if necessary). I tested this patch under Cygwin and Red Hat Linux 7.1.
Martin v. Löwis [Wed, 14 Aug 2002 08:22:50 +0000 (08:22 +0000)]
Check for trailing backslash. Fixes #593656.
Martin v. Löwis [Wed, 14 Aug 2002 07:46:28 +0000 (07:46 +0000)]
Patch #505705: Remove eval in pickle and cPickle.
Skip Montanaro [Wed, 14 Aug 2002 02:58:16 +0000 (02:58 +0000)]
tightening up a few except: clauses
see bug 411881
Neal Norwitz [Wed, 14 Aug 2002 02:03:50 +0000 (02:03 +0000)]
Fix memory leaks reported by valgrind
Skip Montanaro [Wed, 14 Aug 2002 01:45:37 +0000 (01:45 +0000)]
add some example docstrings using PyDoc_STR
Skip Montanaro [Wed, 14 Aug 2002 01:44:33 +0000 (01:44 +0000)]
add PyDoc_STR and PyDoc_STRVAR calls as examples for module authors
Tim Peters [Wed, 14 Aug 2002 01:05:57 +0000 (01:05 +0000)]
runtest(): I don't know why we don't just use TESTFN, but if we have to
do bizarre things to get a temp file, I changed it to use mkstemp instead
of NamedTemporaryFile. This tried to leave the file open while passing
its name to execfile(). On Win2K (but not Win9X), though, a file created
with O_TEMPORARY cannot be opened again, so the test failed with a
permission error when execfile tried to open it. Closer to the truth:
a file created with O_TEMPORARY can be opened again, but only if the
file is also created with SHARE_DELETE access via the Win32 CreateFile()
function. There's no way to get at that from MS's version of libc, though
(we'd have to ditch the "std" C file functions in favor of Win32 API
calls).
Tim Peters [Wed, 14 Aug 2002 00:49:50 +0000 (00:49 +0000)]
mkstemp(): Repaired error in docstring (the sense of the 'binary' flag
was reversed).
Tim Peters [Tue, 13 Aug 2002 23:38:30 +0000 (23:38 +0000)]
mkstemp(): The optional "binary" argument is clearly intended to be a
Boolean, so changed its default value from 1 to True.
Tim Peters [Tue, 13 Aug 2002 23:36:01 +0000 (23:36 +0000)]
NamedTemporaryFile(), TemporaryFile(): removed needless local vrbl 'bin'.
Tim Peters [Tue, 13 Aug 2002 23:33:56 +0000 (23:33 +0000)]
template: removed special-casing for NT; there isn't an 8-character limit.
Tim Peters [Tue, 13 Aug 2002 23:31:02 +0000 (23:31 +0000)]
_once(): Removed obfuscating aliasing of _once_lock.
Tim Peters [Tue, 13 Aug 2002 23:29:21 +0000 (23:29 +0000)]
_once(): Simplified dict manipulation.
Neal Norwitz [Tue, 13 Aug 2002 22:20:41 +0000 (22:20 +0000)]
Allow more docstrings to be removed during compilation in some modules
Neal Norwitz [Tue, 13 Aug 2002 22:19:13 +0000 (22:19 +0000)]
Allow more docstrings to be removed during compilation
Tim Peters [Tue, 13 Aug 2002 21:06:55 +0000 (21:06 +0000)]
Added a test specifically to tickle Karatsuba; it costs no appreciable
runtime.
Jeremy Hylton [Tue, 13 Aug 2002 20:43:46 +0000 (20:43 +0000)]
Add a missing call to _strclass().
Tim Peters [Tue, 13 Aug 2002 20:42:00 +0000 (20:42 +0000)]
Fixed error in new comment.
Tim Peters [Tue, 13 Aug 2002 20:37:51 +0000 (20:37 +0000)]
k_mul(): The fix for (ah+al)*(bh+bl) spilling 1 bit beyond the allocated
space is no longer needed, so removed the code. It was only possible when
a degenerate (ah->ob_size == 0) split happened, but after that fix went
in I added k_lopsided_mul(), which saves the body of k_mul() from seeing
a degenerate split. So this removes code, and adds a honking long comment
block explaining why spilling out of bounds isn't possible anymore. Note:
ff we end up spilling out of bounds anyway <wink>, an assert in v_iadd()
is certain to trigger.
Barry Warsaw [Tue, 13 Aug 2002 20:09:26 +0000 (20:09 +0000)]
Regress Guido's change of 2002/08/06 to check for the zlib version
1.1.4. Redhat hasn't upgraded but does provide a patched 1.1.3
package, so checking for 1.1.4 just makes life difficult.
Neal Norwitz [Tue, 13 Aug 2002 19:01:38 +0000 (19:01 +0000)]
Allow docstrings to be removed during compilation for *SLOT macro and friends
Guido van Rossum [Tue, 13 Aug 2002 18:26:26 +0000 (18:26 +0000)]
Add tests for including __dict__ and/or __weakref__ in __slots__.
Add some more rigor to slotmultipleinheritance().
Neal Norwitz [Tue, 13 Aug 2002 17:42:57 +0000 (17:42 +0000)]
SF bug #574235, convert_path fails with empty pathname
Neal Norwitz [Tue, 13 Aug 2002 17:18:45 +0000 (17:18 +0000)]
Allow docstrings to be removed during compilation
Neal Norwitz [Tue, 13 Aug 2002 17:16:49 +0000 (17:16 +0000)]
Add test for SF bug # 575229, multiple inheritance w/ slots dumps core
Fix already checked in by Guido
Fred Drake [Tue, 13 Aug 2002 13:59:55 +0000 (13:59 +0000)]
Remove ugly irregular spaces from in front of some comments.
Jason Tishler [Tue, 13 Aug 2002 11:42:41 +0000 (11:42 +0000)]
Bug #556025: list(xrange(1e9)) --> seg fault
Close the bug report again -- this time for Cygwin due to a newlib bug.
See the following for the details:
http://sources.redhat.com/ml/newlib/2002/msg00369.html
Note that this commit is only a documentation (i.e., comment) change.
Guido van Rossum [Tue, 13 Aug 2002 10:05:56 +0000 (10:05 +0000)]
Add an improvement wrinkle to Neil Schemenauer's change to int_mul
(rev. 2.86). The other type is only disqualified from sq_repeat when
it has the CHECKTYPES flag. This means that for extension types that
only support "old-style" numeric ops, such as Zope 2's ExtensionClass,
sq_repeat still trumps nb_multiply.