Commit Graph

1734 Commits

Author SHA1 Message Date
Skip Montanaro 79cddc56b3 stupid, stupid, stupid... raw_input() already supports readline() if the
readline module is loaded.
2004-05-24 14:20:16 +00:00
Skip Montanaro 0dc23101a0 Exposed readline() function from the readline module. 2004-05-23 17:46:50 +00:00
Raymond Hettinger 059e170c1d SF bug #949329: sets.Set() --> set() 2004-05-19 19:56:44 +00:00
Raymond Hettinger 354433a59d SF patch #872326: Generator expression implementation
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Skip Montanaro beddfcb6d0 date typo in %changelog 2004-05-17 13:17:38 +00:00
Thomas Heller 2e7c8328ae Fix SF item #876278: Unbounded recursion in modulefinder.
Already backported to release23-maint.
2004-05-11 15:10:59 +00:00
Martin v. Löwis 456ab1d271 Swap public and system ID in start_doctype_decl. Fixes #780300. 2004-05-06 01:54:36 +00:00
Raymond Hettinger 0468e416c1 SF patch #947476: Apply freelist technique to lists
Re-use list object bodies.  Saves calls to malloc() and free() for
faster list instantiation and deallocation.
2004-05-05 05:37:53 +00:00
Thomas Heller cc10a85fdc Forgot to mention the SF number, and that Bob Ippolito provided the patch. 2004-04-22 17:28:25 +00:00
Thomas Heller 1328b52c6f Two new public API functions, Py_IncRef and Py_DecRef. Useful for
dynamic embedders of Python.
2004-04-22 17:23:49 +00:00
Hye-Shik Chang 0f5bf1ebdd SF #926075: Fixed the bug that returns a wrong pattern object for
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:11:11 +00:00
Hye-Shik Chang 54f9439b7c Bug #934635: Fix a bug where the configure script couldn't detect
getaddrinfo() properly if the KAME stack had SCTP support.
(Submitted by SUZUKI Shinsuke)
2004-04-14 07:55:31 +00:00
Skip Montanaro d0c0c41fe9 note --trackcalls flag in trace module 2004-04-07 16:03:02 +00:00
Raymond Hettinger e2eda606a8 Improve accuracy of sequence and mapping checks. 2004-04-04 08:51:41 +00:00
Andrew MacIntyre 4e10ed3b86 If a file is opened with an explicit buffer size >= 1, repeated
close() calls would attempt to free() the buffer already free()ed on
the first close().     [bug introduced with patch #788249]

Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
2004-04-04 07:01:35 +00:00
Skip Montanaro 7a92d74c52 It would help if I deleted the old pystack!
Also, move pystack comment down next to it
2004-04-02 14:53:55 +00:00
Skip Montanaro 74d07f2bfa include local variables when dumping Python stack trace 2004-04-02 14:51:13 +00:00
Martin v. Löwis fb66cd2540 Patch #924497: find(1) all files with /usr/local/bin/python in them.
Backported to 2.3.
2004-03-31 18:59:04 +00:00
Brett Cannon 21beb4c2ce Fixed a caching bug in platform.platform() where the argument of 'terse' was
not taken into consideration when caching value.
2004-03-25 16:55:12 +00:00
Nicholas Bastin c69ebe8d50 Enable the profiling of C functions (builtins and extensions) 2004-03-24 21:57:10 +00:00
Nicholas Bastin c723a14bfb ...for work done at PyCon 2004 (and beyond...) 2004-03-23 23:29:01 +00:00
Brett Cannon 06c34798df Make socket.sslerror a subclass of socket.error .
Added socket.error to the socket module's C API.
2004-03-23 23:16:54 +00:00
Nicholas Bastin 824b1b2da8 Added command line options for profile.py - one for stats output file
and one for sort order when using stdout.  Uses optparse.
2004-03-23 18:44:39 +00:00
Nicholas Bastin 1eb4bfc657 Added global runctx function to profile to fix SF Bug #716587 2004-03-22 20:12:56 +00:00
Nicholas Bastin abce8a681c Changed file.name to be the object passed as the 'name' argument to file()
Fixes SF Bug #773356
2004-03-21 20:24:07 +00:00
Hye-Shik Chang c3a87b8dbb Bug #920575: Add a workaround for GNU libc nl_langinfo()'s returning NULL.
(Reported by Matthias Klose)
2004-03-21 19:34:30 +00:00
Andrew M. Kuchling e240d9bcc5 Update URLs 2004-03-21 18:48:22 +00:00
Nicholas Bastin a7604bf1b4 Moved tracebackobject to traceback.h, Closes SF Bug #497067 2004-03-21 18:37:23 +00:00
Just van Rossum 7139afd1f5 [693255] also back out corresponding NEWS item... 2004-03-21 16:26:32 +00:00
Martin v. Löwis 347c30d217 Patch #853488: Tix hlist missing entryconfigure and entrycget methods. 2004-03-21 15:29:41 +00:00
Raymond Hettinger ff5bc50bb0 Improve byte coding for multiple assignments.
Gives 30% speedup on "a,b=1,2" and 25% on "a,b,c=1,2,3".
2004-03-21 15:12:00 +00:00
Brett Cannon 4f65331483 Limit the nesting depth of a tuple passed as the second argument to
isinstance() or issubclass() to the recursion limit of the interpreter.
2004-03-20 22:52:14 +00:00
Brett Cannon cc45466b8f Remove non-existent paths. 2004-03-20 21:31:33 +00:00
Hye-Shik Chang 4a7ad1a27d Add an entry for addition of the ptcp154 codec. 2004-03-19 08:11:56 +00:00
Raymond Hettinger ade08ea8a8 Add news entries for the dictionary optimizations. 2004-03-18 09:48:12 +00:00
Raymond Hettinger 49f9bd15ff SF feature request #686323: Minor array module enhancements
array.extend() now accepts iterable arguments implements as a series
of appends.  Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.
2004-03-14 05:43:59 +00:00
Raymond Hettinger 6e2ee866fa Update the array overallocation scheme to match the approach used for
lists.  Speeds append() operations and reduces memory requirements
(because of more conservative overallocation).

Paves the way for the feature request for array.extend() to support
arbitrary iterable arguments.
2004-03-14 04:37:50 +00:00
Raymond Hettinger 2d95f1ad57 SF patch #911431: robot.txt must be robots.txt
(Contributed by George Yoshida.)
2004-03-13 20:27:23 +00:00
Raymond Hettinger 3aa82c07f7 SF bug #910986: copy.copy fails for array.array
Added support for the copy module.
2004-03-13 18:18:51 +00:00
Raymond Hettinger c1e4f9dd92 Use a new macro, PySequence_Fast_ITEMS to factor out code common to
three recent optimizations.  Aside from reducing code volume, it
increases readability.
2004-03-12 08:04:00 +00:00
Neil Schemenauer 4252a7a5d1 Make buffer objects based on mutable objects (like array) safe. 2004-03-11 02:42:45 +00:00
Raymond Hettinger 3e47f65e28 SF patch #907403: Improvements to cStringIO.writelines()
The writelines() method now accepts any iterable argument and writes
the lines one at a time rather than using ''.join(lines) followed by
a single write.  Results in considerable memory savings and makes the
method suitable for use with generator expressions.
2004-03-08 18:22:35 +00:00
Raymond Hettinger dd80f76265 SF patch #910929: Optimize list comprehensions
Add a new opcode, LIST_APPEND, and apply it to the code generation for
list comprehensions.  Reduces the per-loop overhead by about a third.
2004-03-07 07:31:06 +00:00
Raymond Hettinger 31017aed36 SF #904720: dict.update should take a 2-tuple sequence like dict.__init_
(Championed by Bob Ippolito.)

The update() method for mappings now accepts all the same argument forms
as the dict() constructor.  This includes item lists and/or keyword
arguments.
2004-03-04 08:25:44 +00:00
Skip Montanaro e2b61e0190 * explain flags in doc strings
* reverse order of files on the command line in pickle2db.py to make it
  symmetrical with db2pickle.py in the two-arg case (src, then dest)
2004-03-03 17:42:08 +00:00
Brett Cannon d1080a3418 Have strftime() check its time tuple argument to make sure the tuple's values
are within proper boundaries as specified in the docs.

This can break possible code (datetime module needed changing, for instance)
that uses 0 for values that need to be greater 1 or greater (month, day, and
day of year).

Fixes bug #897625.
2004-03-02 04:38:10 +00:00
Skip Montanaro 786ea6bc23 Add pystack definition to Misc/gdbinit with some explanation of its behavior
and add flag comments to ceval.c and main.c alerting people to the coupling
between pystack and the layout of those files.
2004-03-01 15:44:05 +00:00
Michael W. Hudson d3b33b5f6f "Fix" (for certain configurations of the planets, including
recent gcc on Linux/x86)

[ 899109 ] 1==float('nan')

by implementing rich comparisons for floats.

Seems to make comparisons involving NaNs somewhat less surprising
when the underlying C compiler actually implements C99 semantics.
2004-02-19 19:35:22 +00:00
Martin v. Löwis d3c810ed31 Patch #892673: Replace /usr/local/bin/python with
/usr/bin/env python'%{binsuffix}
Backported to 2.3.
2004-02-15 21:27:03 +00:00
Martin v. Löwis a79449e7a2 Patch #711838: Allow non-anonymous ftp urls in urllib2.
Backported to 2.3.
2004-02-15 21:19:18 +00:00