Commit Graph

520 Commits

Author SHA1 Message Date
Tim Peters b9099c3df4 SF patch 637176: list.sort crasher
Armin Rigo's Draconian but effective fix for

SF bug 453523: list.sort crasher

slightly fiddled to catch more cases of list mutation.  The dreaded
internal "immutable list type" is gone!  OTOH, if you look at a list
*while* it's being sorted now, it will appear to be empty.  Better
than a core dump.
2002-11-12 22:08:10 +00:00
Raymond Hettinger f24eb35d18 SF patch 629637: Add sample(population, k) method to the random module.
Used for random sampling without replacement.
2002-11-12 17:41:57 +00:00
Tim Peters 37dfb01766 Added a blurb about the change to sys.version under MSVC. 2002-11-11 19:51:33 +00:00
Thomas Heller 95cb7e4ae5 NEWS entry for the changed fdopen function. 2002-11-07 16:23:55 +00:00
Gustavo Niemeyer c523b04b0f Fixed sre bug "[#581080] Provoking infinite scanner loops".
This bug happened because: 1) the scanner_search and scanner_match methods
were not checking the buffer limits before increasing the current pointer;
and 2) SRE_SEARCH was using "if (ptr == end)" as a loop break, instead of
"if (ptr >= end)".

* Modules/_sre.c
  (SRE_SEARCH): Check for "ptr >= end" to break loops, so that we don't
  hang forever if a pointer passing the buffer limit is used.
  (scanner_search,scanner_match): Don't increment the current pointer
  if we're going to pass the buffer limit.

* Misc/NEWS
  Mention the fix.
2002-11-07 03:28:56 +00:00
Martin v. Löwis dc46175dc3 Add --check-tkinter to setup.py. Install IDLE. Fixes #634078. 2002-11-06 21:59:33 +00:00
Gustavo Niemeyer fbceb01ef0 Fixed bug "[#466200] ability to specify a 'verify' script".
* Lib/distutils/command/bdist_rpm.py
  (bdist_rpm.initialize_options): Included verify_script attribute.
  (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename.
  (bdist_rpm._make_spec_file): Included verify_script in script_options
  tuple.

* Misc/NEWS
  Mention change.
2002-11-06 18:44:26 +00:00
Walter Dörwald 4dbf192f2b Add next() and __iter__() methods to StreamReader, StreamReaderWriter
and StreamRecoder.

This closes SF bug #634246.
2002-11-06 16:53:44 +00:00
Gustavo Niemeyer 4e7be06a65 Fixed bug #470582, using a modified version of patch #527371,
from Greg Chapman.

* Modules/_sre.c
  (lastmark_restore): New function, implementing algorithm to restore
  a state to a given lastmark. In addition to the similar algorithm used
  in a few places of SRE_MATCH, restore lastindex when restoring lastmark.
  (SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(),
  function. Also include it where missing. In SRE_OP_MARK, set lastindex
  only if i > lastmark.

* Lib/test/re_tests.py
* Lib/test/test_sre.py
  Included regression tests for the fixed bugs.

* Misc/NEWS
  Mention fixes.
2002-11-06 14:06:53 +00:00
Barry Warsaw 5d8d618c95 Add an entry for pdb's new `pp' command. 2002-11-05 22:41:33 +00:00
Tim Peters 9288f95cb5 Another round on SF patch 618135: gzip.py and files > 2G
The last round boosted "the limit" from 2GB to 4GB.  This round gets
rid of the 4GB limit.  For files > 4GB, gzip stores just the last 32
bits of the file size, and now we play along with that too.  Tested
by hand (on a 6+GB file) on Win2K.

Boosting from 2GB to 4GB was arguably enough "a bugfix".  Going beyond
that smells more like "new feature" to me.
2002-11-05 20:38:55 +00:00
Gustavo Niemeyer f8ca8364c9 Patch implementing bz2 module.
* setup.py
  (PyBuildExt.detect_modules): Included bz2 module detection.

* Modules/bz2module.c
* Lib/test/test_bz2.py
* Doc/lib/libbz2.tex
  Included files implementing, testing, and documenting bz2 module.

* Doc/Makefile.deps
* Doc/lib/lib.tex
  Include references to libbz2.tex.

* Misc/NEWS
  (Library): Mention distutils' c++ linkage patch, and new bz2 module.
2002-11-05 16:50:05 +00:00
Tim Peters fb0ea525d5 Related to SF patch 618135: gzip.py and files > 2G.
Fixed the signed/unsigned confusions when dealing with files >= 2GB.
4GB is still a hard limitation of the gzip file format, though.

Testing this was a bitch on Win98SE due to frequent system freezes.  It
didn't freeze while running gzip, it kept freezing while trying to *create*
a > 2GB test file!  This wasn't Python's doing.  I don't know of a
reasonable way to test this functionality in regrtest.py, so I'm not
checking in a test case (a test case would necessarily require creating
a 2GB+ file first, using gzip to zip it, using gzip to unzip it again,
and then compare before-and-after; so >4GB free space would be required,
and a loooong time; I did all this "by hand" once).

Bugfix candidate, I guess.
2002-11-04 19:50:11 +00:00
Martin v. Löwis 1da9c57c74 Patch #630829: Don't block on IAC, process suboptions. 2002-11-04 09:56:00 +00:00
Martin v. Löwis f0a4668e6f Add getpreferredencoding. Support @euro modifiers. Fixes #554676.
The @euro part is backported to 2.2.3.
2002-11-03 17:20:12 +00:00
Neal Norwitz 94a83fdc15 Fix SF #632624, test_resource failure on alpha/64bit
Return PyLongs instead ot PyInts.
On alphas, 9223372036854775807 became -1.
2002-11-02 17:46:24 +00:00
Martin v. Löwis 74b51ac1e5 Patch #613256: Add nescape method to xml.sax.saxutils. 2002-10-26 14:50:45 +00:00
Martin v. Löwis 080689c3f6 Document patch #512981. 2002-10-26 14:42:02 +00:00
Martin v. Löwis a19bfe07e0 Correct stat_result float time stamps entry. 2002-10-16 18:28:36 +00:00
Martin v. Löwis 77ac429eff Patch #572628: Optional timeouts for put and get. 2002-10-15 15:11:13 +00:00
Martin v. Löwis b24e3477dc Patch #621891: Add askopenfile{name}s. 2002-10-13 10:28:04 +00:00
Martin v. Löwis 2ec362717b Patch #621205: Tkinter updates for tk8.4. 2002-10-13 10:22:08 +00:00
Guido van Rossum cafe0eefc3 Back out news about SF patch 479898 -- it's withdrawn. 2002-10-11 11:47:28 +00:00
Martin v. Löwis 6ce1315bd3 Patch #612602: Streamline configure methods. 2002-10-10 14:36:13 +00:00
Guido van Rossum 2b492b61c6 News about repr() and 8-bit characters, and setlocale() in the
readline module.
2002-10-09 21:40:48 +00:00
Mark Hammond 8696ebcd28 Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
2002-10-08 02:44:31 +00:00
Martin v. Löwis e9ce0b0fea Patch #448038: Add move(). Report errors from copytree as in shutil.Error. 2002-10-07 13:23:24 +00:00
Martin v. Löwis a844f2d165 Document patch #594001. 2002-10-05 09:46:48 +00:00
Marc-André Lemburg 97047e219f News item about the new encoding normalization scheme. 2002-10-04 11:55:21 +00:00
Guido van Rossum ba60297a0a Mention droped support for Tcl/Tk 8.0 and 8.1. 2002-10-01 18:18:58 +00:00
Skip Montanaro a2a07bce89 fix a couple nits with my use of ReST 2002-09-30 15:23:01 +00:00
Guido van Rossum 6b3db551be Disable building of the fpectl module -- it's dangerous or useless
except in the hands of experts.  Will backport to 2.2.2.
2002-09-25 15:02:44 +00:00
Skip Montanaro 4a38583456 reference the new NEWS.help file 2002-09-20 17:08:52 +00:00
Skip Montanaro e5d7f7f3af ReST-ification of the NEWS file. While the total number of changes are
fairly large, most are caused by reformatting section and subsection
headings.  The changes fall into the following categories:

    * reformatted section and subsection headers.

    * escaped isolated asterisks which would be interpreted as starting bold
      or italic text (e.g. "void (*)(PyObject \*)").

    * quoted stuff that looks like internal references but isn't
      (e.g. ``PyCmp_``).

    * changed visually balanced quotes to just use apostrophes
      (e.g. "'string'" instead of "`string'").

    * introduced and indenting multiline chunks of code.

    * created one table (search for "New codecs").
2002-09-20 14:16:59 +00:00
Guido van Rossum 923e4ef049 The SGI demos are gone. 2002-09-17 20:58:59 +00:00
Skip Montanaro 4cb2204851 migrate news about 2.1 and earlier releases from NEWS to HISTORY in
preparation for ReST-ification of NEWS.  (Also tests checkin ability
from my new Powerbook.  woohoo!)
2002-09-17 20:55:31 +00:00
Martin v. Löwis 658009afdb Make BadPickleGet a class. Fixes #609164. 2002-09-16 17:26:24 +00:00
Martin v. Löwis a32c994129 Always generate floats for stat_result; fix configure test. 2002-09-09 16:17:47 +00:00
Martin v. Löwis 94717ed1d4 Patch #606592: Subsecond timestamps in stat_result. 2002-09-09 14:24:16 +00:00
Walter Dörwald 5ccaf8f129 Apply diff3.txt (plus additional documentation)
from SF patch http://www.python.org/sf/554192

This adds two new functions to mimetypes:
guess_all_extensions() which returns a list of all known
extensions for a mime type, and add_type() which adds one
mapping between a mime type and an extension.
2002-09-06 16:15:58 +00:00
Neal Norwitz b567392bbf SF bug # 585792, Invalid mmap crashes Python interpreter
Raise ValueError if user passes a size to mmap which is larger
than the file.
2002-09-05 21:48:07 +00:00
Neal Norwitz 7165af23e6 Added "that" to correct grammar, the rest is due to wrapping 2002-09-05 21:42:24 +00:00
Skip Montanaro 979c74b969 added a bit about the change to the thread ticker 2002-09-03 21:25:14 +00:00
Skip Montanaro 8e790e7007 expose PYTHON_API_VERSION macro as sys.api_version. Closes patch # 601456. 2002-09-03 13:25:17 +00:00
Walter Dörwald 3aeb632c31 PEP 293 implemention (from SF patch http://www.python.org/sf/432401) 2002-09-02 13:14:32 +00:00
Guido van Rossum 45ec02aed1 SF patch 576101, by Oren Tirosh: alternative implementation of
interning.  I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged.  Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.
2002-08-19 21:43:18 +00:00
Guido van Rossum d8ab35c933 News about sets. (There's no documentation; if someone wants to
convert the doc strings to LaTeX, be my guest.)
2002-08-19 16:25:46 +00:00
Raymond Hettinger f2f2a2c130 Fix spelling errors and note the addition of operator.pow() 2002-08-19 14:25:03 +00:00
Tim Peters 012c0a393a Newly-relaxed limits on random.randrange(). Also added some info about
Karatsuba's better cache behavior with extremely large multiplicands.
2002-08-16 03:40:07 +00:00
Guido van Rossum f808b891d6 Mention warnings about defining None. 2002-08-16 03:38:10 +00:00