Commit Graph

15970 Commits

Author SHA1 Message Date
Andrew M. Kuchling 9710297e36 Modified version of a patch from Jeremy Kloth, to make .get_outputs()
produce a list of unique filenames:
    "While attempting to build an RPM using distutils on Python 2.0,
    rpm complained about duplicate files.  The following patch fixed
    that problem.
2001-01-16 16:16:03 +00:00
Jack Jansen c00df0bbba Trigger keep-console-open on GUSISIOUX_STATE_UNKNOWN. Better than the previous complicated expression. 2001-01-16 15:54:58 +00:00
Jack Jansen f50fbf11f6 Config file for standalone carbon python. 2001-01-16 15:51:24 +00:00
Jack Jansen 2fffb13448 Added Carbon interpreter. 2001-01-16 15:50:48 +00:00
Eric S. Raymond 0e7b9faa74 Commit version of config.h.in that covers the TERMIOS test. 2001-01-16 15:32:53 +00:00
Eric S. Raymond d2d75d3edd Check in a version with the termios test in place. 2001-01-16 15:26:34 +00:00
Eric S. Raymond bddbaf7023 Make pop_source and push_source available, as documented. 2001-01-16 15:19:13 +00:00
Eric S. Raymond 1360359bb9 Make HAVE_TERMIOS_H and associated config.sh shell variable available
when configure detects the presence of termios.h; later we'll use this
for correct configuration of edline/readline.

Also, fix a bug in acconfig.h -- somebody forgot to add an undef to
cover the LIBNDBM configure symbol, which was preventing autoheader
from working properly.
2001-01-16 15:01:26 +00:00
Jack Jansen 844c297da9 Converted to CW Pro 6 and new naming scheme. 2001-01-16 14:24:56 +00:00
Eric S. Raymond bd1a489759 push_source() and pop_source() entry points for shlex instances.
These basically just make available to the user what userhook()
does to the source stack.  Documentation included.
2001-01-16 14:18:55 +00:00
Jack Jansen 159830ec3a Added the 'carb' resource to the carbon interpreter. 2001-01-16 13:01:48 +00:00
Jack Jansen ee5b8fa58a Replaced the single .exp file by two files, one for classic and one for carbon. 2001-01-16 13:01:11 +00:00
Marc-André Lemburg 3a645e4dd4 Added checks to prevent PyUnicode_Count() from dumping core
in case the parameters are out of bounds and fixes error handling
for .count(), .startswith() and .endswith() for the case of
mixed string/Unicode objects.

This patch adds Python style index semantics to PyUnicode_Count()
indices (including the special handling of negative indices).

The patch is an extended version of patch #103249 submitted
by Michael Hudson (mwh) on SF. It also includes new test cases.
2001-01-16 11:54:12 +00:00
Fredrik Lundh 1c5aa6901f bumped SRE version number to 2.1. cleaned up and added 1.5.2
compatibility patches.
2001-01-16 07:37:30 +00:00
Tim Peters dfb673b457 Whitespace normalization. 2001-01-16 07:12:46 +00:00
Tim Peters 8a7d2d5cb1 doctest-- The Little Module That Could --finally makes it to the Big Show <wink>. 2001-01-16 07:10:57 +00:00
Fredrik Lundh 6f5cba68fc fixed a memory leak in pattern cleanup (patch #103248 by cgw) 2001-01-16 07:05:29 +00:00
Thomas Wouters 47adcbafc0 Fix for SF bug #123625: some newsservers need 'authinfo' *before* 'mode
readers', others *after*. (Netscape Collabra for the first category,
INN-which-forks-nnrpd for the second.)
2001-01-16 06:35:14 +00:00
Neil Schemenauer 19030a08fb Plug memory leak. 2001-01-16 04:27:47 +00:00
Andrew M. Kuchling bd2983caf3 Add strip_dir argument to the single call to .object_filenames(), to
prevent creating files such as build/lib.whatever/Modules/foo.o
    when given a source filename such as Modules/foo.c.
2001-01-16 03:10:43 +00:00
Tim Peters b8c941771a Variant of Skip's patch 103246 (Remove unneeded string exception compat from Queue). 2001-01-15 22:53:46 +00:00
Ka-Ping Yee 10bc59320c Ugh. Sorry. Checked in the wrong file. Please ignore revision 1.3;
it anticipates another patch i was about to propose.
2001-01-15 22:27:06 +00:00
Ka-Ping Yee 27ac0d1ff5 better format names and error messages 2001-01-15 22:21:39 +00:00
Ka-Ping Yee 2057970601 This patch makes sure that the function name always appears in the error
message, and tries to make the messages more consistent and helpful when
the wrong number of arguments or duplicate keyword arguments are supplied.
Comes with more tests for test_extcall.py and and an update to an error
message in test/output/test_pyexpat.
2001-01-15 22:14:16 +00:00
Ka-Ping Yee 1ff08b1243 Add tokenizer support and tests for u'', U"", uR'', Ur"", etc. 2001-01-15 22:04:30 +00:00
Barry Warsaw 534c60f9ab Add a test case suggested by Guido, where a method is created with the
new module.
2001-01-15 21:00:02 +00:00
Barry Warsaw 83ad5015cb effbot caught a typo! 2001-01-15 20:51:40 +00:00
Barry Warsaw 573b54125d Add a NEWS item about function attributes. 2001-01-15 20:43:18 +00:00
Barry Warsaw d6a9e84c81 Committing PEP 232, function attribute feature, approved by Guido.
Closes SF patch #103123.

funcobject.h:

    PyFunctionObject: add the func_dict slot.

funcobject.c:

    PyFunction_New(): Initialize the func_dict slot to NULL.

    func_getattr(): Rename to func_getattro() and change the
    signature.  It's more efficient to use attro methods and dig the C
    string out than it is to re-convert a C string to a PyString.

    Also, add support for getting the __dict__ (a.k.a. func_dict)
    attribute, and for getting an arbitrary function attribute.

    func_setattr(): Rename to func_setattro() and change the signature
    for the same reason.  Also add support for setting __dict__
    (a.k.a. func_dict) and any arbitrary function attribute.

    func_dealloc(): Be sure to DECREF the func_dict slot.

    func_traverse(): Be sure to traverse func_dict too.

    PyFunction_Type: make the necessary func_?etattro() changes.

classobject.c:

    instancemethod_memberlist: Add __dict__

    instancemethod_setattro(): New method to set arbitrary attributes
    on methods (really the underlying im_func).  Raise TypeError when
    the instance is bound or when you're trying to set one of the
    reserved im_* attributes.

    instancemethod_getattr(): Renamed to instancemethod_getattro()
    since that's what it really is.  Also, added support fo getting
    arbitrary attributes through the im_func.

    PyMethod_Type: Do the ?etattr{,o} dance.
2001-01-15 20:40:19 +00:00
Barry Warsaw 4a420a0a75 Committing PEP 232, function attribute feature, approved by Guido.
Closes SF patch #103123.

Regression test for function attributes, with output file.
2001-01-15 20:30:15 +00:00
Barry Warsaw 773d9f09be Document function attributes for both the function type and the method
type.  The method documentation also includes a new brief discussion
of `bound' vs. `unbound' and why setting an attr on a bound method is
a TypeError.  Includes Skip's suggested text.
2001-01-15 20:28:50 +00:00
Guido van Rossum 051e335d42 Add note about new and improved xrange(). 2001-01-15 19:11:10 +00:00
Guido van Rossum 65e0b99b61 SF patch #103158 by Greg Ball: Don't do unsafe arithmetic in xrange
object.

This fixes potential overflows in xrange()'s internal calculations on
64-bit platforms.  The fix is complicated because the sq_length slot
function can only return an int; we want to support
xrange(sys.maxint), which is a 64-bit quantity on most 64-bit
platforms (except Win64).  The solution is hacky but the best
possible: when the range is that long, we can use it in a for loop but
we can't ask for its length (nor can we actually iterate beyond
2**31-1, because the sq_item slot function has the same restrictions
on its arguments.  Fixing those restrictions is a project for another
day...
2001-01-15 18:58:56 +00:00
Guido van Rossum afc4f0413a - Make sure to quote the username and password (SF patch #103236 by
dogfort).

- Don't drop the data argument when calling open_https() from the
  authentication error handler.
2001-01-15 18:31:13 +00:00
Fredrik Lundh 2e24044f9d from the really-stupid-bug department: uppercase literals should match
uppercase strings also when the IGNORECASE flag is set (bug #128899)

(also added test cases for recently fixed bugs to the regression suite
-- or in other words, check in re_tests.py too...)
2001-01-15 18:28:14 +00:00
Guido van Rossum 48450cf0a9 mwh@sourceforge found that UnicodeError can be raised by compiling.
Its base class ValueError can be raised too, so catch that.
2001-01-15 18:13:35 +00:00
Barry Warsaw a770e866d6 Fixing author's email address. 2001-01-15 17:08:45 +00:00
Barry Warsaw a57b89b492 Committing patch #103216, autodetect of dbmmodule support and building
of dbmmodule dynamically by default (otherwise it can pull in
dependencies with libdb that croak pybsddb3).  This change moves the
Setup line for dbmmodule to Setup.config.in.
2001-01-15 17:07:21 +00:00
Guido van Rossum e13be40b88 Geoffrey Gerrietts discovered that a KeyError was caught that probably
should have been a NameError.  I'm checking in a change that catches
both, just to be sure -- I can't be bothered trying to understand this
code any more. :-)
2001-01-15 16:53:58 +00:00
Guido van Rossum 97d3b93c2f Document changed default to passive mode. 2001-01-15 16:37:05 +00:00
Guido van Rossum da91f227ec Add note about ftplib defaulting to passive mode. 2001-01-15 16:36:08 +00:00
Guido van Rossum e6ccf3ab96 Default to passive mode. See SF bug #126851.
This is slightly controversial, but after reading the argumentation in
the bug tracker for and against, I believe this is the right solution.
Let me know if it breaks for you, and how.
2001-01-15 16:32:49 +00:00
Andrew M. Kuchling 3f819ec2ed Fix from Jack Jansen for the Mac and the Metrowerks compiler, posted
to the Distutils-SIG and archived at
http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html
2001-01-15 16:09:35 +00:00
Jack Jansen 8eb4b56828 Added a separate extension (.carbon.slb) for Carbon dynamic modules. 2001-01-15 16:00:40 +00:00
Guido van Rossum fd97a919ff Revert a change I accidentally checked in together with Ping's
"smallest patch ever".
2001-01-15 14:34:20 +00:00
Fredrik Lundh b35ffc0417 added "magic" number to the _sre module, to avoid weird errors caused
by compiler/engine mismatches
2001-01-15 12:46:09 +00:00
Tim Peters 142297ac92 Speed getline_via_fgets(), by supplying two "fast paths", although one is
faster than the other.  Should be faster for Mark Favas's 254-character
mail log lines, and *is* 3-4% quicker for my test case with much shorter
lines (but they're typical of *my* text files, and I'm tired of optimizing
for everyone else at my expense <wink> -- in fact, the only one who loses
here is Guido ...).
2001-01-15 10:36:56 +00:00
Tim Peters f29b64d243 Use the "MS" getline hack (fgets()) by default on non-get_unlocked
platforms.  See NEWS for details.
2001-01-15 06:33:19 +00:00
Tim Peters e119006e7d Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
Tim Peters b90f89a496 Whitespace normalization. 2001-01-15 03:26:36 +00:00