Commit Graph

3247 Commits

Author SHA1 Message Date
Greg Ward 0f341855ac Renamed 'select_pattern()' to 'include_pattern()'.
Other cosmetic/doc/comment tweaks.
2000-07-30 00:36:25 +00:00
Greg Ward 7b3d56c85c Renamed 'process_line()' to 'process_template_line()', and factored out
'_parse_template_line()'.
2000-07-30 00:21:36 +00:00
Greg Ward c98927a059 Added class docstring and ditched inappropriate class attrs.
Indentation/whitspace fixes.
2000-07-30 00:08:13 +00:00
Greg Ward adc1172064 Provides the FileList class for building a list of filenames by exploring
the filesystem, and filtering the list by applying various patterns.

Initial revision (almost) as supplied in a patch by Rene Liebscher; I
just renamed the class from Template to FileList, and the module
accordingly.
2000-07-30 00:04:17 +00:00
Andrew M. Kuchling 85ab7384f6 Exercise .readline() and .readlines(). More data is written to the
test file, too, so the methods have more work to do.
2000-07-29 20:18:34 +00:00
Andrew M. Kuchling 41616ee194 SF patch #100740: Add optional size arguments to .readline() and
.readlines() methods.  Inspired by a patch from Wolfgang Grafen,
though this version of the patch was completely rewritten from his
code.
2000-07-29 20:15:26 +00:00
Moshe Zadka 7a4409c1b2 Added support to recognize Python's internal "dumbdbm" database.
This closes bug 200 on Jitterbug.
2000-07-29 05:31:40 +00:00
Moshe Zadka 37c03ff3a9 Using shutil's function to copy data between file objects instead
of rolling our own.

Note:
This is my first sourceforge checkin. If you see anything funny about
this patch, please let me know.
2000-07-29 05:15:56 +00:00
Mark Hammond 152e3f0885 Was quite broken and incomplete. Now passes the test suite, but is still incomplete. 2000-07-28 03:45:32 +00:00
Mark Hammond abfeff7f44 Fix a type in the docstrings, and make the module Unicode aware. 2000-07-28 03:42:40 +00:00
Trent Mick c64c8ea71c Remove erroneous empty trailing line. (cause test_winreg.py failure) 2000-07-27 23:26:28 +00:00
Fredrik Lundh 9407e553c0 -- changed test to work on platforms which have os.popen
but no os.fork
2000-07-27 07:42:43 +00:00
Greg Ward ae0965eb23 Bump version to 0.9.1pre. 2000-07-27 02:17:40 +00:00
Greg Ward 612eb9f58f Fixed a grab-bag of typos spotted by Rob Hooft. 2000-07-27 02:13:20 +00:00
Greg Ward aa5372caa7 Remove unused 'search_dir()' method.
Comment tweak.
2000-07-27 01:58:45 +00:00
Greg Ward 7499847c53 Fix to call 'library_filename()' instead of the non-existent
'shared_library_filename()'.
2000-07-27 01:23:19 +00:00
Greg Ward 53c1bc3f9b Typo fix from David Ascher. 2000-07-27 01:21:54 +00:00
Mark Hammond 4f570b9239 Patch #100873 - Use registry to find proxies for urllib on Win32
Note that this patch looks worse than it is - an existing function (getproxies() for all platforms other than Win/Mac) has been moved, renamed and indentation changed, but the body of that function is identical.  Windows now allows the environment variables to override the registry.
2000-07-26 07:04:38 +00:00
Peter Schneider-Kamp fdee0f0aa7 added test case for fixed duplicate arguments bug in Python/compile.c 2000-07-25 22:15:45 +00:00
Fred Drake 9f2550f581 makedirs(), removedirs(): If the tail of the path is empty, do a second
split so the logic does not fail in corner cases.

This closes bug #407.
2000-07-25 15:16:40 +00:00
Jeremy Hylton 0365180a74 a couple of nits from Patch #100933 2000-07-25 14:34:38 +00:00
Andrew M. Kuchling c1b4624447 Made an error message slightly more useful if select() returns something goofy 2000-07-25 00:51:31 +00:00
Fredrik Lundh 82c330e591 -- updated to include known problems in SRE 0.9.6
(cf. test/output/test_sre)
2000-07-24 22:35:11 +00:00
Fred Drake 1790dd4b66 Restore TestSkipped exception; appears to have disappeared in last checkin.
Make both TextFailed and TestSkipped subclasses of Error, which derives
from Exception.  Docstrings have been added for the exceptions and module.
2000-07-24 06:55:00 +00:00
Fredrik Lundh 8a3ebf8ca8 -- SRE 0.9.6 sync. this includes:
+ added "regs" attribute
 + fixed "pos" and "endpos" attributes
 + reset "lastindex" and "lastgroup" in scanner methods
 + removed (?P#id) syntax; the "lastindex" and "lastgroup"
   attributes are now always set
 + removed string module dependencies in sre_parse
 + better debugging support in sre_parse
 + various tweaks to build under 1.5.2
2000-07-23 21:46:17 +00:00
Paul Prescod 623511b7df Added a few docstrings 2000-07-21 22:05:49 +00:00
Paul Prescod 863d8b855f Added docstrings 2000-07-21 21:43:09 +00:00
Thomas Wouters ff4df6d6fb Small fixes by Petru Paler (patch #100946) checked in with esr's approval. 2000-07-21 05:19:59 +00:00
Skip Montanaro e9e5dcd4db restructured a bit and added some more content... 2000-07-19 17:19:49 +00:00
Skip Montanaro 4d06923122 make TestFailed a class exception 2000-07-19 17:14:48 +00:00
Skip Montanaro 018dfae246 added rewritten normpath from Moshe Zadka that does the right thing with
paths containing ..
2000-07-19 17:09:51 +00:00
Thomas Wouters baf2663e44 Enable extra testing now that os.isatty() is in. (Also tests os.isatty ;P) 2000-07-19 14:51:54 +00:00
Greg Stein dd6eefb348 no changes other than indentation level (now 4) and comment reflow.
use "cvs diff -b" to verify.
2000-07-18 09:09:48 +00:00
Skip Montanaro 1d3dd74574 * split on / or \
* case insensitive comparison
2000-07-17 03:06:58 +00:00
Skip Montanaro 802bc5d9b3 damn! cut-n-paste from ntpath forgot the "import re" 2000-07-17 03:06:26 +00:00
Skip Montanaro 6222c05af6 * split on / or \
* case insensitive
2000-07-17 03:04:19 +00:00
Paul Prescod d61591813c At GVR's request. 2000-07-16 23:00:10 +00:00
Paul Prescod 9eab78994e Online help facility for the Python interprter and other interactive
environments.
2000-07-16 19:53:00 +00:00
Skip Montanaro a924bb1ad2 split and join on "/" in commonprefix 2000-07-16 16:52:45 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Thomas Wouters c533e4a012 Bugfix by Rob W. W. Hooft, from his spelling fixes patch. This one is a
genuine bug, so I checked it in separately.
2000-07-16 11:57:20 +00:00
Fredrik Lundh 3fded4bb29 -- fixed the comment, too 2000-07-15 20:58:44 +00:00
Fredrik Lundh efd7b001d6 -- note to self: wait until 'cvs commit' has finished before
you edit the file.
2000-07-15 20:50:27 +00:00
Fredrik Lundh 47ac12662a -- changed default encoding to "ascii". you can still change
the default via site.py...
2000-07-15 20:45:23 +00:00
Vladimir Marangozov 5ff2ac2fa9 Break a cycle created in the saboteur() function. 2000-07-15 00:42:09 +00:00
Eric S. Raymond 649685ad9b ConfigParser enhancements to edit existing configs, part 2 2000-07-14 14:28:22 +00:00
Andrew M. Kuchling 23adc9f37b Typo fix from Bastian Kleineidam 2000-07-14 13:35:07 +00:00
Vladimir Marangozov d57f5cff0e Break the cycles after testing cmp() on cyclic objects. 2000-07-14 04:32:09 +00:00
Eric S. Raymond 5e70cfe22f Apply Greg Kochanski's fix for open/265. 2000-07-13 13:25:07 +00:00
Eric S. Raymond dfbd4c7695 Fix bug open/243 reported by Dimitri Papadopoulos 2000-07-13 13:12:21 +00:00
Skip Montanaro 4d5d5bf5ae forgot to change copy.copy(m) to m[:] 2000-07-13 01:01:03 +00:00
Skip Montanaro 97bc98aea7 fixed semantics of commonprefix to work by path elements instead of
characters.
2000-07-12 16:55:57 +00:00
Greg Stein 42bb8b3987 apply patch #100868 from Moshe Zadka:
refactor the copying of file data. new: shutil.copyfileobj(fsrc, fdst)
2000-07-12 09:55:30 +00:00
Andrew M. Kuchling 38f744195f Remove extra argument to method call 2000-07-12 03:38:34 +00:00
Skip Montanaro 56509a3cb8 new test for posixpath module 2000-07-12 00:20:45 +00:00
Skip Montanaro e809b00f36 new test file for posixpath module 2000-07-12 00:20:08 +00:00
Jeremy Hylton 88887aa38e small updates to string_join:
use PyString_AS_STRING macro on local string object
    when resizing string, make sure resized string will always be big enough
    split string containing error message across two lines
add test to string_tests that causes resizing
2000-07-11 20:55:38 +00:00
Fred Drake 85f363990c Create two new exceptions: IndentationError and TabError. These are
used for indentation related errors.  This patch includes Ping's
improvements for indentation-related error messages.

Closes SourceForge patches #100734 and #100856.
2000-07-11 17:53:00 +00:00
Jeremy Hylton fff9e20943 fix bug #42 reported by Andrew Dalke
The Compare close contains a close method that checks to see if there
is any unconsumed data in the Compare instance; i.e. if the canonical
output file contains more data than was produced by the current test
run. This method was never called, allowing differences to go
undetected.

Fix is to call close after the test is run (after __import__)

output/test_long and output/test_popen2 needed trivial changes
output/test_select contained lots of text, but test_select.py produced
    no output
2000-07-11 15:15:31 +00:00
Eric S. Raymond 5f1b27084a Bug fix: ? and ! were not full aliases for `help' and `shell' as implied in
the documentation; the cases `? foo' and `! foo' failed.
2000-07-11 13:03:55 +00:00
Peter Schneider-Kamp 7a11671e8b fixed inconsistent use of tab and spaces 2000-07-11 11:24:41 +00:00
Andrew M. Kuchling d3cf692c38 Add test of resize() method of mmap objects 2000-07-11 10:45:28 +00:00
Andrew M. Kuchling e0d0090e76 Docstring changes. 2000-07-11 10:38:24 +00:00
Jeremy Hylton 20f41b6456 add more tests of string.join variants to run_method_tests 2000-07-11 03:31:55 +00:00
Fredrik Lundh 663809ed83 -- removed get_default compatibility kludge
-- added a few extra comments to locale.py
2000-07-10 19:32:19 +00:00
Eric S. Raymond 417c489def Give ConfigParser the capability to set as well as read options, and to write
a representation of the configuration state in .ini format that can be read
back in by a future read() call.  Thus this class is now a back end
for .ini editors as well as parsers.

This patch is complete and tested, but exposes a bug in the ConfigParser
implementation which I have not yet fixed.  Because case information is
discarded during parsing, the output of write() has its case smashed.

I wrote this for a SourceForge interface script called forgetool.
Documentation for the new entry points included.
2000-07-10 18:11:00 +00:00
Jeremy Hylton f82b04ecbb factor out test definitions to string_tests module
test_string and test_userstring run same tests for string methods
2000-07-10 17:08:42 +00:00
Jeremy Hylton fd54757336 add isalpha and isalnum methods 2000-07-10 17:07:17 +00:00
Guido van Rossum 1bbddd085c Added the line 'Testing UTF-16 code point order comparisons... done."
to match addition to test_unicode.py.
2000-07-10 15:06:06 +00:00
Jeremy Hylton fb8849c4a5 remove prints of file objects from _test 2000-07-10 14:28:25 +00:00
Jeremy Hylton a5ae490584 expect message "no regression test case for method 'encode' 2000-07-10 14:14:40 +00:00
Andrew M. Kuchling a48dbde93b Patch from Joe Eaton <jeaton@hostway.net> (SF#100741) to fix following problem:
There is a silly bug in the fall-back dumbdbm.py database package in
  the Python 1.5.2 standard distro. This bug causes any changes to an
  existing item to generate a new key, even when the key already
  exists.  After many updates, the .dir file used by dumbdbm grows to
  a huge size, and can cause filesystem problems.
2000-07-10 13:56:35 +00:00
Sjoerd Mullender f985064781 Better error handling of bad entity references. Before when an & in
an attribute value was not escaped, you could get two syntax errors:
one about a missing semicolon and one about an unknown entity.  Now
you get only one about a bogus ampersand.
2000-07-10 08:09:48 +00:00
Fredrik Lundh 9ac81f69b2 - changed the nt.popen2 return values back to
(write, read, ...), based on feedback from GvR.

- added tuple-swapping code to popen2.py

- fixed some runaway indentation in posixmodule.c
2000-07-09 23:35:24 +00:00
Fredrik Lundh 0466132ee4 - repaired locale.py for non-windows platforms. the try/except
checked for the wrong exception.  my fault.  sorry.
  (first reported by Alex Coventry)
2000-07-09 23:16:10 +00:00
Barry Warsaw a1ae88432d Use TQSQ (triple quoted single quote) module docstring for better
font-locking.  This complets the merge with Mailman's version.
2000-07-09 21:24:31 +00:00
Fredrik Lundh bb7eeff44a - added popen.popen2/popen3/popen4 support for
windows.

- added optional mode argument to popen2/popen3
  for unix; if the second argument is an integer,
  it's assumed to be the buffer size.

- changed nt.popen2/popen3/popen4 return values
  to match the popen2 module (stdout first, not
  stdin).
2000-07-09 17:59:32 +00:00
Fredrik Lundh 6c86b99dc1 - merged setlocale and set_locale. the internal setlocale
function is overridden by a python version which accepts
  *either* a string (old behaviour) or a locale tuple.

- renamed a few methods (for consistency):

        get_locale => getlocale
        get_default_locale => getdefaultlocale
        set_to_default => resetlocale (!)

- the _locale implementation module can now implement
  an optional _getdefaultlocale function.  if that function
  isn't available, a POSIX-based approach is used (checking
  LANG and other environment variables, as usual).

(patch #100765)
2000-07-09 17:12:58 +00:00
Fred Drake c70b4483d2 New module to control Web browsers; see the documentation for
more information.
2000-07-09 16:45:56 +00:00
Fred Drake dbbf76bd5a Make tabnanny happy.
mailbox.py: Convert to 4-space indents.
2000-07-09 16:44:26 +00:00
Guido van Rossum 74b2677593 delete bogus file 2000-07-07 21:57:20 +00:00
Guido van Rossum 480fa7319d Deleted bogus file. 2000-07-07 21:35:04 +00:00
Jeremy Hylton 2ea17faf4b fix inconsistent use of tabs and spaces
convert semicolons to newlines
2000-07-07 21:02:22 +00:00
Jeremy Hylton 04f39aa859 fix inconsistent use of tabs and spaces 2000-07-07 21:02:00 +00:00
Jeremy Hylton 65d6edb478 fix inconsistent use of tabs and spaces 2000-07-07 20:45:21 +00:00
Marc-André Lemburg d6d06ade26 Tests for new surrogate support in the UTF-8 codec. By Bill Tutt. 2000-07-07 17:48:52 +00:00
Marc-André Lemburg b6d78fcd9c Tests for new instance support in unicode(). 2000-07-07 13:46:19 +00:00
Guido van Rossum 0a3f7978c4 Change whitespace in two places to silence tabnanny.
Also fix spelling tupel -> tuple.
2000-07-06 05:34:14 +00:00
Skip Montanaro f9059ebede fixed indentation in several places 2000-07-06 03:01:40 +00:00
Skip Montanaro 26a7983f08 fix indentation in one docstring 2000-07-06 02:56:36 +00:00
Skip Montanaro a2dccfbc09 fix indentation in three docstrings 2000-07-06 02:55:41 +00:00
Fredrik Lundh 2855290b84 maintenance release:
- reorganized some code to get rid of -Wall and -W4
  warnings

- fixed default argument handling for sub/subn/split
  methods (reported by Peter Schneider-Kamp).
2000-07-05 21:14:16 +00:00
Marc-André Lemburg 9d4674168f Added tests for the new .isalpha() and .isalnum() methods. 2000-07-05 09:46:40 +00:00
Greg Ward fd9f168bcf Fixed so the ZIP file (which is bundled into an executable) goes in the
temporary directory ('bdist_base').
Added --dist-dir option to control where the executable is put.
2000-07-05 03:08:55 +00:00
Greg Ward c4eb84accb Added --dist-dir option to control where output archive(s) go. 2000-07-05 03:07:37 +00:00
Greg Ward 040dc0b691 Added the --dist-dir option that the "bdist_*" will use to control where
they place their output files.
2000-07-05 03:07:18 +00:00
Greg Ward c0614105aa Added the --dist-dir option to control where the archive(s) are put;
defaults to 'dist' (ie. no longer in the distribution root).
2000-07-05 03:06:46 +00:00
Sjoerd Mullender 5baaf66525 2 fixes plus one extension:
- Actually count the linefeeds in a the CDATA content.
- Don't call the endtag handler for an unmatched endtag (this makes
  the base class simpler since it doesn't have to deal with unopened
  endtags).
- If the __init__ method is called with keyword argument
  translate_attribute_references=0, don't attempt to translate
  character and entity references in attribute values.
2000-07-04 14:53:12 +00:00
Paul Prescod 6c4753f925 Used original SAX handling form. 2000-07-04 03:39:33 +00:00
Paul Prescod 99b84bdaad Removed some tabs. 2000-07-04 03:38:10 +00:00
Fredrik Lundh 72b82ba16d - fixed grouping error bug
- changed "group" operator to "groupref"
2000-07-03 21:31:48 +00:00
Fredrik Lundh 6f01398236 - added lookbehind support (?<=pattern), (?<!pattern).
the pattern must have a fixed width.

- got rid of array-module dependencies; the match pro-
  gram is now stored inside the pattern object, rather
  than in an extra string buffer.

- cleaned up a various of potential leaks, api abuses,
  and other minors in the engine module.

- use mal's new isalnum macro, rather than my own work-
  around.

- untabified test_sre.py.  seems like I removed a couple
  of trailing spaces in the process...
2000-07-03 18:44:21 +00:00
Fred Drake 17647f5201 Compute the name of the test file so that it can be found both when this
test is run as a script and when imported via the regression test
framework.

Problem reported by Phillip Porch <root@theporch.com>.
2000-07-03 16:37:42 +00:00
Fred Drake 0ea1fc8acf Fix bug #379, reported by Phillip Porch <root@theproch.com>:
openpty():  Fallback code when os.openpty() does not exist attempted to
            call _slave_open(), which should have been slave_open().

This bug only showed on platforms which do not provide a working openpty()
in the C library.
2000-07-03 13:44:25 +00:00
Fred Drake 52dc76c81f Eric S. Raymond <esr@thyrsus.com>:
This patch implements relative-path semantics for the "source" facility resembling
those of cpp(1), documents the change, and improves the shlex test main to
make it easier to test this feature.  Along the way, it fixes a name error
in the existing docs.

[Additional documentation markup changes for consistency by FLD.]
2000-07-03 09:56:23 +00:00
Fred Drake 2b0d98bc7f cmpfiles(): Added shallow and use_statcache parameters, with same meanings
and defaults as for filecmp.cmp().  Updated docstring
             accordingly, and formatted it more like others in the standard
             library.
2000-07-03 08:18:47 +00:00
Fred Drake 046d27215f Martin von Löwis <martin@loewis.home.cs.tu-berlin.de>:
This patch delegates more string functions to string object methods,
uses the varargs delegation syntax, and stops using stringold.

Closes SourceForge patch #100712.
2000-07-03 07:23:13 +00:00
Fredrik Lundh 019bcb598d - changed sre.Scanner to use lastindex instead of index. 2000-07-02 22:59:57 +00:00
Fredrik Lundh c2301730b8 - experimental: added two new attributes to the match object:
"lastgroup" is the name of the last matched capturing group,
  "lastindex" is the index of the same group.  if no group was
  matched, both attributes are set to None.

  the (?P#) feature will be removed in the next relase.
2000-07-02 22:25:39 +00:00
Fredrik Lundh 7cafe4d7e4 - actually enabled charset anchors in the engine (still not
used by the code generator)

- changed max repeat value in engine (to match earlier array fix)

- added experimental "which part matched?" mechanism to sre; see
  http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954
  or python-dev for details.
2000-07-02 17:33:27 +00:00
Fred Drake b19948b7fb Typo (mine): Garsholm --> Garshol
Noted by Rob Hooft <rob@hooft.net>.
2000-07-02 13:52:21 +00:00
Fredrik Lundh 3562f11764 -- use charset bitmaps where appropriate. this gives a 5-10%
speedup for some tests, including the python tokenizer.

-- added support for an optional charset anchor to the engine
   (currently unused by the code generator).

-- removed workaround for array module bug.
2000-07-02 12:00:07 +00:00
Fredrik Lundh c13222cdff - fixed "{ in any other context" bug
- minor comment touchups in the C module
2000-07-01 23:49:14 +00:00
Fred Drake 0cebe439ce test(): Removed; regression test is in test.test_winreg2, not testreg. 2000-07-01 20:57:03 +00:00
Paul Prescod 1e68827c8f Misc fixes and improvements. 2000-07-01 19:21:47 +00:00
Paul Prescod bd8c2ae758 Removed unncessary dependency. 2000-07-01 19:19:32 +00:00
Paul Prescod ebc0473c05 Fixed test output 2000-07-01 19:17:43 +00:00
Fredrik Lundh 22d2546520 today's SRE update:
-- changed 1.6 to 2.0 in the file headers

-- fixed ISALNUM macro for the unicode locale.  this
   solution isn't perfect, but the best I can do with
   Python's current unicode database.
2000-07-01 17:50:59 +00:00
Paul Prescod 7993bcc040 Added minidom tests. 2000-07-01 14:54:16 +00:00
Paul Prescod b58e6b10b6 Tightened xml.sax.__init__.py 2000-07-01 13:44:04 +00:00
Guido van Rossum 46d565111e getatime() returned the mtime instead of the atime.
Similar to an old bug in ntpath.py.
2000-07-01 10:52:49 +00:00
Fred Drake 9e94afd18d Fix bug #314, reported by Craig Allen <cba@mediaone.net>:
splittype():  Always lower-case the URL scheme; these are supposed to be
               normalized according to RFC 1738 anyway.
2000-07-01 07:03:30 +00:00
Fred Drake 162bd855a6 Fix bug #345 reported by David Bolen <db3l@fitlinxx.com>:
getatime() returned the mtime instead of the atime.
Similar to an old bug in posixpath.py.
2000-07-01 06:36:51 +00:00
Paul Prescod 73678dac48 Reference cycle fixes 2000-07-01 04:58:47 +00:00
Guido van Rossum c08cb04c29 the usual 2000-07-01 04:23:47 +00:00
Guido van Rossum 54610f31cc output for openpty test 2000-07-01 03:34:14 +00:00
Guido van Rossum a0f7e8574c Thomas Wouters: Test script for openpty() 2000-07-01 01:13:31 +00:00
Fred Drake 4c136eefab Thomas Wouters <thomas@xs4all.net>:
Test case for the pty module.
2000-06-30 23:22:35 +00:00
Fredrik Lundh 55a4f4a528 - fixed code generation error in multiline mode
- fixed parser flag propagation (of all stupid bugs...)
2000-06-30 22:37:31 +00:00
Fredrik Lundh ef7bae6b2f replaced <some suitable mail address> with something slightly
more suitable.
2000-06-30 22:01:36 +00:00
Fred Drake b6e54adb1a Ooops! I didn't finish all the renaming needed here, so this was
attempting a recursive import and causing a fatal error.
2000-06-30 20:31:39 +00:00
Fred Drake 96fee02917 Output for test_winreg2.
Someone who knows what they are doing needs to replace this with something
that makes sense -- I'm not running Windows right now.
2000-06-30 19:38:16 +00:00
Greg Ward 1b5ec76190 Simplify the registry-module-finding code: _winreg or win32api/win32con.
This'll work fine with 2.0 or 1.5.2, but is less than ideal for
1.6a1/a2.  But the code to accomodate 1.6a1/a2 was released with
Distutils 0.9, so it can go away now.
2000-06-30 19:37:59 +00:00
Fred Drake 2658d15d45 Paul Prescod <paul@prescod.net>:
Regression test for the new winreg.py module.

[Could a Windows person someone please review this?]
2000-06-30 19:36:23 +00:00
Fred Drake 0412e494b8 Line-wrap and properly indent a couple of docstrings. 2000-06-30 19:33:35 +00:00
Fredrik Lundh 4ccea94152 - reverted to "\x is binary byte"
- removed evil tabs from sre_parse and sre_compile
2000-06-30 18:39:20 +00:00
Skip Montanaro ab1c7918f6 * added a randomize flag and corresponding -r command line argument that
allows the caller to execute the various tests in pseudo-random order -
  default is still to execute tests in the order returned by findtests().

* moved initialization of the various flag variables to the main() function
  definition, making it possible to execute regrtest.main() interactively
  and still override default behavior.
2000-06-30 16:39:27 +00:00
Guido van Rossum 2850d18615 Switch to sre for regular expression matching (the new mini-re module
is actually by Fredrik Lundh).  This will break the re tests --
Fredrik will fix this before the final release.
2000-06-30 16:25:20 +00:00
Guido van Rossum 4358b2c928 the usual 2000-06-30 16:13:37 +00:00
Jeremy Hylton 094c9e587c remove all prints (since the prints where of memory locations) 2000-06-30 15:13:15 +00:00
Fredrik Lundh 0640e1161f the mad patcher strikes again:
-- added pickling support (only works if sre is imported)

-- fixed wordsize problems in engine
   (instead of casting literals down to the character size,
   cast characters up to the literal size (same as the code
   word size).  this prevents false hits when you're matching
   a unicode pattern against an 8-bit string. (unfortunately,
   this broke another test, but I think the test should be
   changed in this case; more on that on python-dev)

-- added sre.purge function
   (unofficial, clears the cache)
2000-06-30 13:55:15 +00:00
Fredrik Lundh 43b3b49b5a - fixed lookahead assertions (#10, #11, #12)
- untabified sre_constants.py
2000-06-30 10:41:31 +00:00
Marc-André Lemburg 587794b386 Marc-Andre Lemburg <mal@lemburg.com>:
Added test output.
2000-06-30 10:28:32 +00:00
Marc-André Lemburg d70141a2d9 Marc-Andre Lemburg <mal@lemburg.com>:
New test for huge formatting strings (these could cause core
dumps in previous versions).

By Trent Mick.
2000-06-30 10:26:29 +00:00
Marc-André Lemburg 6cdec2efbb New test for the ucnhash module. 2000-06-30 09:45:20 +00:00
Marc-André Lemburg 5f2e75e87c Marc-Andre Lemburg <mal@lemburg.com>:
Updated test output (the ucn tests are now in test_ucn).
2000-06-30 09:14:13 +00:00
Marc-André Lemburg af69f15d21 Marc-Andre Lemburg <mal@lemburg.com>:
Moved tests of new Unicode Char Name support to a separate test.
2000-06-30 09:13:35 +00:00
Fredrik Lundh b71624e698 - added support for (?P=name)
(closes #3 and #7 from the status report)
2000-06-30 09:13:06 +00:00
Fredrik Lundh 90a0791322 - pedantic: make sure "python -t" doesn't complain... 2000-06-30 07:50:59 +00:00
Fredrik Lundh df02d0b3f0 - fixed default value handling in group/groupdict
- added test suite
2000-06-30 07:08:20 +00:00
Skip Montanaro 47c60ec9a0 Describe a bit about writing test cases for Python... 2000-06-30 06:08:35 +00:00
Jeremy Hylton c5007aa5c3 final patches from Neil Schemenauer for garbage collection 2000-06-30 05:02:53 +00:00
Greg Ward 0e8c518a62 Bump version to 0.9. 2000-06-30 02:54:36 +00:00
Fredrik Lundh 01016fe972 - fixed split behaviour on empty matches
- fixed compiler problems when using locale/unicode flags

- fixed group/octal code parsing in sub/subn templates
2000-06-30 00:27:46 +00:00
Greg Ward 5d6ae76c09 Allow 2.0 on the list of target versions. NB. this isn't enough: the GUI part,
misc/install.c, still needs to be updated, and it looks like a non-trivial
change.
2000-06-29 23:50:19 +00:00
Fredrik Lundh 29c08beab0 still trying to figure out how to fix the remaining
group reset problem.  in the meantime, I added some
optimizations:

- added "inline" directive to LOCAL

  (this assumes that AC_C_INLINE does what it's
  supposed to do).  to compile SRE on a non-unix
  platform that doesn't support inline, you have
  to add a "#define inline" somewhere...

- added code to generate a SRE_OP_INFO primitive

- added code to do fast prefix search

  (enabled by the USE_FAST_SEARCH define; default
  is on, in this release)
2000-06-29 23:33:12 +00:00
Greg Ward 22e1bf7da5 Don't try to guess the name of a .def file -- if one is supplied, use it,
otherwise just generate an '/export:' option.
2000-06-29 23:09:20 +00:00
Greg Ward 83c3870e2b On second thought, first try for _winreg, and then winreg. Only if both
fail do we try for win32api/win32con.  If *those* both fail, then we don't
have registry access.  Phew!
2000-06-29 23:04:59 +00:00
Greg Ward cd079c4c28 Changed to use _winreg module instead of winreg. 2000-06-29 22:59:10 +00:00
Greg Ward f34506a3d4 Cleaned up and reformatted by Rene Liebscher.
More reformatting by me.
Also added some editorial comments.
2000-06-29 22:57:55 +00:00
Fred Drake c6e72e0b45 Typo. 2000-06-29 20:02:38 +00:00
Fred Drake 252af9ca27 The low-level interface is now in _winreg; update the import here. 2000-06-29 19:42:00 +00:00
Fred Drake 55c3819e6a Paul Prescod <paul@prescod.net>:
W3C DOM implementation for Python.
2000-06-29 19:39:57 +00:00
Fred Drake 3f6a7b5efb Package docstring. 2000-06-29 19:36:27 +00:00
Guido van Rossum 3e06ab1d44 The usual :) 2000-06-29 19:35:29 +00:00
Fred Drake 45cd9de2bb Paul Prescod <paul@prescod.net>:
SAX interfaces for Python.
2000-06-29 19:34:54 +00:00
Fred Drake 0d800e1481 Package docstring and initialization. 2000-06-29 19:33:43 +00:00
Fred Drake e85c350600 Package docstring. 2000-06-29 19:28:01 +00:00
Fred Drake 13634cf7a4 This patch addresses two main issues: (1) There exist some non-fatal
errors in some of the hash algorithms. For exmaple, in float_hash and
complex_hash a certain part of the value is not included in the hash
calculation. See Tim's, Guido's, and my discussion of this on
python-dev in May under the title "fix float_hash and complex_hash for
64-bit *nix"

(2) The hash algorithms that use pointers (e.g. func_hash, code_hash)
are universally not correct on Win64 (they assume that sizeof(long) ==
sizeof(void*))

As well, this patch significantly cleans up the hash code. It adds the
two function _Py_HashDouble and _PyHash_VoidPtr that the various
hashing routine are changed to use.

These help maintain the hash function invariant: (a==b) =>
(hash(a)==hash(b))) I have added Lib/test/test_hash.py and
Lib/test/output/test_hash to test this for some cases.
2000-06-29 19:17:04 +00:00
Fred Drake b46696c0ed [Old patch that hadn't been checked in.]
get_starttag_text():  New method.
        Return the text of the most recently parsed start tag, from
        the '<' to the '>' or '/'.  Not really useful for structure
        processing, but requested for Web-related use.  May also be
        useful for being able to re-generate the input from the parse
        events, but there's no equivalent for end tags.

attrfind:  Be a little more forgiving of unquoted attribute values.
2000-06-29 18:50:59 +00:00
Fredrik Lundh 8094611eb8 - fixed another split problem
(those semantics are weird...)

- got rid of $Id$'s (for the moment, at least).  in other
  words, there should be no more "empty" checkins.

- internal: some minor cleanups.
2000-06-29 18:03:25 +00:00
Guido van Rossum 1bfdc78c84 Skip Montanaro: modify test_socket.py to listen/connect using loopback addr 2000-06-29 17:00:54 +00:00
Fredrik Lundh be2211e940 - fixed split
(test_sre still complains about split, but that's caused by
  the group reset bug, not split itself)

- added more mark slots
  (should be dynamically allocated, but 100 is better than 32.
  and checking for the upper limit is better than overwriting
  the memory ;-)

- internal: renamed the cursor helper class

- internal: removed some bloat from sre_compile
2000-06-29 16:57:40 +00:00
Fred Drake 69218178ec Paul Prescod <paul@prescod.net>:
OO wrapper for _winreg; blessed by Mark Hammond.
2000-06-29 16:53:06 +00:00
Guido van Rossum 5917ecb0a4 Nils Fischbeck: added doc strings to everything. Martin von Loewis
has reviewed this, too.
2000-06-29 16:30:50 +00:00
Guido van Rossum 26e89d0185 Change string exceptions to class exceptions. 2000-06-29 16:15:52 +00:00
Guido van Rossum 63b08ac2f7 Whoops! We just discovered that Gordon's revamp of this module was
accidentally wiped out by Ping's patch (which shouldn't have affected
this file at all, had Ping done a cvs update).

This checkin restores Gordon's version, with Fredrik's change merged
back in.
2000-06-29 14:13:28 +00:00
Marc-André Lemburg a2aa34f243 Marc-Andre Lemburg <mal@lemburg.com>:
New test output
2000-06-29 13:31:10 +00:00
Fredrik Lundh 4781b07201 - make sure group names are valid identifiers
(closes the "SRE: symbolic reference" bug)
2000-06-29 12:38:45 +00:00
Fredrik Lundh 75f2d675ed - last patch broke parse_template; fixed by changing some
tests in sre_patch back to previous version

- fixed return value from findall

- renamed a bunch of functions inside _sre (way too
  many leading underscores...)

</F>
2000-06-29 11:34:28 +00:00
Fredrik Lundh 6c68dc7b1a - removed "alpha only" licensing restriction
- removed some hacks that worked around 1.6 alpha bugs
- removed bogus test code from sre_parse
2000-06-29 10:34:56 +00:00
Fredrik Lundh 436c3d58a2 towards 1.6b1 2000-06-29 08:58:44 +00:00
Fred Drake ffdc48f45c Convert to use class-based exceptions.
Correct exception information in one docstring.
2000-06-29 05:06:02 +00:00
Greg Ward df112a76a9 Fixed so 'get_source_files()' calls 'check_extension_list()' -- that way,
we can run "sdist" on a distribution with old-style extension structures
even if we haven't built it yet.  Bug spotted by Harry Gebel.
2000-06-29 02:16:24 +00:00
Greg Ward 499822d959 Fixed 'findall()' so it only returns regular files -- no directories.
Changed 'prune_file_list()' so it also prunes out RCS and CVS directories.
Added 'is_regex' parameter to 'select_pattern()', 'exclude_pattern()',
  and 'translate_pattern()', so that you don't have to be constrained
  by the simple shell-glob-like pattern language, and can escape into
  full-blown regexes when needed.  Currently this is only available
  in code -- it's not exposed in the manifest template mini-language.
Added 'prune' option (controlled by --prune and --no-prune) to determine
  whether we call 'prune_file_list()' or not -- it's true by default.
Fixed 'negative_opt' -- it was misnamed and not being seen by dist.py.
Added --no-defaults to the option table, so it's seen by FancyGetopt.
2000-06-29 02:06:29 +00:00
Fred Drake 7833447f8f Trent Mick <trentm@activestate.com>:
Testing: test_array.py was also extended to check that one can set the
full range of values for each of the integral signed and unsigned
array types.

This closes SourceForge patch #100506.
2000-06-28 17:50:51 +00:00
Marc-André Lemburg 4a9188c557 Marc-Andre Lemburg <mal@lemburg.com>:
Updated test output.
2000-06-28 16:41:46 +00:00
Marc-André Lemburg a6f73d64c5 Marc-Andre Lemburg <mal@lemburg.com>:
Added tests for the new Unicode character name support in the
standard unicode-escape codec.
2000-06-28 16:41:23 +00:00
Fred Drake 8cef4cf737 Thomas Wouters <thomas@xs4all.net>:
This patch adds the openpty() and forkpty() library calls to posixmodule.c,
when they are available on the target
system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably
the other BSD-based systems as well.)

Lib/pty.py is also rewritten to use openpty when available, but falls
back to the old SGI method or the "manual" BSD open-a-pty
code. Openpty() is necessary to use the Unix98 ptys under Linux 2.2,
or when using non-standard tty names under (at least) BSDI, which is
why I needed it, myself ;-) forkpty() is included for symmetry.
2000-06-28 16:40:38 +00:00
Fred Drake c19425d520 Added the atexit module and documentation from Skip Montanaro
<skip@mojam.com>.  Revisions to the markup to make it pass LaTeX, added
an index entry and a reference from the sys.exitfunc documentation.

This closes SourceForge patch #100620.
2000-06-28 15:07:31 +00:00
Jeremy Hylton a05e293a21 typos fixed by Rob Hooft 2000-06-28 14:48:01 +00:00
Greg Ward cc623a2574 Lyle Johnson: pass in temp directory as 'build_temp' argument when calling
'link_shared_object()'.
2000-06-28 01:29:37 +00:00
Greg Ward bfc79d644a Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()'
methods (but not 'link_executable()', hmmm).  Currently only used by
BCPPCompiler; it's a dummy parameter for UnixCCompiler and MSVCCompiler.

Also added 'bcpp' to compiler table used by 'new_compiler()'.
2000-06-28 01:29:09 +00:00
Greg Ward 7d9c705b23 Typo fix. 2000-06-28 01:25:27 +00:00
Greg Ward fe9b818b7d Lyle Johnson's interface to Borland C++, with a few editorial comments by me.
Two major points:
  * lots of overlap with MSVCCompiler; the common code really should be
    factored out into a base class, say WindowsCCompiler
  * it doesn't work: weird problem spawning the linker (see comment for
    details)
2000-06-28 01:20:35 +00:00
Greg Ward b0b98a5ee5 Fixed to use 'reinitialize_command()' to fetch "install" and "install_lib"
command objects.
Various formatting tweaks, typo fixes in comments.
2000-06-28 00:56:20 +00:00
Greg Ward edc6a519dc Fixed to use 'reinitialize_command()' to fetch the "install" command object. 2000-06-28 00:36:40 +00:00
Andrew M. Kuchling 8628157026 Fix comment typo noticed by Rob Hooft 2000-06-27 14:15:29 +00:00
Greg Ward b231e1ae18 Oops, only do that AIX hack on AIX. 2000-06-27 01:59:43 +00:00
Greg Ward 4f880280c2 Fixed LDSHARED for AIX, based on a patch by Rene Liebscher.
Ditched my old code that fixed relative paths in the Makefile -- didn't work,
  doomed to failure, etc.
2000-06-27 01:59:06 +00:00
Greg Ward b593793fce A-ha! Read Thomas' patch a little more carefully and figured it out:
the 'implib_dir' attribute is back (only on NT, of course).
2000-06-27 01:43:24 +00:00
Greg Ward f3bd747c4e Thomas Heller: added --swig-cpp option and fixed silly typos in SWIG support.
Also supposedly made some change to where .lib files wind up under MSVC++,
  but I don't understand how to code is doing what Thomas says it's
  doing.
2000-06-27 01:37:10 +00:00
Greg Ward 27199e8029 Thomas Heller's "bdist_wininst" command (unreviewed, untested). 2000-06-27 01:24:38 +00:00
Greg Ward 1f9b73b575 Infrastructure support for the "bdist_wininst" command. 2000-06-27 01:24:07 +00:00
Greg Ward 855dab9987 Added 'include_dirs' parameters all over the place.
Added 'check_lib()', which provides a subset of the functionality of
  'check_func()' with a simpler interface and implementation.
2000-06-27 01:21:22 +00:00
Andrew M. Kuchling e8d7dbfe42 Sync to ESR's current version 2000-06-27 00:53:12 +00:00
Andrew M. Kuchling 8f790fe459 Drop back to old version of wrapper(); ESR reports that it broke things,
and I lack the time to track down the cause.
2000-06-27 00:50:40 +00:00
Andrew M. Kuchling 7fd7e36b08 Change pyexpat test suite to exercise the .returns_unicode attribute,
parsing the sample data once with 8-bit strings and once with Unicode.
2000-06-27 00:37:25 +00:00
Andrew M. Kuchling 2b9d0bcf83 Added two modules for ASCII characters and a simple editing form (ESR) 2000-06-26 23:55:42 +00:00
Andrew M. Kuchling 289d9d4227 Add wrapper for initscr() to copy the ACS_ and LINES,COLS bindings 2000-06-26 23:54:03 +00:00
Greg Stein 99a5621f3f now that imputil is in the main Python repository, clean up the header 2000-06-26 17:31:49 +00:00
Greg Stein 5e0fa4065f initial commit of a new HTTP library, supporting HTTP/1.1 and persistent
connections.
2000-06-26 08:28:01 +00:00
Jeremy Hylton c380466762 update output file to reflect new test of exception object str-ness 2000-06-25 10:44:57 +00:00
Greg Ward 992c8f9dab Define the 'executables' class attribute so the CCompiler constructor
doesn't blow up.  We don't currently use the 'set_executables()' bureaucracy,
although it would be nice to do so for consistency with UnixCCompiler.
2000-06-25 02:31:16 +00:00
Greg Ward e401e15d18 Removed some debugging code that slipped into the last checkin.
Ensure that 'extra_args' (whether compile or link args) is never None.
2000-06-25 02:30:15 +00:00
Greg Ward f46a688e84 Fixed the "pre-link hook" so it actually works, mainly by renaming it
to 'msvc_prelink_hack()', adding the parameters that it actually needs,
and only calling it for MSVC compiler objects.  Generally gave up on the
idea of a general "hook" mechanism: deleted the empty 'precompile_hook()'.
2000-06-25 02:23:11 +00:00
Greg Ward 68ff615c79 Added PreprocessError and UnknownFileError (both used by CCompiler). 2000-06-25 02:12:14 +00:00
Greg Ward eab969d700 Call 'customize_compiler()' after getting CCompiler object. 2000-06-25 02:10:58 +00:00
Greg Ward 5ca84b83c7 Fixed a few silly bugs in my SWIG support code. (Hey, I said it was
experimental and untested.)
Call 'customize_compiler()' after getting CCompiler object.
2000-06-25 02:10:46 +00:00
Greg Ward bb7baa793d Added the 'customize_compiler()' function, which plugs in the essential
information about building Python extensions that we discovered in
Python's makefile.  Currently only needed on Unix, so does nothing on
other systems.
2000-06-25 02:09:14 +00:00
Greg Ward e5c62bf6e8 Introduced some bureaucracy for setting and tracking the executables
that a particular compiler system depends on.  This consists of the
'set_executables()' and 'set_executable()' methods, and a few lines in
the constructor that expect implementation classes to provide an
'executables' attribute, which we use to initialize several instance
attributes.  The default implementation is somewhat biased in favour of
a Unix/DOS "command-line" view of the world, but it shouldn't be too
hard to override this for operating systems with a more sophisticated
way of representing programs-to-execute.
2000-06-25 02:08:18 +00:00
Greg Ward 73076ff754 Got rid of direct dependence on the sysconfig module. Mainly, this
meant playing along with the new "dictionary of executables" scheme
added to CCompiler by adding the 'executables' class attribute, and
changing all the compile/link/etc. methods to use the new attributes
(which encapsulate both the program to run and its standard arguments,
so it was a *little* bit more than just changing some names).
2000-06-25 02:05:29 +00:00
Greg Ward 6a2a3dbec5 Added 'split_quoted()' function to deal with strings that are quoted in
Unix shell-like syntax (eg. in Python's Makefile, for one thing -- now that
I have this function, I'll probably allow quoted strings in config files too.
2000-06-24 20:40:02 +00:00
Greg Ward c3a43b4f9b Docstring reformatting/tweaking binge.
Fixed a few comments.
2000-06-24 18:10:48 +00:00
Greg Ward c3f364462f Print a warning if we install a data file right in install_dir.
Tweaked help text.
2000-06-24 17:36:24 +00:00
Greg Ward fa2f4b6d8e Changed the default installation directory for data files (used by
the "install_data" command to the installation base, which is usually just
sys.prefix.  (Any setup scripts out there that specify data files will have
to set the installation directory, relative to the base, explicitly.)
2000-06-24 17:22:39 +00:00
Greg Ward 9aa668b03a Changed 'object_filenames()' to raise exception instead of silently carrying
on if it sees a filename with unknown extension.
2000-06-24 02:22:49 +00:00
Greg Ward 3459381e2a Changed so all the help-generating functions are defined, at module-level,
in the module of the command classes that have command-specific
help options.  This lets us keep the principle of lazily importing
the ccompiler module, and also gets away from defining non-methods
at class level.
2000-06-24 01:23:37 +00:00
Greg Ward 55fced3df9 More stylistic tweaks to the generic '--help-xxx' code. 2000-06-24 01:22:41 +00:00
Greg Ward 2ff7887270 Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch. 2000-06-24 00:23:20 +00:00
Greg Ward ffcaf2dd72 Experimental, completely untested SWIG support. 2000-06-24 00:19:35 +00:00
Greg Ward cb18557de2 Revised docstring so 'sources' isn't necessarily all C/C++ files (to
accomodate SWIG interface files, resource files, etc.).
2000-06-24 00:18:24 +00:00
Greg Ward a392dcb211 Bastian Kleineidam: 'copy_file()' now returns the output filename, rather
than a boolean indicating whether it did the copy.
2000-06-23 01:42:40 +00:00
Marc-André Lemburg 349a3d3a9a Marc-Andre Lemburg <mal@lemburg.com>:
Made codecs.open() default to 'rb' as file mode.
2000-06-21 21:21:04 +00:00
Guido van Rossum d468bd3463 Sjoerd Mullender:
These two fixes were approved by me.

Peter Kropf:
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile.

Spiros Papadimitriou:
I just downloaded xmllib.py ver. 0.3 from python.org and there
seems to be a slight typo:  Line 654 ("tag = self.stack[-1][0]"
in parse_endtag),  is indented one level more than it should be.
I just thought I'd let you know...
2000-06-21 20:01:10 +00:00
Greg Ward 7c6395a6a3 Implementation of the CCompiler class for Cygwin and Mingw32, ie. the two
major ports of GCC to Windows.  Contributed by Rene Liebscher, and quite
untested by me.  Apparently requires tweaking Python's installed config.h
and adding a libpython.a to build extensions.
2000-06-21 03:33:03 +00:00
Greg Ward b2db0eb695 Fix inspired by Rene Liebscher: if setup script is newer than the
manifest, regenerate the manifest.
2000-06-21 03:29:57 +00:00
Greg Ward f6451c46d7 Delete spurious comment. 2000-06-21 03:14:27 +00:00
Greg Ward afc224beec Build the 'outfiles' list so 'get_outputs()' has something to return.
(Bug spotted and originally fixed by Rene Liebscher; fix redone by me.)
2000-06-21 03:13:51 +00:00
Greg Ward e2383a6c77 Rene Liebscher: when fixing up directories with an alternate root, include
'install_headers'.
2000-06-21 03:09:02 +00:00
Greg Ward 59ac7091a7 Fleshed out and added a bunch of useful stuff, notably 'check_func()',
'try_cpp()', 'search_cpp()', and 'check_header()'.  This is enough that
the base config is actually useful for implementing a real config
command, specifically one for mxDateTime.
2000-06-21 03:00:50 +00:00
Greg Ward 71257c73f8 Oops, import 'grok_environment_error()'. 2000-06-21 02:59:14 +00:00
Greg Ward 3ff3b039ac Added 'preprocess()' method to CCompiler interface, and implemented
it in UnixCCompiler.  Still needs to be implemented in MSVCCompiler (and
whatever other compiler classes are lurking out there, waiting to be
checked in).
2000-06-21 02:58:46 +00:00
Jeremy Hylton 3c0d013db4 verify that Python raises SyntaxError for long and deeply-nested expressions 2000-06-20 19:13:27 +00:00
Jeremy Hylton 56c807d318 add minimal test of exception use. verify that each exception can be
raised, caught, and converted to a string.
2000-06-20 18:52:57 +00:00
Fred Drake bdd44a389b Pekka Pessi <Pekka.Pessi@nokia.com>:
Patch to add support for sip: (Session Initiation Protocol, RFC2543)
URLs.
2000-06-20 18:32:16 +00:00
Andrew M. Kuchling e8d52af54b Fix bug when the replacement template is a callable object 2000-06-18 20:27:10 +00:00
Andrew M. Kuchling e475e70128 Patch from /F:
this patch adds a fast _flatten function to the _tkinter
module, and imports it from Tkinter.py (if available).

this speeds up canvas operations like create_line and
create_polygon.  for example, a create_line with 5000
vertices runs about 50 times faster with this patch in
place.
2000-06-18 18:45:50 +00:00
Greg Ward b75c485f0b 'get_platform()' now just returns 'sys.platform' on all platforms. 2000-06-18 15:45:55 +00:00
Andrew M. Kuchling cf70ea633f Additional tests for seek() method, written by Trent Mick 2000-06-18 04:47:08 +00:00
Greg Ward b081e180ac Pulled the MSVC++-specific hackery out to a new method, 'prelink_hook()',
and added (empty) 'precompile_hook()' for symmetry.  One can envision
a much more elaborate hook mechanism, but this looks like it'll do for
now.
2000-06-17 23:04:31 +00:00
Greg Ward b248b7f848 Renamed PATH_CREATED to _path_created, on the grounds that it's private and
mutable, rather than public and constant.
2000-06-17 02:19:30 +00:00
Greg Ward fcd4f87397 Changed 'remove_tree()' to use the new 'grok_environment_error()' function
instead of muddling through IOError and OSError exception objects itself.
2000-06-17 02:18:19 +00:00
Greg Ward cf0e2dde6d Changed to use the new 'grok_environment_error()' function instead of
muddling through IOError and OSError exception objects right here.
2000-06-17 02:17:45 +00:00
Greg Ward e905513be0 Added 'grok_environment_error()' function to deal with the various
forms that IOError and OSError can take (taken from core.py).
2000-06-17 02:16:46 +00:00
Greg Ward 039accfb2c Bastian Kleineidam: added 'remove_tree()' function. Needed so that
'remove_tree()' can cooperate with 'mkpath()' in the maintenance of
the PATH_CREATED cache: specifically, if a directory is created
with 'mkpath()', later removed with 'remove_tree()', and 'mkpath()'
is again requested to create it, then it would erroneously think
the directory already existed, because it was in the PATH_CREATED
cache.  The patch (slightly tweaked by me) fixes that.
2000-06-17 01:58:14 +00:00
Greg Ward c566232c4d Fixed install directory for header files on Unix. 2000-06-17 01:34:45 +00:00
Marc-André Lemburg bddf502a1f Marc-Andre Lemburg <mal@lemburg.com>:
Removed a test which can fail when the default locale setting
uses a Latin-1 encoding. The test case is not applicable anymore.
2000-06-14 09:17:25 +00:00
Fred Drake 414ca6666c James C. Ahlstron <jim@interet.com>:
Thanks to Hubert Hoegl <hubert.hoegl@dlr.de> for finding this bug.
2000-06-13 18:49:53 +00:00
Marc-André Lemburg 8462573826 Marc-Andre Lemburg <mal@lemburg.com>:
Fixed some tests to not cause the script to fail, but rather
output a warning (which then is caught by regrtest.py as wrong
output). This is needed to make test_unicode.py run through
on JPython.
Thanks to Finn Bock.
2000-06-13 12:05:36 +00:00
Marc-André Lemburg 7ebb92ea66 Marc-Andre Lemburg <mal@lemburg.com>:
Removed import of string module -- use string methods directly.
Thanks to Finn Bock.
2000-06-13 12:04:05 +00:00
Andrew M. Kuchling 5185a084b7 Applied simplifications suggested by Greg Stein. 2000-06-10 23:39:05 +00:00
Andrew M. Kuchling d0939fa592 Add contents of curses package 2000-06-10 23:06:53 +00:00
Fred Drake 1f2d4640b8 Added test for linnuxaudiodev module; directly adapted from sunaudiodev
test.  Someone with more Linux audio knowledge should at least take a
brief look at it.
2000-06-10 04:22:57 +00:00
Andrew M. Kuchling 7ad4792307 Comment out an apparent debug print 2000-06-10 01:41:48 +00:00
Andrew M. Kuchling 815d5b934b Patch from /F: this patch brings the CVS version of SRE in sync with the
latest public snapshot.""
2000-06-09 14:08:07 +00:00
Marc-André Lemburg 59a044b7d2 Marc-Andre Lemburg <mal@lemburg.com>:
Updated to the fix in %c formatting: it now always checks for
a one character argument.
2000-06-08 17:50:55 +00:00
Marc-André Lemburg 2348114ba8 Marc-Andre Lemburg <mal@lemburg.com>:
Added emulations of the C APIs in _locale to be used when the
_locale module is not enabled. They return the correct values
assuming the 'C' locale.
2000-06-08 17:49:41 +00:00
Greg Ward d2412a35b1 Harry Henry Gebel: fix '_format_changelog()' so it doesn't bomb if
passed None.
2000-06-08 14:21:23 +00:00
Greg Ward 14c8d05a7a Include setup.cfg in the list of default files to distribute. 2000-06-08 01:22:48 +00:00
Greg Ward ce15c6ce8d Moved the code that prunes the file list after reading the manifest
template into a new method 'prune_file_list()', called from
  'get_file_list()' rather than 'read_manifest()' -- this keeps
  'read_manifest()' more general.
Deleted the redundant call to 'exclude_pattern()' in 'make_distribution()'
  -- this had the same intention as 'prune_file_list()', but was incomplete
  (only pruned the release tree, not the build tree) and in the wrong
  place (the prune wouldn't be reflected in the manifest file).
2000-06-08 01:06:02 +00:00
Greg Ward 4a7319ca28 Renamed 'find_defaults()' to 'add_defaults()'.
Deleted old, commented-out 'exclude_pattern()' method.
2000-06-08 00:52:52 +00:00
Greg Ward c3c8c6edbb Docstring addition binge. 2000-06-08 00:46:45 +00:00
Greg Ward 373dbfa723 Fixed so we print more than just the first line of help for options with
a short form and text that wraps onto multiple lines.
2000-06-08 00:35:33 +00:00
Greg Ward e0c8c2fd16 Docstring reformatting binge. 2000-06-08 00:24:01 +00:00
Greg Ward f1fe10376e Cosmetic tweaks to imports, the 'show_formats()' function, and the
'help_options' list; also added an editorial comment.
2000-06-08 00:14:18 +00:00
Greg Ward f8b9e20d94 Made all debug output go through the 'debug_print()' method instead of
directly printing to stdout.  This was a bit more work than it sounds like
it should have been:
  * turned 'select_pattern()' and 'exclude_pattern()' from functions into
    methods, so they can refer to 'self' to access the method
  * commented out the *other* 'exclude_pattern()' method, which appears
    to be vestigial code that was never cleaned up when the
    'exclude_pattern()' function was created
  * changed the one use of the old 'exclude_pattern()' method to use the
    new 'exclude_pattern()' (same behaviour, slightly different args)
  * some code and docstring reformatting
  * and, of course, changed all the debugging prints to 'debug_print()' calls
Added/tweaked some regular ('self.announce()') output for better runtime
  feedback.
2000-06-08 00:08:14 +00:00
Greg Ward ebec02a92c Added 'debug_print()' method (driven by DEBUG global from distutils.core). 2000-06-08 00:02:36 +00:00
Marc-André Lemburg 4fd73f0465 Marc-Andre Lemburg <mal@lemburg.com>:
Added some more codec aliases. Some of them are needed by the
new locale.py encoding support.
2000-06-07 09:12:30 +00:00
Marc-André Lemburg 990bbe90d5 Marc-Andre Lemburg <mal@lemburg.com>:
Added support to set the default encoding of strings
at startup time to the values defined by the C locale.

The sys.setdefaultencoding() API is deleted after having
set up the encoding, so that user code cannot subsequentely
change the setting. This effectively means that only site.py
may alter the default setting.
2000-06-07 09:12:09 +00:00
Marc-André Lemburg 5431bc3602 Marc-Andre Lemburg <mal@lemburg.com>:
Added a new locale name aliasing engine which also supports
locale encodings, a feature which is used by the new default
encoding support in site.py.
2000-06-07 09:11:40 +00:00
Marc-André Lemburg 54480d300a New codec which always raises an exception when used. This
codec can be used to effectively switch off string coercion
to Unicode.
2000-06-07 09:04:05 +00:00
Greg Ward 9d17a7ad6d Patch from Rene Liebscher: this adds "--help-foo" options to list the
values that "--foo" can take for various commands: eg. what formats for
"sdist" and "bdist", what compilers for "build_ext" and "build_clib".

I have *not* reviewed this patch; I'm checking it in as-is because it also
fixes a paper-bag-over-head bug in bdist.py, and because I won't have
time to review it properly for several days: so someone else can
test it for me, instead!
2000-06-07 03:00:06 +00:00
Greg Ward 1169687692 Always look for the system config file in the Distutils module directory,
and call it "distutils.cfg" instead of "pydistutils.cfg" (personal
config files are still ".pydistutils.cfg" or "pydistutils.cfg", though).
2000-06-07 02:29:03 +00:00
Greg Ward acf3f6a700 Patch from Rene Liebscher:
Look for personal config file in /home/greg on Windows, too: users will have
to set /home/greg to use this, so it's not something that many people will
use.  But if python-dev comes up with the "right way" to divine a
home directory on Windows, we can use that to set /home/greg and poof! --
personal Distutils config files on Windows.
2000-06-07 02:26:19 +00:00
Greg Ward 28a5f44cca First crack at the Distutils "config" command. Unlike other commands, this
one doesn't *do* anything by default; it's just there as a conduit for data
(eg. include dirs, libraries) from the user to the "build" commands.
However, it provides a couple of Autoconf-ish methods ('try_compile()',
'try_link()', 'try_run()') that derived, per-distribution "config" commands
can use to poke around the target system and see what's available.

Initial experimenst with mxDateTime indicate that higher-level methods are
necessary: analogs of Autoconf's AC_CHECK_HEADER, AC_CHECK_LIB will be
needed too (and that's just to probe the C/C++ system: how to probe the
Python system is wide open, and someday we'll have to worry about probing a
Java system too).
2000-06-06 02:57:07 +00:00
Greg Ward 43955c9a02 Fix 'reinitialize_command()' so it resets the 'have_run' flag for the
command being reinitialized to false.
2000-06-06 02:52:36 +00:00
Greg Ward e18dd8dd8f Support for multiple distribution formats in one run. 2000-06-06 02:51:38 +00:00
Greg Ward ec21cc60db 'get_outputs()' now returns an empty list instead of None. 2000-06-06 02:18:13 +00:00
Greg Ward 7ce6d074aa Fixed syntax error.
Half-fixed RPM 2 compatibility:added 'rpm_base' option, which must be set
  (to eg. /usr/src/redhat on a stock Red Hat system) if rpm2_mode is on.
  Still not quite working, though.
2000-06-04 15:30:35 +00:00
Greg Ward 62d5a57b05 Use 'ensure_string_list()' for 'formats' option, so that it can be
spelled sensibly in a config file.
2000-06-04 15:12:51 +00:00
Greg Ward a68c93ac89 Patch from Harry Henry Gebel:
Fills in question marks in help

Reads scripts in from files rather than strings

Adds RPM 2 compatibility mode (untested). Use of this mode requires that
--bdist-base be specified because bdist_rpm has no way of detecting where
RPM wants to find spec files and source files. An unmodified RedHat 5.0
system would require '--bdist-base=/usr/src/RedHat'. (You would also have
to be root.) If the rpmrc file has been modified to allow RPMs to be built
by normal users then --build-base would need to be changed accordingly.

Formats the changelog.

GPW: tweaked formatting, added some editorial comments.
2000-06-04 15:00:34 +00:00
Greg Ward 31413a7ba2 Added the 'ensure_*' methods from bdist_rpm; refactored 'ensure_filename()'
and added 'ensure_dirname()'.
2000-06-04 14:21:28 +00:00
Greg Ward 4227dc1b15 Removed the 'ensure_*' methods -- they're just too handy too keep in one
command class, so they're now in the Command base class.
2000-06-04 14:20:57 +00:00
Greg Ward 6f980b5936 Renamed 'modules' option to 'py_modules', for consistency with Distribution
(and in order to generate a more sensible error message cleanly).
2000-06-04 13:42:52 +00:00
Greg Ward c4c06af575 Patch from Harry Henry Gebel: fixes a bit of code that slipped by my
overhaul last night.
2000-06-03 01:03:55 +00:00
Greg Ward 3985151642 Catch DistutilSetupError from the Distribution constructor. 2000-06-03 01:02:06 +00:00
Greg Ward 82d71cacb0 Added a bunch of new globals in '_init_mac()' -- these will be needed to
support the forthcoming Cygwin/Mingw32 GCC-on-Windows patch.
Standardized CVS id line.
2000-06-03 00:44:30 +00:00
Greg Ward 0f216fdda9 Bumped version number to 0.9pre (there will be a couple of code snapshots
before the real release, but I want to make it clear that a major new
release is on the way).
2000-06-02 02:23:42 +00:00
Greg Ward efbd071016 Only print debugging output if DEBUG true. 2000-06-02 02:01:51 +00:00