Commit Graph

9270 Commits

Author SHA1 Message Date
Neal Norwitz d7be118626 Exercise some error conditions 2004-07-08 01:56:46 +00:00
Neal Norwitz bdcb9410c2 SF bug #978308, Spurious errors taking bool of dead pro
Need to return -1 on error.

Needs backport.
2004-07-08 01:22:31 +00:00
Raymond Hettinger bd7f76dd04 Tim gets his default traps. 2004-07-08 00:49:18 +00:00
Tim Peters 4e0e1b6a54 Whitespace normalization. 2004-07-07 20:54:48 +00:00
Andrew M. Kuchling 1263bd8b6c [Bug #925107] Make .readline() consider self.stop. This makes read() and readline() very similar, so they're refactored into _read. Patch by Johannes Gijsbers.
2.3 bugfix candidate.
2004-07-07 14:09:21 +00:00
Andrew M. Kuchling 6fe93cdeb3 For readable() objects, the previous value of 'flags' was ignored.
Rearrange code for writable() case to make the parallel logic clearer
2004-07-07 12:23:53 +00:00
Skip Montanaro d916142343 whitespace normalization 2004-07-06 21:53:27 +00:00
Thomas Heller a146feaa10 Fix SF#983164.
Patch from Mark Hammond:

bdist_wininst attempts to use the correct MSVC runtime for the current
version of Python. This doesn't work correctly when --target-version
is set. In that case, bdist_wininst still uses the *current*
sys.version (ie, 2.4) rather than the version specified as
--target-version. Thus, the msvc7 runtime based executable stub is
*always* used.

This patch "hard-codes" knowledge of earlier Python versions,
providing the correct result when Python 2.4 is used to build Python
2.3 and earlier distributions.

Remove the short variant (-v) of the --target-version command line
options, it conflicts with the --verbose/-v standard distutils switch.
2004-07-06 19:23:27 +00:00
Barry Warsaw 7ff7d2cb0b testGetServBy(): Use services that should be available both on *nix and
Windows (XP at least ;).  Test in this order: echo, daytime, domain.
2004-07-06 16:48:25 +00:00
Raymond Hettinger 513ffe8112 * Fix missing return after error message is set.
* Add a test case that would have caught it.
2004-07-06 13:44:41 +00:00
Raymond Hettinger 0aeac107ca * Add __eq__ and __ne__ so that things like list.index() work properly
for lists of mixed types.
* Test that sort works.
2004-07-05 22:53:03 +00:00
Raymond Hettinger 5548be2653 Test the logic for int(d). 2004-07-05 18:49:38 +00:00
Raymond Hettinger ca3cc2fe21 * Update the todo list.
* Make ConversionSyntax signals get trapped by default.
2004-07-05 18:48:22 +00:00
Raymond Hettinger e0f1581bab * Fixup docstrings
* Make capitals default part of DefaultContext
2004-07-05 05:36:39 +00:00
Raymond Hettinger 0ea241e9e2 Changed the rounding constant values to match their variable names.
This serves to made the context representation more useful (the names in
match the names out).

Removed the link to ReXX.  That document did not shed add anything to
information already in the spec.

Further tighten the public API to improve usability:

* Emax and Emin are set through Context().  Their defaults are set in the
  DefaultContext, so there is no need to expose DEFAULT_MAX_EXPONENT
  and DEFAULT_MIN_EXPONENT.

* The string functions isnan() and isinfinity() were only used internal to
  the module and were not among the test cases.  External use cases are
  served by the Decimal constructor.  So, made these private.
2004-07-04 13:53:24 +00:00
Raymond Hettinger b1b605ef54 Fix clear_flags(). Make a readable (not evalable) Context repr. 2004-07-04 01:55:39 +00:00
Kurt B. Kaiser 49a5fe107f Redirect the warning stream to the shell during the ScriptBinding check of user code
and format the warning similarly to an exception for both that check and for
warnings raised in the subprocess.

M NEWS.txt
M Pyshell.py
M ScriptBinding.py
M run.py
2004-07-04 01:25:56 +00:00
Raymond Hettinger 9ec3e3b6eb Namespace cleanups:
* delete temporary globals immediately after use
* move a global into a class variable
* Rename BasicDefaultContext and ExtendedDefaultContext
  to BasicContext and ExtendedContext.
2004-07-03 13:48:56 +00:00
Raymond Hettinger 6ea4845822 * Make the tests independent of the default precision.
* Change the default precision to 28 (to match VB's decimal type).
2004-07-03 12:26:21 +00:00
Vinay Sajip 17c52d8493 Refactored RotatingFileHandler to create a base class for rotating handlers. Added TimedRotatingFileHandler. 2004-07-03 11:48:34 +00:00
Vinay Sajip 779e0c9334 Changed basicConfig() to add keyword arguments. Changes are backward-compatible.
Added error checking to log() to check that level is an integer, and raise a TypeError if not (as long as raiseExceptions is set).
Minor documentation corrections.
2004-07-03 11:47:26 +00:00
Raymond Hettinger d9c0a7ae94 Work through several open todos:
* Added test for pickling contexts
* Renamed ExceptionList to Signals (to match wording in the spec)
* Simplified Context constructor by allowing flags=None to automatically
  generate a zeroed-out flags dictionary.
* inlined _convertString() which was used only once
* _rounding_decision is private, so excluded its contants from __all__.
* added an XXX comment with concerns about subclassing signals results in
  a deviation from the spec (maybe important, maybe not).
* Taught the test_suite to determine its own directory (modeled after code
  in regrtest.py).  Enables it to be run when the current directory is not
  the test directory.
* Added a clear_flags() method to the Context API to make it easier to do
  a common operation with flags.
* Fixed the trap_enablers defaults in BasicDefaultContext to match the spec.
2004-07-03 10:02:28 +00:00
Brett Cannon cc4e935ea5 threading.Thread objects will now print a traceback for an exception raised
during interpreter shutdown instead of masking it with another traceback about
accessing a NoneType when trying to print the exception out in the first place.

Closes bug #754449 (using patch #954922).
2004-07-03 03:52:35 +00:00
Walter Dörwald 59ad45689b Add tests that check the result of calendar.monthcalendar() for a set
of corner cases.
2004-07-02 19:00:09 +00:00
Fred Drake 0a4dd390bf Make weak references subclassable:
- weakref.ref and weakref.ReferenceType will become aliases for each
  other

- weakref.ref will be a modern, new-style class with proper __new__
  and __init__ methods

- weakref.WeakValueDictionary will have a lighter memory footprint,
  using a new weakref.ref subclass to associate the key with the
  value, allowing us to have only a single object of overhead for each
  dictionary entry (currently, there are 3 objects of overhead per
  entry: a weakref to the value, a weakref to the dictionary, and a
  function object used as a weakref callback; the weakref to the
  dictionary could be avoided without this change)

- a new macro, PyWeakref_CheckRefExact(), will be added

- PyWeakref_CheckRef() will check for subclasses of weakref.ref

This closes SF patch #983019.
2004-07-02 18:57:45 +00:00
Thomas Heller 32b8f8052a Fix for SF 982215: bdist_wininst - Next button not greyed out during file copy.
Patch from Mark Hammond.
Recompiled binary.

Already packported to the 2.3 branch.
2004-07-02 08:02:40 +00:00
Raymond Hettinger 214b1c3aae SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case.  My timings so no measurable impact.
2004-07-02 06:41:07 +00:00
Fred Drake 83a6430717 Committing Tim's patch for SF bug #983585:
test_repr() fails with id() values that appear negative
2004-07-01 20:28:47 +00:00
Michael W. Hudson d7cc1bd809 Fix
[ 924301 ] A leak case with cmd.py & readline & exception

by ensuring that the readline completion function is always reset
even in the case of an exception being raised.  As a bonus, this
makes the documentation for pre & postloop accurate again.
2004-07-01 14:52:10 +00:00
Fred Drake 1f34eb17b5 fix small consistency nit 2004-07-01 14:28:36 +00:00
Raymond Hettinger 75cc1cb7e0 Move Decimal from the sandbox into production. 2004-07-01 11:15:39 +00:00
Raymond Hettinger 7c85fa4a52 Move Decimal from the sandbox into production. 2004-07-01 11:01:35 +00:00
Michael W. Hudson d5cf143482 Check in the updated version of patch #957240, which doesn't rely
on the marshalling characteristics of infinities.
2004-06-30 09:02:33 +00:00
Andrew M. Kuchling 08c08bb3d1 [Bug #912845] urllib2 only checks for a 200 return code, but 206 is also legal if a Range: header was supplied.
(Actually, should the first 'if' statement be modified to allow any 2xx status code?)
2004-06-29 13:19:19 +00:00
Andrew M. Kuchling 31352c5a30 Remove unused import. (If it's there for some deep, dark reason, it should have been commented.) 2004-06-29 13:17:29 +00:00
Andrew M. Kuchling bd3200fa2b Add test case for bug #912845: requesting an HTTP byte range doesn't work 2004-06-29 13:15:46 +00:00
Andrew M. Kuchling f1a2f9ec41 Docstring grammar fix 2004-06-29 13:07:53 +00:00
Brett Cannon fbac294d59 rsync is now a recognized protocol that uses "netloc" (i.e. specifies a network
location) in its addressing.

Closes bug #981299.
2004-06-29 04:02:40 +00:00
Raymond Hettinger 3b04ce824d Patch from Mark Hammond to fix a test error.
Now runs without exception on WinME/98.
2004-06-28 06:57:19 +00:00
Gregory P. Smith 19699a9351 Adds support for DB.pget and DBCursor.pget methods.
Based on a patch supplied by Ian Ward <ian@arevco.ca> on the pybsddb
mailing list 2004-03-26.
2004-06-28 04:06:49 +00:00
Barry Warsaw 11b91a0ea3 Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional.  Update the tests and the docs.
2004-06-28 00:50:43 +00:00
Gregory P. Smith dc5af70631 SF patch / bug #967763
Fix memory leaks revealed by valgrind and ensuing code inspection.

In the existing test suite valgrind revealed two memory leaks (DB_get
and DBC_set_range).  Code inspection revealed that there were many other
potential similar leaks (many on odd code error paths such as passing
something other than a DBTxn object for a txn= parameter or in the face
of an out of memory error).  The most common case that would cause a
leak was when using recno or queue format databases with integer keys,
sometimes only with an exception exit.
2004-06-27 23:32:34 +00:00
Gregory P. Smith a6b3caad41 Fix SF bug # 897820 - we can no longer use the DB_TRUNCATE flag when
opening the DB to implement legacy interface flag='n' support as
BerkeleyDB 4.2.52 no longer allows it in transaction protected
environments.  Do the os.unlink ourselves.
2004-06-27 22:56:42 +00:00
Raymond Hettinger ebd95222bf * Silence a test failure that resulted when test_site was run by
regrtest.py after it ran test_frozen.  This test was really only
  designed to be run immediately after startup.  Afterwards, other
  modules could be loaded when had not been fixed-up by site.py
  Took the chicken way out and only tested those modules known to
  be imported by site.py.

* Normalized whitespace.
2004-06-27 03:02:18 +00:00
Skip Montanaro 5fad8bd088 remove debugging print 2004-06-26 19:42:10 +00:00
Skip Montanaro 90e0153940 Allow classes from other modules to be specified at startup. For example,
using the postfixproxy module from Spambayes you might start smtpd up like

    smtpd.py -c spambayes.postfixproxy.SpambayesProxy :8025 :8026
2004-06-26 19:18:49 +00:00
Nicholas Bastin d858a7763a Massive performance improvement for C extension and builtin tracing code 2004-06-25 23:31:06 +00:00
Fred Drake ec6229e352 Make distutils "install --home" support all platforms. 2004-06-25 23:02:59 +00:00
Fred Drake 22021579a9 add boilerplate so the test modules can be run as scripts 2004-06-25 19:04:21 +00:00
Raymond Hettinger 9c18e81fb2 Install two code generation optimizations that depend on NOP.
Reduces the cost of "not" to almost zero.
2004-06-21 16:31:15 +00:00
Fred Drake 2c9f889122 add a couple of tests for the build_scripts command 2004-06-21 16:15:22 +00:00
Martin v. Löwis 873a277eb4 Patch #975885: print file name in err msg in quiet mode 2004-06-20 20:59:56 +00:00
Raymond Hettinger 28224f897a Improve the documented advice on how to best use heapq.heapreplace(). 2004-06-20 09:07:53 +00:00
Tim Peters 1b6f7a9057 Bug 975996: Add _PyTime_DoubleToTimet to C API
New include file timefuncs.h exports private API function
_PyTime_DoubleToTimet() from timemodule.c.  timemodule should export
some other functions too (look for painful bits in datetimemodule.c).

Added insane-argument checking to datetime's assorted fromtimestamp()
and utcfromtimestamp() methods.  Added insane-argument tests of these
to test_datetime, and insane-argument tests for ctime(), localtime()
and gmtime() to test_time.
2004-06-20 02:50:16 +00:00
Brett Cannon 1c3fa18be7 shutil.move() will raise an exception when trying to move a directory into
itself.

Closes bug #919012  .  Thanks Johannes Gijsbers.
2004-06-19 21:11:35 +00:00
Marc-André Lemburg cdc7923f6d Added normalization for Windows system name. Closes SF #945665. 2004-06-19 17:17:00 +00:00
Brett Cannon 84601f14a3 Change pydoc.stripid() be able to match against 64-bit addresses by having
regex match from 6 to 16 characters.
2004-06-19 01:22:48 +00:00
Brett Cannon c6c1f478d9 pydoc.stripid() is now case-insensitive for its regex to support platforms that
have pointer addresses in uppercase.

Closes bug #934282.  Thanks Robin Becker.
2004-06-19 01:02:51 +00:00
Fred Drake 2b2fe94cde fix typo 2004-06-18 21:28:28 +00:00
Sjoerd Mullender 4dbda47aea If self.packages is None (this can happen, I saw it), return
immediately (since None is not a sequence you can iterate over).
2004-06-18 20:39:11 +00:00
Thomas Heller 89a2dc72b1 Rebuild the wininst.exe files. 2004-06-18 18:30:27 +00:00
Fred Drake b849eddde6 fix bug: list of data files was initialized too soon in build_py 2004-06-17 20:16:19 +00:00
Fred Drake b8ab8b6da8 move support code to a helper module to ease re-use 2004-06-17 20:14:50 +00:00
Raymond Hettinger aefde435ef Reverse argument order for nsmallest() and nlargest().
Reads better when the iterable is a generator expression.
2004-06-15 23:53:35 +00:00
Fred Drake d0620dcf00 add a test that actually installs some scripts 2004-06-15 16:55:46 +00:00
Fred Drake bb7c14461d One unit test for distutils is not much, but is more than we had yesterday.
We need to write more; hopefully the barrier is a little lower now.
2004-06-15 15:49:46 +00:00
Raymond Hettinger a050171ee9 SF bug #973092: inspect.getframeinfo bug if 'context' is to big
Make sure the start argument is not negative.
2004-06-15 11:22:53 +00:00
Raymond Hettinger b67ad7e671 Patch #826074: cmath.log optional base argument, fixes #823209
(Contributed by Andrew Gaul.)
2004-06-14 07:40:10 +00:00
Martin v. Löwis ad21945d03 Back out #957240. 2004-06-14 04:58:42 +00:00
Raymond Hettinger bb6b7346ce Apply heapq.nlargest() to find best matches. 2004-06-13 09:57:33 +00:00
Raymond Hettinger 59efe363b6 Add heapq to list of __all__ checks. 2004-06-13 05:46:14 +00:00
Raymond Hettinger 2e3dfaf707 Install C version of heapq.nsmallest(). 2004-06-13 05:26:33 +00:00
Michael W. Hudson 84a7f0077c note a really bad test (no time to fix now) 2004-06-12 16:30:32 +00:00
Raymond Hettinger b25aa36f83 Improve the memory performance and speed of heapq.nsmallest() by using
an alternate algorithm when the number of selected items is small
relative to the full iterable.
2004-06-12 08:33:36 +00:00
Fred Drake 0eb32a65b0 Add support for package data.
This is basically the support for package data from Phillip Eby's
setuptools package.  I've changed it only to fit it into the core
implementation rather than to live in subclasses, and added
documentation.
2004-06-11 21:50:33 +00:00
Michael W. Hudson 5c26e86096 lightly modified version of my patch
[ 971323 ] make test_signal less annoying
after some comments on IRC from a highly opinionated australian who
wishes to remain anonymous.
2004-06-11 18:09:28 +00:00
Anthony Baxter c982bbde1c Bug 957381: rpmbuild builds a -debuginfo rpm on recent Redhat and Fedora releases.
Ignore it, rather than breaking.

Will backport.

(and r1.1000 for Misc/NEWS!)
2004-06-11 17:16:46 +00:00
Anthony Baxter 01e80b45d6 fix a poorly worded error message 2004-06-11 15:57:49 +00:00
Skip Montanaro a5616d2255 Respect a module's __all__ attribute. Closes #969938. 2004-06-11 04:46:12 +00:00
Raymond Hettinger bce036b49e Convert test_heapq.py to unittests. 2004-06-10 05:07:18 +00:00
Raymond Hettinger 33ecffb65a SF patch #969791: Add nlargest() and nsmallest() to heapq. 2004-06-10 05:03:17 +00:00
Tim Peters 4182cfd7db test_devnull(): Use assertEqual() instead of an assert stmt. 2004-06-08 20:34:34 +00:00
Brett Cannon 6ccc9a99df Removed test_sitepackages test. Skip discovered that it only passed if Python
had already been installed previously.
2004-06-08 18:25:48 +00:00
Martin v. Löwis bdec50f027 Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
Tim Peters 604c013ef2 SF 952807: Unpickling pickled instances of subclasses of datetime.date,
datetime.datetime and datetime.time could yield insane objects.  Thanks
to Jiwon Seo for the fix.

Bugfix candidate.  I'll backport it to 2.3.
2004-06-07 23:04:33 +00:00
Skip Montanaro 1c0228a519 Another nit found by Neal Norwitz using pychecker. This was caused by a
too-mechanical translation when converting html() to text() (simply stripped
strong() where it appeared).
2004-06-07 11:20:40 +00:00
Neal Norwitz 1cdd3632a0 Cleanup: the in operator already returns a bool, no need to bool() it again
Cleanup: use condition to be consistent with code above
CookieJar is in cookielib
2004-06-07 03:49:50 +00:00
Neal Norwitz 492faa5505 There is no reason to have an underscore after self 2004-06-07 03:47:06 +00:00
Neal Norwitz c75f891879 Remove a useless operation, setting name to itself 2004-06-07 03:45:56 +00:00
Skip Montanaro f2134842b4 correct name error caught by Neal Norwitz with pychecker 2004-06-07 02:40:05 +00:00
Raymond Hettinger 5dae505bbd Fix typo in comment. 2004-06-07 02:07:15 +00:00
Neal Norwitz c28e7ad3d0 Try to improve test coverage for utime() 2004-06-06 20:27:05 +00:00
Neal Norwitz 7b0a5057af Look for the multibyte codec map files in the parent directory too
This is similar to test_normalization, so that many source trees
can reference the same test file(s).
2004-06-06 20:09:49 +00:00
Skip Montanaro 0179a18034 add -L flag to cause leaks(1) command to run just before exit 2004-06-06 15:53:18 +00:00
Kurt B. Kaiser 4d5bc6031c Noam Raphel: Further developemt of CodeContext feature.
The visibility state of the code context pane is now persistent between
sessions and the pane does not appear in the shell window.

M CodeContext.py
M EditorWindow.py
M NEWS.txt
M PyShell.py
M config-extensions.def
M configHandler.py
2004-06-06 01:29:22 +00:00
Neil Schemenauer 6412b121f6 Remove a number of tests that differ only in input data size. It seems
no bug motivated their inclusion and the chance of them triggering a
problem seems unlikely.  Refactor to reduce code duplication.  Rename
'hamlet_scene' to 'HAMLET_SCENE'.  Test is much faster now.  Closes #960995.
2004-06-05 19:34:28 +00:00
Andrew M. Kuchling 26f6bdf4f1 [Bug #758665] cgitb.scanvars() fails because of an unititialized value variable. Patch from Robin Becker. 2004-06-05 19:15:34 +00:00
Neil Schemenauer 94afd3e7ae Remove lots of magic constants. 2004-06-05 19:02:52 +00:00
Hye-Shik Chang 2400e93057 SF #877165: Give an info about what C++ compiler command should be
used in cygwin and mingw32. (Reported by Michael Droettboom)
2004-06-05 18:37:53 +00:00
Skip Montanaro 58fc5d0813 Rewrote to use temporary files instead of StringIO objects in most places.
Goal is to work in the direction of universal newline support.
2004-06-05 17:03:20 +00:00
Andrew M. Kuchling a2c9a98a0a [Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate. 2004-06-05 16:27:16 +00:00
Andrew M. Kuchling b7d8ce0275 [Bug #921657] Allow '@' in unquoted HTML attributes. Not strictly legal according to the HTML REC, but HTMLParser is already a pretty loose parser. Reported by Bernd Zimmermann. 2004-06-05 15:31:45 +00:00
Raymond Hettinger 9021c95595 SF bug #964230: random.choice([]) should return more intelligible exception
Add a comment to make the traceback less mysterious.
2004-06-05 14:53:22 +00:00
Andrew M. Kuchling ba8b6bc86f [Bug #954364] inspect.getframeinfo() sometimes produces incorrect traceback line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me. 2004-06-05 14:11:59 +00:00
Hye-Shik Chang 39aef79821 Fix a bug that robotparser starves memory when the server responses
in HTTP/0.9 due to dissonance of httplib.LineAndFileWrapper and
urllib.addbase.
2004-06-05 13:30:56 +00:00
Andrew M. Kuchling 5962f457b4 [Bug #841757] Patch from /F to allow Unicode strings as struct keys 2004-06-05 12:35:58 +00:00
Andrew M. Kuchling b12d97c275 [Bug #841757] Exercise handling of Unicode strings 2004-06-05 12:33:27 +00:00
Brett Cannon 0096e262ff Refactored site.py into functions. Also moved over to using sets.
New regression test suite.
2004-06-05 01:12:51 +00:00
Raymond Hettinger 4e49b836db SF patch #961387: Make IDLE's paragraph reformatting width configurable 2004-06-04 06:31:08 +00:00
Hye-Shik Chang 3c145449da Reuse width/iswide tests from strings_test. (Suggested by Walter Dörwald) 2004-06-04 04:24:54 +00:00
Hye-Shik Chang 6838c557fa Add comments for unicode-only methods to give hints on AttributeError
tracebacks. (Suggested by Walter Dörwald)
2004-06-04 04:23:29 +00:00
Hye-Shik Chang 7bd860655f Fix typo. 2004-06-04 03:19:17 +00:00
Hye-Shik Chang 5f5125997b Add iswide() and width() method for UserString according as the
addition to unicode objects.
2004-06-04 03:18:12 +00:00
Jack Jansen 6b08a40442 Partial fix for #887242 (link extensions with dynamic_lookup in stead
of hard linking against the framework).

If $MACOSX_DEPLOYMENT_TARGET is set, and >= 10.3, during configure we
setup extensions to link with dynamic lookup. We also record the
value in the Makefile.

Distutils checks whether a value for MACOSX_DEPLOYMENT_TARGET was
recorded in the Makefile, and if it was insists that the current
value matches.

This is only a partial fix because it only applies to 2.4, and the
"two python problem" exists with Python 2.3 shipped with MacOSX 10.3,
which we have no influence over.
2004-06-03 12:41:45 +00:00
Martin v. Löwis eac324b90b Patch #957240: Add count parameter to asyncore.loop. 2004-06-03 09:18:35 +00:00
Greg Ward 6186410db0 SF #965425: fix so hyphenated words surrounded by punctuation are
wrapped correctly.
2004-06-03 01:59:41 +00:00
Walter Dörwald 118f931d07 Rename class attribute containing the class to be tested, so the name is the
same as for the string and sequence tests.
2004-06-02 18:42:25 +00:00
Andrew M. Kuchling acf261862d Remove reference to pcre module 2004-06-02 17:40:43 +00:00
Andrew M. Kuchling 4ad9723ed8 Remove pre module 2004-06-02 17:40:14 +00:00
Hye-Shik Chang 974ed7cfa5 - SF #962502: Add two more methods for unicode type; width() and
iswide() for east asian width manipulation. (Inspired by David
Goodger, Reviewed by Martin v. Loewis)
- Move _PyUnicode_TypeRecord.flags to the end of the struct so that
no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)
2004-06-02 16:49:17 +00:00
Vinay Sajip 7dc8ec9091 Copyright year changed 2004-06-02 10:51:05 +00:00
Piers Lauder 0659452b8b Added IMAP4_stream to __all__ 2004-06-02 00:42:36 +00:00
Tim Peters 1f4bcf9edd test_hash(): The test here is different enough from the one in the bug
report that the stats for expected # of collisions are a little higher.
Updated comments accordingly.
2004-06-01 18:58:04 +00:00
Andrew M. Kuchling 09e2cb0ba7 [Bug #962631] Fix typo reported by Bryan Blackburn 2004-06-01 12:48:19 +00:00
Raymond Hettinger 41bd02256f SF bug #942952: Weakness in tuple hash
(Basic approach and test concept by Tim Peters.)

* Improved the hash to reduce collisions.
* Added the torture test to the test suite.
2004-06-01 06:36:24 +00:00
Martin v. Löwis 504239fb38 Silence noise in regrtest. 2004-06-01 04:36:51 +00:00
Tim Peters 2f50e90818 SF patch 959726: sdist versus SVN
The disutils sdist command now ignores .svn directories.
2004-05-31 19:27:59 +00:00
Martin v. Löwis 92816de18e Patch #932930: suggest the use of rawstrings for backslashes. 2004-05-31 19:01:00 +00:00
Martin v. Löwis 2a6ba9097e Patch #963318: Add support for client-side cookie management. 2004-05-31 18:22:40 +00:00
Walter Dörwald 0a6d0ff8d9 Port the dictionary tests from test_types.py to unittest. Collect as much
mapping tests as possible in mapping_test.py and reuse the tests in
test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py.
From SF patch #736962.
2004-05-31 16:29:04 +00:00
Walter Dörwald cbd0b365c1 Fix typo (from SF bug #962602) 2004-05-31 15:12:27 +00:00
Raymond Hettinger 027bb633b6 Add weakref support to sockets and re pattern objects. 2004-05-31 03:09:25 +00:00
Raymond Hettinger cb87bc8e7e Add weakref support to array.array and file objects. 2004-05-31 00:35:52 +00:00
Raymond Hettinger 691d80532b Make sets and deques weak referencable. 2004-05-30 07:26:47 +00:00
Walter Dörwald 80ce6dd564 The default argument in dict.setdefault() defaults to None.
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
2004-05-27 18:16:25 +00:00
Walter Dörwald c139909611 The default argument in dict.setdefault() defaults to None.
Add this default to UserDict.DictMixin.setdefault() too.
2004-05-27 09:41:04 +00:00
Raymond Hettinger ddc819c964 Make sure sets are printed in sorted order 2004-05-22 19:37:21 +00:00
Raymond Hettinger 1453e4aa75 * teach repr.repr() about collections.deque()
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger ba6cd3647f * Updated repr.py to handle set() and frozenset().
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Raymond Hettinger 83ee79524a Add a test to verify an early call to iter() on the outermost for
expression.
2004-05-20 23:04:13 +00:00
Piers Lauder c1e32b6518 Fixed IMAP4_SSL read bug introduced by patch 956394 2004-05-20 11:32:35 +00:00
Piers Lauder 8f2b24401e Fixed IMAP4_SSL read and readlines code per patch 956394 2004-05-20 01:16:14 +00:00
Armin Rigo ba91b9fdda Applying SF patch #949329 on behalf of Raymond Hettinger. 2004-05-19 19:10:18 +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
Fred Drake 82903148a8 ConfigParser:
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651)
2004-05-18 04:24:02 +00:00
Fred Drake abc086fb0d ConfigParser:
- don't allow setting options to non-string values; raise TypeError
  when the value is set, instead of raising an arbitrary exception
  later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843)
2004-05-18 03:29:52 +00:00
Fred Drake bc12b01d83 ConfigParser:
- ensure that option names in interpolations are handled by
  self.optionxform in the same way that other references to option
  names
- add tests, documentation
(closes SF bug #857881, patch #865455)
2004-05-18 02:25:51 +00:00
Tim Peters ad9a7c4489 test_alias_nofallback(): Someone broke this test, after 2.3, by
converting it into assertRaises() form.  Restored the 2.3 code, and
explained why assertRaises() cannot be used instead.
2004-05-16 05:36:30 +00:00
Barry Warsaw e4aeb7d1f1 _parsegen(): Add a missing check for NeedMoreData. 2004-05-15 16:26:28 +00:00
Skip Montanaro 2dc0c13840 typo - fixes 954030. 2004-05-14 16:31:56 +00:00