Commit Graph

9264 Commits

Author SHA1 Message Date
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
Barry Warsaw ac606ccb79 forward porting from release23-maint 2004-05-13 23:18:54 +00:00
Barry Warsaw 2178a6d1a2 test_boundary_in_non_multipart(): Added a test for SF bug # 846938. 2004-05-13 23:17:04 +00:00
Barry Warsaw 61e5616d74 encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but
still 7-bit.
2004-05-13 22:50:12 +00:00
Barry Warsaw 4e59bc1e67 readline(): RFC 2046, section 5.1.2 (and partially 5.1) both state that the
parser must recognize outer boundaries in inner parts.  So cruise through the
EOF stack backwards testing each predicate against the current line.

There's still some discussion about whether this is (always) the best thing to
do.  Anthony would rather parse these messages as if the outer boundaries were
ignored.  I think that's counter to the RFC, but might be practically more
useful.  Can you say behavior flag?  (ug).
2004-05-13 20:17:51 +00:00
Barry Warsaw 58eb0fcb8f test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():
Two evil samples from Anthony's MIME torture tests.
2004-05-13 20:15:20 +00:00
Barry Warsaw d49f1d6c5a _structure(): Make sure all output goes the to fp object. 2004-05-13 20:14:20 +00:00
Barry Warsaw d0c12af7ef Another evil test from Anthony's suite. This one has an inner part with the
same boundary as the outer part.
2004-05-13 20:13:48 +00:00
Barry Warsaw dce231fb14 A boiled down example from Anthony's MIME torture tests. This one has a
separating boundary for an outer part inside an inner part.
2004-05-13 20:12:32 +00:00
Greg Ward f0ba764dbb SF #847346: merge from release23-maint branch: remove misguided
optimization for short input; beef up tests for fix_sentence_endings
feature.
2004-05-13 01:53:10 +00:00
Raymond Hettinger 0e371f2cb6 Make sure "del d[n]" is properly supported. Was necessary because the
same method that implements __setitem__ also implements __delitem__.
Also, there were several good use cases (removing items from a queue
and implementing Forth style stack ops).
2004-05-12 20:55:56 +00:00
Fred Drake 1cd6e4dc38 fix various descriptions of "ctime"
(closes SF patch #870287)
2004-05-12 03:51:40 +00:00
Barry Warsaw 486cb0ac2a Tests for message/external-body and for duplicate boundary lines. 2004-05-11 22:23:59 +00:00
Barry Warsaw b067e6287b More boiled down tests from Anthony's big torture suite. 2004-05-11 22:21:56 +00:00
Barry Warsaw 769f14a7c9 A boiled down message/external-body example from Anthony's torture test. 2004-05-11 22:20:59 +00:00
Barry Warsaw bce827bf12 An example with multiple boundary lines. 2004-05-11 22:20:05 +00:00
Barry Warsaw d38f448865 _parsegen(): Move the message/rfc822 clause to after the
message/delivery-status clause, and genericize it to handle all (other)
message/* content types.  This lets us correctly parse 2 more of Anthony's
MIME torture tests (specifically, the message/external-body examples).
2004-05-11 20:19:09 +00:00
Tim Peters c312b07d77 Reverting local change checked in by mistake. 2004-05-11 18:18:35 +00:00
Tim Peters 926bc22c65 Added 2.3.3 and 2.3.4 to the release table. Added 2004 to the list of
copyright years.
2004-05-11 18:13:10 +00:00
Barry Warsaw 5b44cd64d7 _parsegen(): Watch out for empty epilogues. 2004-05-11 18:10:15 +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
Barry Warsaw c29db26529 _parse_headers(): Strip a trailing newline from the envelope header. Closes
SF #951088.
2004-05-10 14:48:30 +00:00
Barry Warsaw 6f3b033774 _split_ascii(): Small optimization by RH. 2004-05-10 14:44:04 +00:00
Raymond Hettinger 300fa1d3b2 Temporarily disable doctest until genexps are in CVS 2004-05-10 14:08:42 +00:00
Mark Hammond c533c986e8 Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as
implemented in patch [ 851736 ].
2004-05-10 07:35:33 +00:00
Barry Warsaw d285600883 SF patch # 884030 by Amit Aronovitch; fixes the _subpart argument to match
documented semantics.
2004-05-09 18:04:24 +00:00
Barry Warsaw bfe18c096f test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. 2004-05-09 18:03:36 +00:00
Barry Warsaw 2c823d67e3 we dont support any Python's before 2.3 now. 2004-05-09 03:57:09 +00:00
Barry Warsaw 24f79762a1 Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:55:11 +00:00
Barry Warsaw 235c8eba62 Update to Python 2.3, getting rid of backward compatiblity crud.
This Parser is now just a backward compatible front-end to the FeedParser.
2004-05-09 03:46:42 +00:00
Barry Warsaw 5d84053e2c Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:44:55 +00:00
Barry Warsaw 4c3e33a80b Update to Python 2.3, getting rid of backward compatiblity crud. We don't
need the _compat21 or _compat22 modules either.
2004-05-09 03:42:37 +00:00
Barry Warsaw 3d1f397f1a Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a
bunch of module globals that aren't used.
2004-05-09 03:40:17 +00:00
Barry Warsaw 36112f2d34 Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a
bunch of module globals that aren't used.

__maxheaderlen -> _maxheaderlen

_handle_multipart(): This should be more RFC compliant now, and does match the
updated/fixed semantics for preamble and epilogue.
2004-05-09 03:35:17 +00:00
Barry Warsaw 418101fd64 An updated FeedParser that should be RFC complaint, passes all existing
(standard) tests, and doesn't throw parse errors.  I still need throw
Anthony's torture test at it, but I wanted to get this checked in and off my
disk.
2004-05-09 03:29:23 +00:00
Barry Warsaw 333e830b83 Add MessageDefect and subclasses. 2004-05-09 03:26:07 +00:00
Barry Warsaw 41f6ad6171 Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:24:43 +00:00
Barry Warsaw 09356d419c Like msg_12.txt but with some extra vertical whitespace around the inner
message's end boundary.
2004-05-09 03:17:29 +00:00
Barry Warsaw b8b57e75b2 A bunch of new tests, and updated tests for the email 3.0 FeedParser. 2004-05-09 03:16:03 +00:00
Raymond Hettinger e7169eb9ed Add more examples. 2004-05-09 01:15:01 +00:00
Raymond Hettinger 9d7c870c6d SF #950057: itertools.chain doesn't "process" exceptions as they occur
Both cycle() and chain() were handling exceptions only when switching
input sources.  The patch makes the handle more immediate.

Will backport.
2004-05-08 19:49:42 +00:00
Martin v. Löwis 7d9c6c7e8c Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848.
Backported to 2.3.
2004-05-07 07:18:13 +00:00
Raymond Hettinger 156c49ad1c Revert last change. 2004-05-07 05:50:35 +00:00
Raymond Hettinger 6924a00d10 Use sets instead of lists for membership testing 2004-05-06 16:55:07 +00:00
Andrew M. Kuchling 30633c9a64 [Bug #945063] Get file extension correct. (2.3 bugfix candidate) 2004-05-06 13:13:44 +00:00
Fred Drake e143bbb610 fix documentation for ContentHandler.ignorableWhitespace()
(closes SF bug #881707)
2004-05-06 03:47:48 +00:00
Martin v. Löwis ae20722d96 Consider output encoding in XMLGenerator. Fixes #938076.
Backported to 2.3.
2004-05-06 02:22:43 +00:00
Martin v. Löwis 0ea558f7b4 Properly delegate startElementNS in saxutils.XMLFilterBase. Fixes #936637.
Backported to 2.3.
2004-05-06 02:04:21 +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
Martin v. Löwis 8b3e871a19 Patch #944110: Properly process empty passwords. Fixes #944082.
Backported to 2.3.
2004-05-06 01:41:26 +00:00
Guido van Rossum 843c734ddd Using reversed() is not compatible with Python 1.5.2. 2004-05-04 18:18:59 +00:00
Raymond Hettinger bac788a3cd Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
Raymond Hettinger c5e378da41 Testing for None should be done with 'is' 2004-05-04 08:34:56 +00:00
Raymond Hettinger 0b569bb399 Stacks based on lists work better and read more clearly when they
grow and shrink on the right.
2004-05-04 08:21:52 +00:00
Martin v. Löwis 9f1340b9f2 Do not use the default namespace for attributes.
Fixes http://bugs.debian.org/229885
Will backport to 2.3.
2004-05-02 20:37:13 +00:00
Walter Dörwald c60c203670 Add a test script for the colorsys module. 2004-04-28 17:07:50 +00:00
Kurt B. Kaiser e3636e05de Fix a bug I introduced which causes all block openers at an indent level
to be shown, instead of outdenting each level.
2004-04-26 22:26:04 +00:00
Kurt B. Kaiser d00587a2ed 1. Add an Options menu entry: Code Context
2. Add a <<toggle-code-context>> envent to the [CodeContext] section of
   config-extensions.def and also a default-on variable, set to 0.
3. Update the help file to include Code Context.

M CodeContext.py
M config-extensions.def
M help.txt
2004-04-24 03:08:13 +00:00
Kurt B. Kaiser 610c7e07f3 1. Polish variables in EditorWindow extension loading and Tkinter variable code.
2. Add exception handling to EditorWindow Tkinter variable setvar() and getvar() fcns.
3. EditorWindow: remove some unneeded comments.
4. Add a separator to the Options menu
5. extend.txt: describe how to create a menu entry which has no keybinding.

M Bindings.py
M EditorWindow.py
M extend.txt
2004-04-24 03:01:48 +00:00
Kurt B. Kaiser 54d1a3b920 - New Extension: CodeContext. Provides block structuring hints for code
which has scrolled above an edit window. Patch 936169 Noam Raphael.

A CodeContext.py
M NEWS.txt
M config-extensions.def
2004-04-21 20:06:26 +00:00
Hye-Shik Chang 9f62eccb66 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:30:07 +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
Raymond Hettinger c46cb2a1a9 * Restore the pure python version of heapq.py.
* Mark the C version as private and only use when available.
2004-04-19 19:06:21 +00:00
Martin v. Löwis 61e40bd897 Special case normalization of empty strings. Fixes #924361.
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Skip Montanaro c00fc8452e Open file in universal newline mode when passing to compile(). Solution
from Felix Wiemann.  Closes patch #934971.
2004-04-16 03:28:19 +00:00
Raymond Hettinger 7892b1c651 * Add unittests for iterators that report their length
* Document the differences between them
* Fix corner cases covered by the unittests
* Use Py_RETURN_NONE where possible for dictionaries
2004-04-12 18:10:01 +00:00
Andrew MacIntyre daedf21852 Fixes for AF_UNIX support on OS/2:
- return the full size of the sockaddr_un structure, without which
  bind() fails with EINVAL;
- set test_socketserver to use a socket name that meets the form
  required by the underlying implementation;
- don't bother exercising the forking AF_UNIX tests on EMX - its
  fork() can't handle the stress.
2004-04-11 12:03:57 +00:00
Kurt B. Kaiser cf6f1b69eb M EditorWindow.py
M IOBinding.py
M NEWS.txt
M configDialog.py

- If nulls somehow got into the strings in recent-files.lst
  EditorWindow.update_recent_files_list() was failing.  Python Bug 931336.
2004-04-11 03:16:07 +00:00
Skip Montanaro 249369c7f0 atof: correct parameter name 2004-04-10 16:39:32 +00:00
Skip Montanaro 5bfd98498a Refactor common code out of globaltrace_trackcallers() and
globaltrace_countfuncs() into file_module_function_of().

In that function use Michael Hudson's suggestion of gc.get_referrers() to
back up from the code object to a function, then to a class's dict and
finally to a class object if one exists.
2004-04-10 16:29:58 +00:00
Skip Montanaro cafc811415 Added --trackcalls command line arg to display crude caller/callee
relationships at program exit.  Output is a bit prettier than that for
--listfuncs but won't parse as easily using downstream postprocessing tools.
2004-04-07 15:46:05 +00:00
Andrew M. Kuchling 22ab06e4de Fix comment typo 2004-04-06 19:43:03 +00:00
Andrew M. Kuchling d9b38d2729 Remove specific Python version from #! 2004-04-06 19:42:34 +00:00
Andrew MacIntyre 69e18c9344 OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).

Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +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
Fred Drake 456d3258d6 Fix support for the "prog" keyword to the OptionParser constructor, as well
as directly setting the .prog attribute (which should be supported based on
the class docstring).
Closes SF bug #850964.
2004-04-01 07:40:35 +00:00
Andrew M. Kuchling b67c94318e [Bugfix candidate] Escape traceback type and value. There are probably additional cases where cgitb.py doesn't escape as paranoidly as it should (e.g. attribute names) 2004-03-31 20:17:56 +00:00
Guido van Rossum 59db96f2a3 When /tmp has certain sticky bits set, newly created subdirectories
inherit those bits, causing the test_mkdtemp.test_mode() test to fail.
Remove those before comparing the actual mode to the expected mode.
2004-03-31 18:53:29 +00:00
Tim Peters 116d83ce71 SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result.

Bugfix candidate!
2004-03-28 02:20:45 +00:00
Raymond Hettinger d732c95eb0 Revert 1.51 booleans so that sre will still run on old pythons. 2004-03-27 09:24:36 +00:00
Raymond Hettinger 968c56a626 Simple Optimizations:
* Factor constant expressions out of loops.
* Presize a list being grown to a known length.
2004-03-26 23:24:00 +00:00
Raymond Hettinger 29e383754e Remove unnecessary test. (Thanks Skip) 2004-03-26 20:16:39 +00:00
David Ascher 1c5701d36c Fix test failure for test_tcl on OS/X and Windows if a
version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).

I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.

Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
2004-03-26 15:10:25 +00:00
Armin Rigo 01ab279056 Marshal clean-up (SF patch #873224) 2004-03-26 15:09:27 +00:00
Raymond Hettinger 01c9f8c35f Simple optimizations:
* pre-build a single identity function for the fixup function
* pre-build membership tests in dictionaries instead of in-line tuples
* assign len() to a local variable
* assign append() methods to a local variable
* use xrange() instead of range()
* replace "x<<1" with "x+x"
2004-03-26 11:16:55 +00:00
Fred Drake 4b49823edd make sure the default manifest generation includes files identified as
scripts
closes SF bug 796042
2004-03-25 22:04:52 +00:00
Marc-André Lemburg 91e83e209d Added more Windows version names (thanks to Thomas Heller).
Fixed bug in platform() cache (thanks to Brett Cannon).

(Restored Python 1.5.2 compatibility.)
2004-03-25 18:35:12 +00:00
Brett Cannon 9001cde559 Fix last patch to be backwards-compatible with Python 1.5.2 .
Bumped version micro number.
2004-03-25 18:32:11 +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
Martin v. Löwis 1c0f1f97fb Defer compilation of regular expressions until first use. 2004-03-25 14:58:19 +00:00
Martin v. Löwis bc503d1e90 Use True/False instead of 0/1 for character classes. 2004-03-25 13:50:59 +00:00
Phillip J. Eby 91a968af76 Ensure super() lookup of descriptor from classmethod works (SF #743627) 2004-03-25 02:19:34 +00:00
Piers Lauder f167dc3380 fix name in setacl method doc string 2004-03-25 00:12:21 +00:00
Nicholas Bastin c69ebe8d50 Enable the profiling of C functions (builtins and extensions) 2004-03-24 21:57:10 +00:00
Martin v. Löwis a1dde13389 Add test case for unicode(somestring, "idna"). 2004-03-24 16:48:24 +00:00
Brett Cannon aaeffaf01e Replace sequential split/join calls on strings with a single replace call.
Thanks Andrew Gaul.
2004-03-23 23:50:17 +00:00
Martin v. Löwis 708b4dacf4 Convert input to a string object. Fixes #909230.
Backported 2.3.
2004-03-23 23:40:36 +00:00
Brett Cannon 69200fa85b Replace code in urllib for basejoin (undocumented) with urlparse.urljoin .
Test suites for urllib and urlparse run with each other's function to verify
correctness of replacement and both test suites pass.

Bumped urllib's __version__ attribute up a minor number.
2004-03-23 21:26:39 +00:00
Guido van Rossum 48713e8798 Add runctx to __all__. 2004-03-23 19:19:21 +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
Anthony Baxter 05f842bae2 Basic dependency checking. setup() has two new optional arguments
requires and provides. requires is a sequence of strings, of the
form 'packagename-version'. The dependency checking so far merely
does an '__import__(packagename)' and checks for packagename.__version__
You can also leave off the version, and any version of the package
will be installed.
There's a special case for the package 'python' - sys.version_info
is used, so
requires= ( 'python-2.3', )
just works.

Provides is of the same format as requires - but if it's not supplied,
a provides is generated by adding the version to each entry in packages,
or modules if packages isn't there.
Provides is currently only used in the PKG-INFO file. Shortly, PyPI
will grow the ability to accept these lines, and register will be
updated to send them.

There's a new command 'checkdep' command that runs these checks.
For this version, only greater-than-or-equal checking is done. We'll
add the ability to specify an optional operator later.
2004-03-22 22:22:05 +00:00
Martin v. Löwis a3837a0d63 Patch #911176: Move test function into __main__ 2004-03-22 21:49:47 +00:00
Nicholas Bastin 1eb4bfc657 Added global runctx function to profile to fix SF Bug #716587 2004-03-22 20:12:56 +00:00
Armin Rigo 706933821c The fix in ceval.c 2.386 allows iteration-by-iteration line tracing even in
single-line loops.
2004-03-22 19:30:39 +00:00
Nicholas Bastin ee6c9b8613 Fix (really) for tight loop line events 2004-03-22 19:23:46 +00:00
Nicholas Bastin fa7bec7e83 Test for tight loop line event fix, SF bug #765624 2004-03-22 19:21:47 +00:00
Nicholas Bastin aea9459cb1 Test for lack of implicit return line event 2004-03-22 18:30:42 +00:00