Commit Graph

27324 Commits

Author SHA1 Message Date
Gustavo Niemeyer 572f5233f0 Applying patch #728656, by logistix, fixing opening of nonexistent
bz2 files. Also, included a testcase for this problem.
2003-04-29 14:53:08 +00:00
Guido van Rossum a649e9cb7a Remove file that was moved to ../Include 2003-04-29 14:14:58 +00:00
Fred Drake c95628e3f2 - clean up some extra punctuation hidden in indexing markup
- fix a typo and one markup nit
- normalize whitespace
2003-04-29 13:56:40 +00:00
Fred Drake 83c19ee06b Clarify that the timeout argument to read_until() is in seconds. 2003-04-29 13:39:05 +00:00
Guido van Rossum a3c253e83b Removing new files accidentally checked in on the trunk rather than on the
idlefork-merge-branch.
2003-04-29 11:27:16 +00:00
Guido van Rossum 767d9fedc7 Add back files that were accidentally deleted on the trunk rather than
on the idlefork-merge-branch as intended.
2003-04-29 11:15:38 +00:00
Guido van Rossum 57cd21fde2 Checking in IDLEFORK exactly as it appears in the idlefork CVS.
On a branch, for now.
2003-04-29 10:23:27 +00:00
Brett Cannon 19691360c7 Added tests for urlretrieve. Also made sure urlopen tests cleaned up properly after themselves. 2003-04-29 05:08:06 +00:00
Raymond Hettinger 6e887bb05f SF bug #729096: getopt online documentation example improvement
A newbie found it difficult to translate the exampe into a
case that used only short options or long options but not both.
He tried to shorten the tuple search but forgot the trailing comma,
The appropriate pattern is an equality check.

Revised the example to point him in the right direction.

Backport candidate.
2003-04-29 04:35:36 +00:00
Brett Cannon a2f8737faf Add comment that urlopen opens local files without universal newlines 2003-04-29 04:11:12 +00:00
Tim Peters a1af767c4d Reworded fabs() for consistency with the others. Noted that all
return values are floats.
2003-04-28 21:32:03 +00:00
Brett Cannon 2b6dfec1cc Raise a ValueError when there is data that was not covered in the format string. Done to match behavior of pre-existing C-based strptime implementations. 2003-04-28 21:30:13 +00:00
Tim Peters a390c6e194 walk() docs: Emphasize that the recursive-delete example is dangerous. 2003-04-28 19:15:10 +00:00
Tim Peters 5501b5e3d7 SF bug 728097: tmpnam problems on windows 2.3b, breaks test.test_os.
tmpnam() appears essentially useless on Windows, and it finally broke
the test for Irmen de Jong.  Read the long new comment in test_tmpnam()
for details.  Since the MS implementation is insane, it might be good
if we supplied a different implementation.

Bugfix candidate.
2003-04-28 03:13:03 +00:00
Tim Peters bf89b3a1f7 walk() docs: Worked "walking" into the description and the text. Added
a brief example where bottom-up walking is essential.
2003-04-28 02:09:43 +00:00
Brett Cannon 4aebbb0449 Make tests clean up after themselves better. This means:
* call tearDown when Setup is called
* shutil.rmtree the root of the created directory instead of just the leaf
  directory
* set the LANGUAGE environment variable to what it was originally and not
  assume 'en'.
2003-04-27 19:42:41 +00:00
Gustavo Niemeyer caf1c9dfe7 - Included detailed documentation in _sre.c explaining how, when, and why
to use LASTMARK_SAVE()/LASTMARK_RESTORE(), based on the discussion
  in patch #712900.

- Cleaned up LASTMARK_SAVE()/LASTMARK_RESTORE() usage, based on the
  established rules.

- Moved the upper part of the just commited patch (relative to bug #725106)
  to outside the for() loop of BRANCH OP. There's no need to mark_save()
  in every loop iteration.
2003-04-27 14:42:54 +00:00
Gustavo Niemeyer 3646ab98af Fix for part of the problem mentioned in #725149 by Greg Chapman.
This problem is related to a wrong behavior from mark_save/restore(),
which don't restore the mark_stack_base before restoring the marks.
Greg's suggestion was to change the asserts, which happen to be
the only recursive ops that can continue the loop, but the problem would
happen to any operation with the same behavior. So, rather than
hardcoding this into asserts, I have changed mark_save/restore() to
always restore the stackbase before restoring the marks.

Both solutions should fix these two cases, presented by Greg:

>>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups()
('b', None)
>>> re.match('(a)((?!(b)*))*', 'abb').groups()
('b', None, None)

The rest of the bug and patch in #725149 must be discussed further.
2003-04-27 13:25:21 +00:00
Gustavo Niemeyer c34f2555bd Applied patch #725106, by Greg Chapman, fixing capturing groups
within repeats of alternatives. The only change to the original
patch was to convert the tests to the new test_re.py file.

This patch fixes cases like:

>>> re.match('((a)|b)*', 'abc').groups()
('b', '')

Which is wrong (it's impossible to match the empty string),
and incompatible with other regex systems, like the following
examples show:

% perl -e '"abc" =~ /^((a)|b)*/; print "$1 $2\n";'
b a

% echo "abc" | sed -r -e "s/^((a)|b)*/\1 \2|/"
b a|c
2003-04-27 12:34:14 +00:00
Raymond Hettinger 9dcbbea878 Factor out common boilerplate for test_support 2003-04-27 07:54:23 +00:00
Gustavo Niemeyer c23fb77477 Applying patch #726869 by Andrew I MacIntyre, reducing in _sre.c the
recursion limit for certain setups of FreeBSD and OS/2.
2003-04-27 06:58:54 +00:00
Gustavo Niemeyer 7628f1ffff Applying patch by Neal Norwitz:
[#727759] get bzip2 to build on Solaris 8 (old bzip library)
2003-04-27 06:25:24 +00:00
Tim Peters 965697fc4b Clarified new text about math exceptions.
Bugfix candidate.
2003-04-26 15:11:08 +00:00
Tim Peters 4931130f12 A start on news for 2.3b2. 2003-04-26 14:53:01 +00:00
Tim Peters 579bed7300 Rewrote. As reported on c.l.py, when the test suite is run via
"import test.autotest", temp_imp failed because the import lock was
still held at the test's end (the test assumed it wouldn't be), and
then a RuntimeError got raised at the end of the entire suite run because
test_imp cleared the import lock as a side effect of trying to test that
the import lock wasn't held (but a legitimate import is in progress,
so the lock should be held, and the import machinery complained when it
found that the lock was unexpectedly cleareed).

Also removed the unittest scaffolding.  It didn't buy anything here, and
the test was raising regrtest's TestFailed instead of using the unittest
failure-reporting mechanisms.
2003-04-26 14:31:24 +00:00
Skip Montanaro 5118341530 Add note about platform-specific behavior arising from discussion on bug
711019.
2003-04-26 02:59:00 +00:00
Tim Peters 8b7beb631b Use os.walk() to find files to delete. 2003-04-26 00:53:24 +00:00
Fred Drake 2f36b3e205 Version updates for Python 2.3. 2003-04-26 00:52:30 +00:00
Guido van Rossum ecf0f02518 Merge back from r23b1-branch 2003-04-26 00:21:31 +00:00
Guido van Rossum fa1eddfb21 Update version number and release date. 2003-04-25 19:19:52 +00:00
Guido van Rossum c2f77dddf3 New feature: when saving a file, keep the eol convention of the
original.  New files are written using the eol convention of the
platform, given by os.linesep.  All files are read and written in
binary mode.
2003-04-25 18:36:31 +00:00
Fred Drake 9635268ea9 organizational and markup cleansing 2003-04-25 18:02:34 +00:00
Kurt B. Kaiser 9a90e70b32 Update for release into Python
NEWS.txt idlever.py
2003-04-25 17:48:08 +00:00
Fred Drake c440af5495 Updated information on package metadata to reflect recent additions.
This is a modified form of SF patch #718027 (mostly markup changes).
2003-04-25 16:43:28 +00:00
Kurt B. Kaiser 40f19e3fd5 Update for 2.3b1
Modified Files:
	NEWS.txt CREDITS.txt INSTALL.txt setup.cfg
2003-04-25 16:37:31 +00:00
Fred Drake d198f38505 - add availability statements for some of the new APIs
- lots of general cleanup
2003-04-25 16:16:02 +00:00
Skip Montanaro 5ba0054e69 final bit of tests converted from test_sre 2003-04-25 16:00:14 +00:00
Skip Montanaro 9593792da3 test_sre is dead! long live test_re! 2003-04-25 15:59:12 +00:00
Skip Montanaro 35b9ff3683 deleted more tests which were either already in test_re or that I migrated
in the last revison
2003-04-25 15:41:19 +00:00
Skip Montanaro 1e703c6278 more tests converted from test_sre 2003-04-25 15:40:28 +00:00
Fred Drake 53e5b71bbc Add modified versions of the examples from Sean Reifschneider
(SF patch #545480).
2003-04-25 15:27:33 +00:00
Guido van Rossum b016752d8b Fix a copy-paste error: the paragraph about inet_ntop's use was copied
literally from inet_pton.
2003-04-25 15:26:58 +00:00
Skip Montanaro bf7ad96d36 Remove tests which were migrated to test_re.py. There are still more tests
to migrate.
2003-04-25 15:17:03 +00:00
Skip Montanaro 5d0136e297 reflect csv's change back to a module. Document the new sniffer api. 2003-04-25 15:14:49 +00:00
Fred Drake 9f48045ec0 Use a simpler \note instead of a "See also" section to refer to the
os.walk() generator.
2003-04-25 15:12:47 +00:00
Guido van Rossum f4001eed3b Skip testing inet_ntop() an inet_pton() if they aren't defined.
This makes the test pass on Windows again (and on other platforms
that don't have these).
2003-04-25 15:11:23 +00:00
Guido van Rossum 51735b0569 Fix the tests on Windows, by writing the test data file in binary
mode.

XXX I'm not convinced that this is the right solution -- arguably,
on Windows, the _fileobject class should honor the mode argument
and do newline translation.  But it's never done that so I think
there's no urgent need to fix this today.
2003-04-25 15:01:05 +00:00
Neal Norwitz 6eb502f267 Add versionadded for has_ipv6 attribute 2003-04-25 14:53:48 +00:00
Neal Norwitz cabf56f8b4 Fix markup 2003-04-25 14:52:41 +00:00
Fred Drake 2194a4eede markup adjustments 2003-04-25 14:50:06 +00:00