Commit Graph

15888 Commits

Author SHA1 Message Date
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
Tim Peters
495ad3c8cc Whitespace normalization. 2001-01-15 01:36:40 +00:00
Tim Peters
0c9886d589 Whitespace normalization. 2001-01-15 01:18:21 +00:00
Tim Peters
2344fae6d0 Whitespace normalization. 2001-01-15 00:50:52 +00:00
Fredrik Lundh
fa25a7d51f -- don't use recursion for unbounded non-greedy repeat
(bugs #115903, #115696)

This is based on a patch by Darrel Gallion.  I'm not 100%
sure about this fix, but I haven't managed to come up with
any test case it cannot handle...
2001-01-14 23:55:55 +00:00
Tim Peters
07e99cb774 Whitespace normalization. 2001-01-14 23:47:14 +00:00
Tim Peters
88869f9787 Whitespace normalization. 2001-01-14 23:36:06 +00:00
Guido van Rossum
752d3f557e - Don't hardcode Unix filename syntax when opening ~/.pdbrc.
- Conform to standard coding style in a few more places.
2001-01-14 23:29:48 +00:00
Guido van Rossum
077153e973 - Use mimetypes.types_map to initialize extensions_map.
- Change the default file type to application/octet-stream.
- Add support to recognize .py, .c, .h files as text/plain (this is
  what I use most :-).
2001-01-14 23:21:25 +00:00
Guido van Rossum
2d3eb133b7 SF Patch #103211.
Ping apparently doesn't check in Accepted patches, so I'm doing this
for him.

According to Ping: The name of the controller class should be
"Konqueror", not "Konquerer". (See the website
http://www.konqueror.org/.)
2001-01-14 23:09:35 +00:00
Guido van Rossum
c5f15b088f Make the copyright message the same as for the "real" interpreter. 2001-01-14 23:04:22 +00:00
Jack Jansen
da8df6ea8e Config file for shared carbon Python. 2001-01-14 23:02:32 +00:00
Jack Jansen
a3d95fa5a4 Added PythonCoreCarbon and PythonInterpreterCarbon targets. 2001-01-14 23:01:36 +00:00
Tim Peters
11cf605f84 Whitespace normalization. 2001-01-14 21:54:20 +00:00
Guido van Rossum
f6922aa435 SF Patch #103232 by dougfort: Preserve Nonstandard Port Number in Host
Header

Dougfort's comments: httplib does not include ':port ' in the HTTP 1.1
'Host:' header.  This causes problems if the server is not listening
on Port 80.  The test case I use is the login to /manage under Zope,
with Zope listening on port 8080. Zope returns a <frameset> with the
<frame> source URLs lacking the :8080.
2001-01-14 21:03:01 +00:00
Fredrik Lundh
470ea5ab94 SRE: stricter pattern syntax checking (covers parts of bug #115900) 2001-01-14 21:00:44 +00:00
Tim Peters
146965abf2 Whitespace standardization. 2001-01-14 18:09:23 +00:00
Fredrik Lundh
538f05c94d reapplied Fred's "recommended style" patch... 2001-01-14 15:15:37 +00:00
Fredrik Lundh
770617b23e SRE fixes for 2.1 alpha:
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
   had already been fixed by AMK)
2001-01-14 15:06:11 +00:00
Guido van Rossum
77b20f099e Document filterwarnings(..., append=<bool>). 2001-01-14 14:10:18 +00:00
Guido van Rossum
9464a7de60 - Added keyword argument 'append' to filterwarnings(); if true, this
appends to list of filters instead of inserting at the front.  This
  is useful to add a filter with a lower priority than -W options.

- Cosmetic improvements to a docstring and an error message.
2001-01-14 14:08:40 +00:00
Tim Peters
8373218e28 Reverting a dumb experimental version I checked in by mistake. 2001-01-14 05:12:40 +00:00
Tim Peters
2caf8df868 SF bug 128713: type(mmap_object) blew up on Linux. 2001-01-14 05:05:51 +00:00
Tim Peters
b9e202b2dc Added Jeffery Collins. 2001-01-14 05:04:40 +00:00
Fred Drake
34bafcc079 Fix a variety of minor nits and typos caught by Chris Ryland
<cpr@emsoftware.com>.
2001-01-14 02:57:14 +00:00
Guido van Rossum
3ad167ae34 mwh: [ Patch #103228 ] traceback.py nit.
When the exception has no message, don't insert a colon after the
exception name.
2001-01-13 22:14:31 +00:00
Guido van Rossum
4ec59c75e3 SF Patch #103227 by mwh: make code.py appreciate softspace 2001-01-13 22:10:41 +00:00
Guido van Rossum
03df3b3bc1 Neil discovered a bad DECREF on warnoptions, that caused repeated
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly.  With the DECREF removed I can't get it to fail any
more.  (Except it still leaks, but that's probably a separate issue.)
2001-01-13 22:06:05 +00:00
Tim Peters
5ceadc8cba No text file relying on significant trailing whitespace is robust under
modification.  Removed the need for that.
2001-01-13 19:16:21 +00:00
Guido van Rossum
b2825205a2 SF Patch #103225 by Ping: httplib: smallest Python patch ever
The ASCII-art diagram at the top of httplib contains a backslash at
  the end of a line, which causes Python to remove the newline. This
  one-character patch adds a space after the backslash so it will
  appear at the end of the line in the docstring as intended.
2001-01-13 16:55:33 +00:00
Andrew M. Kuchling
f6f3a89fbd Mention new curses.panel module 2001-01-13 14:53:34 +00:00
Martin v. Löwis
10a2787313 Document extensions to .pth files. 2001-01-13 09:54:41 +00:00
Tim Peters
73cbc5e616 Fix stupidity. 2001-01-13 03:45:59 +00:00