Commit Graph

3622 Commits

Author SHA1 Message Date
Fred Drake 38cb9f1f17 Convert all entries on sys.path to absolute paths, and also update the
__file__ attributes of already-imported modules to be absolute.  This helps
robustify the interpreter against os.chdir() calls from the application.

Only remove setdefaultencoding() from sys if it exists; if this module is
run as a script (since there is a _test() function that gets run), it broke
because the script attempts to remove it again after the import of site
has already done so.  This allows the module to be run as a script again.

makepath():  New function, standardizes all pathname normalization in one
             place.
2000-09-28 16:52:36 +00:00
Fred Drake b4e460ac4b Avoid import of string module; it is only needed for expandvars().
Never assume that os.sep is for the module-specific platform; use the
right separator character directly.
Fix some minor style consistency nits.
2000-09-28 16:25:20 +00:00
Fred Drake c0ab93ef6f Minor style nits. 2000-09-28 16:22:52 +00:00
Fred Drake 22fb839f0c Remove imports of string when string methods will do. 2000-09-28 15:04:39 +00:00
Fred Drake 954383356f Added some tests for the truncate() method; one is commented out because
cStringIO does not get it right (reported as SF bug #115531).

Added test for ValueError when write() is called on a closed StringIO
object.  Commented out because cStringIO does not get it right
(reported as SF bug #115530).
2000-09-28 04:25:33 +00:00
Fred Drake e0a7f4f9d5 Add truncate() method to StringIO objects.
This closes SourceForge bug #115527.
2000-09-28 04:21:06 +00:00
Fred Drake d391a34926 Remove change that had not been saved when the output was generated;
not terribly useful.
Reported by Mark Favas <Mark.Favas@per.dem.csiro.au>.
2000-09-28 04:13:15 +00:00
Fred Drake 8ef6767e00 Regression test for ConfigParser module. 2000-09-27 22:45:25 +00:00
Fred Drake 2a37f9f862 Allow spaces in section names.
Do not expose the __name__ when reporting the list of options available
for a section since that is for internal use.

This closes SourceForge bug #115357.

Additionally, define InterpolationDepthError and MAX_INTERPOLATION_DEPTH.
The exception is raised by get*() when value interpolation cannot be
completed within the defined recursion limit.  The constant is only
informative; changing it will not affect the allowed depth.

Fix the exit from get() so that None is not returned if the depth is met
or exceeded; either return the value of raise InterpolationDepthError.
2000-09-27 22:43:54 +00:00
Marc-André Lemburg 23542dc6eb Updated hash values to match the new encoding (UTF-8) used in the test. 2000-09-27 12:25:14 +00:00
Marc-André Lemburg 67ceca7add Fixed encoding to use an endianness independent format. 2000-09-27 12:24:34 +00:00
Lars Gustäbel 6a7768ae4f Fixed misleading qname in test_xmlgen_ns (reported by loewis). 2000-09-27 08:12:17 +00:00
Greg Ward ef850def44 Bump version to 1.0pre. 2000-09-27 02:26:57 +00:00
Greg Ward 264cf74e1a Remove deprecation warnings on old 'link_*()' methods, ie. they're not
deprecated after all.  But now they're only implemented once, instead
of N times.
2000-09-27 02:24:21 +00:00
Greg Ward 4240648a9d Big patch from Rene Liebscher to simplify the CCompiler API and
implementations.  Details:
  * replace 'link_shared_object()', 'link_shared_lib()', and
    'link_executable()' with 'link()', which is (roughly)
    the union of the three methods it replaces
  * in all implementation classes (UnixCCompiler, MSVCCompiler, etc.),
    ditch the old 'link_*()' methods and replace them with 'link()'
  * in the abstract base class (CCompiler), add the old 'link_*()'
    methods as wrappers around the new 'link()' (they also print
    a warning of the deprecated interface)

Also increases consistency between MSVCCompiler and BCPPCompiler,
hopefully to make it easier to factor out the mythical WindowsCCompiler
class.  Details:
  * use 'self.linker' instead of 'self.link'
  * add ability to compile resource files to BCPPCompiler
  * added (redundant?) 'object_filename()' method to BCPPCompiler
  * only generate a .def file if 'export_symbols' defined
2000-09-27 02:08:14 +00:00
Greg Ward 8b2e4e89bd Bump version to 0.9.4. 2000-09-27 00:17:08 +00:00
Greg Ward 2c08cf0ffa Fix '_set_command_options()' so it only calls 'strtobool()' on strings
(was crashing on any boolean command-line option!).
2000-09-27 00:15:37 +00:00
Barry Warsaw c79dff679f Added an "import xml.parsers.expat" to turn errors due to not having
the parser built into ImportErrors.
2000-09-26 18:00:20 +00:00
Jeremy Hylton d635b1d724 The Usual 2000-09-26 17:32:27 +00:00
Fred Drake 0872e05851 Fix handling of file inputs on Windows; passing them to urllib.urlopen()
caused the drive letter to cause urlopen() to think it was an unrecognized
URL scheme.  This only passes system ids to urlopen() if the file does not
exist.  It works on Windows & Unix.

It should work everywhere else as well.
2000-09-26 17:23:09 +00:00
Marc-André Lemburg 6c8e4c3ee8 Test output data for the Unicode database test suite. 2000-09-26 16:19:27 +00:00
Marc-André Lemburg 6a20ee7dec Added test suite for the complete Unicode database. The test previously
only tested a few cases.
2000-09-26 16:18:58 +00:00
Greg Ward d8f7f81254 Bump version to 0.9.3. 2000-09-26 02:51:09 +00:00
Greg Ward ca4289f7b2 Reformat docstrings.
Standardize whitespace in function calls.
2000-09-26 02:13:49 +00:00
Greg Ward 071ed76732 Standardize whitespace in function calls. 2000-09-26 02:12:31 +00:00
Greg Ward 449f5568b7 Whitespace fix. 2000-09-26 02:03:34 +00:00
Greg Ward a30f7aca08 Reformat docstrings.
Standardize whitespace in function calls.
2000-09-26 02:00:51 +00:00
Greg Ward be86bdea73 Standardize whitespace in function calls. 2000-09-26 01:56:15 +00:00
Greg Ward fd7b91eff9 Standardize whitespace in function calls and docstrings. 2000-09-26 01:52:25 +00:00
Guido van Rossum de33c79fdb HP-UX is another one of those platforms using an alternative lock
structure (same as AIX).
2000-09-26 00:31:18 +00:00
Fred Drake af57431701 Include the version-detecting code to allow PyXML to override the "standard"
xml package.  Require at least PyXML 0.6.1.
2000-09-25 17:30:17 +00:00
Barry Warsaw 38bfc4d0d5 Add a test for SF bug #110621; stripping square brackets off of
addresses with domain literals.
2000-09-25 15:09:28 +00:00
Barry Warsaw 2ea2b1133e AddrlistClass.getdomainliteral(): rfc822 requires that the domain
literal be wrapped in square brackets.  This fix replaces the square
brackets that were previously being stripped off.  Closes SF bug
#110621.
2000-09-25 15:08:27 +00:00
Guido van Rossum 4126736791 When reading the file, option names were not passed through
self.optionxform(), which (in the default case) caused options spelled
with opper case letters in their name to be inaccessible.  Reported by
"Todd R. Palmer" <t2palmer@bellsouth.net> on
activepython@listserv1.ActiveState.com.
2000-09-25 14:42:33 +00:00
Greg Ward 68ded6e6f1 Added 'translate_longopt()' function. 2000-09-25 01:58:31 +00:00
Greg Ward 2f2b6c62ba Change to use the new 'translate_longopt()' function from fancy_getopt, rather
than rolling our own with fancy_getopt's 'longopt_xlate' global.
2000-09-25 01:58:07 +00:00
Greg Ward d644ca2120 Added a bunch of missing "=" signs in the option table.
Removed script options -- don't think they ever worked, weren't
  very well thought through, etc.
2000-09-25 01:53:01 +00:00
Greg Ward af64aed5cf Renamed '--keep-tree' option to '--keep-temp', for consistency
with the bdist_* commands.
2000-09-25 01:51:01 +00:00
Greg Ward 99b032eaf2 Added 'boolean_options' list to support config file parsing. 2000-09-25 01:41:15 +00:00
Greg Ward 817dc098ef Added 'strtobool()' function: convert strings like "yes", "1",
"no", "0", etc. to true/false.
2000-09-25 01:25:06 +00:00
Greg Ward ceb9e226a6 Fixed some bugs and mis-features in handling config files:
* options can now be spelled "foo-bar" or "foo_bar" (handled in
    'parse_config_files()', just after we parse a file)
  * added a "[global]" section so there's a place to set global
    options like verbose/quiet and dry-run
  * respect the "negative alias" dictionary so (eg.) "quiet=1" is
    the same as "verbose=0" (this had to be done twice: once in
    'parse_config_file()' for global options, and once in
    '_set_command_options()' for per-command options)
  * the other half of handling boolean options correctly: allow
    commands to list their boolean options in a 'boolean_options'
    class attribute, and use it to translate strings (like "yes", "1",
    "no", "0", etc) to true or false
2000-09-25 01:23:52 +00:00
Thomas Wouters 84da8aa7e2 Fix inconsistent use of space/tabs. 2000-09-25 00:11:37 +00:00
Martin v. Löwis a13a9dcb9c Use SAX2 namespace support. 2000-09-24 21:54:14 +00:00
Martin v. Löwis 58af43fd76 [Patch 101634]
xml.sax: Fix parse and parseString not to rely on ExpatParser
         Greatly simplify import logic by using __import__
saxutils: Support Unicode strings and files as parameters to
          prepare_input_source
2000-09-24 21:31:06 +00:00
Martin v. Löwis 2066fa023c Find feature names in handler. 2000-09-24 21:17:39 +00:00
Lars Gustäbel 424980fd4d Enabled EntityResolver test again now that pyexpat.c has been fixed. 2000-09-24 20:57:04 +00:00
Lars Gustäbel 3a361f4f8b Fixed another bug. 2000-09-24 20:55:01 +00:00
Lars Gustäbel bb757136b2 Improvements to doco strings.
Tiny bug fix to expatreader.py (endDocument was only called after errors).
2000-09-24 20:38:18 +00:00
Martin v. Löwis 33315b180b Use findfile to locate input and output files. 2000-09-24 20:30:24 +00:00
Lars Gustäbel e292a24589 Added EntityResolver and DTDHandler (patch 101631) with test cases. 2000-09-24 20:19:45 +00:00
Lars Gustäbel 716efea181 Added necessary test input file for test_sax.py 2000-09-24 18:57:26 +00:00
Lars Gustäbel 523b0a6ec8 Added back the InputSource class (patch 101630). 2000-09-24 18:54:49 +00:00
Lars Gustäbel b7536d5860 Added test cases for the InputSource class. 2000-09-24 18:53:56 +00:00
Fredrik Lundh b49f88bfc1 - Improved handling of win32 proxy settings (addresses bug #114256).
The earlier code assumed "protocol=host;protocol=host;..." or "host",
but Windows may also use "protocol=host" (just one entry), as well as
"protocol://host".  This code needs some more work, so I'll leave the
bug open for now.
2000-09-24 18:51:25 +00:00
Lars Gustäbel ab64787dca Added test cases for the Attributes interface. 2000-09-24 18:40:52 +00:00
Lars Gustäbel 32bf12eb8a Updated to final Attributes interface (patch 101632). 2000-09-24 18:39:23 +00:00
Lars Gustäbel e84bf751bb Updated to new SAX method signatures (*NS, patch 101573). 2000-09-24 18:31:37 +00:00
Lars Gustäbel f43cf31f4a Updated to new *NS signatures (patch 101573). 2000-09-24 18:29:24 +00:00
Fredrik Lundh 19f977ba40 - don't hang if group id is followed by whitespace (closes bug #114660) 2000-09-24 14:46:23 +00:00
Lars Gustäbel 96753b3482 Added first start on SAX 2.0 tests. 2000-09-24 12:24:24 +00:00
Lars Gustäbel 358f4da29c Added back missing argument to ignorableWhitespace signature. 2000-09-24 11:06:27 +00:00
Lars Gustäbel fc643c339d Bug fix to namespace handling in XMLGenerator (now adds declarations).
Bug fixes to XMLFilterBase (wrong ignorableWhitespace signature and
did not inherit set*Handler methods from XMLReader.)
2000-09-24 10:53:31 +00:00
Nicholas Riley 9a580c440c Fixes for Python 1.6 compatibility - socket bind and connect get a
tuple instead two arguments.
2000-09-24 06:29:50 +00:00
Nicholas Riley 21afd01ce2 Change for Python 1.6 compatibility - UNIX's 'os' module defines
'spawnv' now, so we check for 'fork' first.
2000-09-24 06:28:47 +00:00
Fred Drake 1f54902e05 Conform to the Python style guide. 2000-09-24 05:21:58 +00:00
Fred Drake ddb486745b Conform more closely with the Python style guide. 2000-09-23 05:32:26 +00:00
Fred Drake 96ea196ea8 Use the public name for the Expat parser; "pyexpat" is deprecated. 2000-09-23 04:49:30 +00:00
Fred Drake 7fbc85c5c5 Rename the public interface from "pyexpat" to "xml.parsers.expat". 2000-09-23 04:47:56 +00:00
Fred Drake 003b9250e3 Add a wrapper around the pyexpat module, making the "public" name of
the module "xml.parsers.expat".
2000-09-23 04:44:43 +00:00
Greg Ward f84fb660cb Split 'run()' up into 'build()', 'install()', and 'bytecompile()' (for
easier extensibility).
2000-09-23 01:20:19 +00:00
Greg Ward 7b87c0e1bb Whitespace tweaks. 2000-09-23 01:10:10 +00:00
Greg Ward 9e3dc4e928 Reformat docstrings.
Standardize use of whitespace on function calls.
2000-09-23 00:59:34 +00:00
Fred Drake d9a8dec135 Maildir.__init__(): Use the correct filter for filenames, so that this
class conforms to the maildir specification.
2000-09-22 18:41:50 +00:00
Neil Schemenauer ef5f2b9dbb - plug a memory leak due to circular lists 2000-09-22 15:30:16 +00:00
Neil Schemenauer d569f23da9 - Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
used to find cyclic garbage produced by tests.
2000-09-22 15:29:28 +00:00
Neil Schemenauer faae266e89 - Add test for new SAVEALL debugging flag
- Use exceptions rather than asserts for failing tests.
- Reorganize tests and produce some output if verbose option is set.
2000-09-22 15:26:20 +00:00
Tim Peters f58a7aafea Implemented new os.startfile function, unique to Windows, exposing a
subset of Win32 ShellExecute's functionality.  Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen.  Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now!  That's where
ShellExecute lives.
2000-09-22 10:05:54 +00:00
Guido van Rossum 7fa7da861a More whitespace cleanup, to satisfy tabnanny.py. Don't trust -tt! 2000-09-22 09:30:29 +00:00
Guido van Rossum c77593d31a Get rid of the one tab in the file.
Closes Bug #115054.
2000-09-22 09:23:08 +00:00
Fred Drake 7422b6b6a2 White space cleanup, including one item that was an error under -tt. 2000-09-22 05:07:56 +00:00
Greg Ward ab7983939b Tweak what happens when run on non-Windows platforms: set install prefix
as well as scheme, and don't convert all installation paths (that's now
done by the "install" command for us).
2000-09-22 01:32:34 +00:00
Greg Ward 379a02ffa9 Changed all paths in the INSTALL_SCHEMES dict to Unix syntax, and added
'convert_paths()' method to convert them all to the local syntax (backslash
or colon or whatever) at the appropriate time.

Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in
'select_scheme()').

Default 'install_path_file' to true, and never set it false (it's just
there in case some outsider somewhere wants to disable installation of the
.pth file for whatever reason).

Toned down the warning emitted when 'install_path_file' is false, since we
no longer know why it might be false.

Added 'warn_dir' flag to suppress warning when installing to a directory
not in sys.path (again, we never set this false -- it's there for outsiders
to use, specifically the "bdist_*" commands).

Pulled the loop of 'change_root()' calls out to new method 'change_roots()'.

Comment updates/deletions/additions.
2000-09-22 01:31:08 +00:00
Greg Ward 7ec053544c Fix 'convert_path()' so it returns immediately under Unix -- prevents blowing
up when the pathname starts with '/', which is needed when converting
installation directories in the "install" command.
2000-09-22 01:05:43 +00:00
Martin v. Löwis d7bf974af4 Indent _connection_class so that it becomes HTTPS._connection_class. 2000-09-21 22:09:47 +00:00
Fred Drake 265a804af2 Revise the test case for pyexpat to avoid using asserts. Conform better
to the Python style guide, and remove unneeded imports.
2000-09-21 20:32:13 +00:00
Guido van Rossum 9e79a25b8a The minidom.Node class has a debug attribute which, when its _debug
flag is true, is set to a StringIO object that silently collects all
debug messages.  This is triggered by the Node._debug=1 statement at
the top of test_minidom.py.  After the tests, we better delete that
StringIO object to avoid wasting memory.  We also reset the _debug
flag.  (Note that this is an undetectable memory leak, and the memory
doesn't get collected by the cycle-gc either, because it's all
reachable -- it's just useless.)
2000-09-21 20:10:39 +00:00
Fred Drake 07cbc4e5bd Paul Prescod <paul@prescod.net>:
Add support for parsing already-opened files.  Make sure the parse()
method closes exactly those files that it opens.

Modified by FLD for better conformance to the Python style guide.

This closes SourceForge patch #101512.
2000-09-21 17:43:48 +00:00
Fredrik Lundh 5644b7fad1 - fixed yet another gcc -pedantic warning
- added experimental "expand" method to match objects
- don't use the buffer interface on unicode strings
2000-09-21 17:03:25 +00:00
Fred Drake 44627016da SAXException.__getitem__(): Raise AttributeError instead of NameError. 2000-09-21 16:32:28 +00:00
Jeremy Hylton d34580cb87 fix bogus references to imp; makes test_minidom succeed 2000-09-21 14:46:56 +00:00
Lars Gustäbel b798c0109f Now uses make_parser to create its parser (patch 101573). 2000-09-21 08:38:46 +00:00
Lars Gustäbel ae43e5205d Added the make_parser function (patch 101571). 2000-09-21 08:34:04 +00:00
Lars Gustäbel c5cec51b95 Updated XMLGenerator to new DocumentHandler interface (patch 101572). 2000-09-21 08:25:28 +00:00
Lars Gustäbel b4d6bb0987 Updated to correct DocumentHandler signatures. (patch 101570) 2000-09-21 08:18:55 +00:00
Tim Peters 38fd5b6413 Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats.
Note a curious extension to the std C rules:  x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them.  But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form).  So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long.  This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified:  the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
2000-09-21 05:43:11 +00:00
Greg Ward f5855746fe Corran Webster: fix 'change_root()' to handle Mac OS paths. 2000-09-21 01:23:35 +00:00
Jeremy Hylton 572bdce4b3 change 2-space indent to 4-space indent 2000-09-20 02:47:28 +00:00
Greg Ward 9c0ea13ece *Very* belated application of Thomas Heller's patch to handle
resource files.  The gist of the patch is to treat ".rc" and ".mc"
files as source files; ".mc" files are compiled to ".rc" and then
".res", and ".rc" files are compiled to ".res".  Wish I knew what
all these things stood for...
2000-09-19 23:56:43 +00:00
Tim Peters ceeda0e9ba Treat trailing colon in os.path.join("a:", "b") same way for DOS as in
recent changes to ntpath.py and posixmodule.c.  Thanks to Guido for
pointing out the inconsistency!
2000-09-19 23:46:56 +00:00
Marc-André Lemburg d1ba443206 This patch adds a new Python C API called PyString_AsStringAndSize()
which implements the automatic conversion from Unicode to a string
object using the default encoding.

The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.

As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
2000-09-19 21:04:18 +00:00
Tim Peters 0eeba5b24b Part of SF patch 101481: on Windows, os.path.join("a:", "b") should yield
"a:b", not "a:/b".  Similar change was made to posixmodule.c earlier.
2000-09-19 20:39:32 +00:00
Tim Peters f5fa0fc640 test_userlist.py:
Added new test for new __contains__ method.
    Extensive editing to get rid of asserts.
2000-09-19 20:31:24 +00:00
Tim Peters 7b393fc037 SF patch 101391: implemented UserList.__contains__. 2000-09-19 20:29:03 +00:00
Paul Prescod 4c799191a2 Fix test errors. 2000-09-19 19:33:02 +00:00
Martin v. Löwis b96e0e5e65 New test cases for the StringIO module 2000-09-19 16:35:39 +00:00
Martin v. Löwis 89c528b02d Don't print specific Node instances unless running verbosely.
Closes Bug #114775.
2000-09-19 16:22:10 +00:00
Barry Warsaw 7158126673 Fixed the error reporting (raise of TestFailed) for the zip() and
zip(None) tests.  Found by Finn Bock a while ago.
2000-09-19 14:42:09 +00:00
Martin v. Löwis 6df27f8d1c Support sizehint in _fileobject.readlines, as documented. 2000-09-19 11:25:58 +00:00
Thomas Heller 543f2438ba Set the 'nt' installation scheme for the install command even if run
on other systems, so that data, headers, scripts are included in
the installer.
2000-09-19 11:10:23 +00:00
Martin v. Löwis a05fa1d9d4 Support sizehint in StringIO.readlines, as documented. 2000-09-19 11:07:44 +00:00
Guido van Rossum a3c6a8a30e Patch #101121, by Ka-Ping Yee: cosmetic cleanup of cgi.py, using my
style conventions.  (Ping has checkin privileges but apparently
ignores them at the moment.)

Ping improves a few doc strings and fixes style violations like foo ( bar ).

An addition of my own: rearrange the printing of various items in
test() so that the (long) environment comes at the end.  This avoids
having to scroll if you want to see the current directory or command
line arguments.
2000-09-19 04:11:46 +00:00
Guido van Rossum e7d6b0a22e An honest attempt to make this work on Unix, Windows, and even
Macintosh (the latter untested).

This closes Bug #110839.
2000-09-19 04:01:01 +00:00
Guido van Rossum d9a8e96543 Only supply popen2, popen3 when fork exists.
(This avoids defining non-working versions of these on the Mac.)
2000-09-19 03:04:52 +00:00
Jeremy Hylton 30f867423a Do not close socket when a Content-Length is 0. This make the
interface consistent: The client is responsible for closing the
socket, regardless of the amount of data received.

Restore suport for set_debuglevel call.
2000-09-18 22:50:38 +00:00
Paul Prescod 69cc7153c6 Test output that goes with updated test_minidom. 2000-09-18 20:44:15 +00:00
Fred Drake fd64c5908f Fix serious typo!
Add the new constants to the module docstring.
2000-09-18 19:38:11 +00:00
Paul Prescod 10d27660c9 Change assertions to confirmations so that optimization doesn't disable
checks.
2000-09-18 19:07:26 +00:00
Fred Drake 57a4e90922 Fix up the cleanup of the temporary DB so it works for BSD DB's
compatibility layer as well as "classic" ndbm.
2000-09-18 17:56:58 +00:00
Fred Drake a12adfe485 Reduce the number of imports needed.
Make the code conform better to the Python style guide.
2000-09-18 17:40:22 +00:00
Fred Drake 6b2320fa6b Richard Mortier <rmm1002@users.sourceforge.net>:
Add the constants "printable" and "punctuation" to the string module.
2000-09-18 16:46:17 +00:00
Fred Drake 6f6d51d050 Remove two unnecessary imports.
Update the module docstring to reflect the actual list of modules in the
xml.sax package.

Make the code better conform to the Python style guide.
2000-09-18 16:31:08 +00:00
Fred Drake c40cdf7238 Once we're done with the sys module, remove it from the namespace so
this module is "import *" safe.
2000-09-18 16:22:30 +00:00
Marc-André Lemburg 09cad08d75 sys.setdefaultencoding() should only be called in case the standard
default encoding ("ascii") is changed. This safes quite a few cycles
during startup since the first call to .setdefaultencoding() will
initialize the codec registry and the encodings package.

See python-dev for a discussion (Subject: "[Python-Dev] [comp.lang.python] sys.setdefaultencoding (2.0b1)").
2000-09-18 11:06:00 +00:00
Greg Ward 9082cdd009 Catch up to recent changes in TextFile (spotted by Bastian Kleineidam). 2000-09-18 00:41:10 +00:00
Greg Ward df9e6b8196 Fixed to respect 'define_macros' and 'undef_macros' on Extension object. 2000-09-17 00:54:58 +00:00
Greg Ward d283ce7364 Added 'expand_makefile_vars()' to (duh) expand make-style variables
in a string (gives you something to do with the dictionary returned
  by 'parse_makefile()').
Pulled the regexes in 'parse_makefile()' out -- they're now globals,
  as 'expand_makefile_vars()' needs (two of) them.
Cosmetic tweaks to 'parse_makefile()'.
2000-09-17 00:53:02 +00:00
Greg Ward 41ed12ffe9 Added 'read_setup_file()' to read old-style Setup files. Could make life
easier for people porting Makefile.pre.in-based extensions to Distutils.
Also loosened argument-checking in Extension constructor to make life
  easier for 'read_setup_file()'.
2000-09-17 00:45:18 +00:00
Tim Peters 077a11dd00 arraymodule: Fix SF bug 113960.
reverse() didn't work at all due to bad arg check.
    Fixed that.
    Added Brad Chapman to ACKS file, as the proud new owner of two
        implicitly copyrighted lines of Python source code <wink>.
    Repaired buffer_info's total lack of arg-checking.
    Replaced memmove by memcpy in reverse() guts, as memmove is
        often slower and the memory areas are guaranteed disjoint.
    Replaced poke-and-hope unchecked decl of tmp buffer size by
        assert-checked larger tmp buffer.
    Got rid of inconsistent spaces before open paren in docstrings.
    Added reverse() sanity tests to test_array.py.
2000-09-16 22:31:29 +00:00
Guido van Rossum 57d51f2f1d Improve the test output a bit. 2000-09-16 21:16:01 +00:00
Greg Ward acff0b3f3b Changed so lines that are all comment (or just whitespace + comment)
are completely skipped, rather than being treated as blank lines
(and then subject to the 'skip_blanks' flag).  This allows us
to process old-style Setup files, which rely on
  hello \\
  # boo!
  there
coming out as "hello there".
2000-09-16 18:33:36 +00:00
Greg Ward 3d05c16003 Andrew Kuchling:
Fixed precendence bug that meant setting skip_blanks to false didn't work
under some circumstances.
2000-09-16 18:09:22 +00:00
Greg Ward f11296bdea [change from 2000/08/11, propagating now to distutils copy]
Factored the guts of 'warn()' out to 'gen_error()', and added the
'error()' method (trivial thanks to the refactoring).
2000-09-16 18:06:31 +00:00
Greg Ward 60cd2864fe [change from 2000/04/17, propagating now to distutils copy]
Dropped the 'collapse_ws' option and replaced it with 'collapse_join' --
it's *much* faster (no 're.sub()') and this is the reason I really added
'collapse_ws', ie. to remove leading whitespace from a line being joined
to the previous line.
2000-09-16 18:04:55 +00:00
Greg Ward beb6d72f31 Rene Liebscher: if we have to run the same sub-command multiple times
(eg. "bdist_dumb", to generate both ZIP and tar archives in the same
run), tell all but the last run to keep temp files -- this just gets
rid of the need to pseudo-install the same files multiple times.
2000-09-16 16:04:59 +00:00
Greg Ward 3bfc8c8068 Renamed --keep-tree to --keep-temp. 2000-09-16 15:56:32 +00:00
Greg Ward 8099f0e5fc Renamed --clean to --no-keep-temp and --noclean to --keep-temp. 2000-09-16 15:54:18 +00:00
Greg Ward 8429036496 Renamed --keep-tree option to --keep-temp. 2000-09-16 15:53:41 +00:00
Greg Ward 24511d2a6e Ensure sub-commands of "install" are reinitialized too.
Run "install" the right way, by calling 'run_command()'.
2000-09-16 15:30:47 +00:00
Greg Ward 47ec20757d Remove some debugging output from the last change. 2000-09-16 15:27:17 +00:00
Greg Ward ecce14522c In 'reinitialize_subcommand()', pass 'reinit_subcommands' flag on to the
real implementation in Distribution.
2000-09-16 15:25:55 +00:00
Greg Ward f449ea51aa Generalized 'reinitialize_command()' so it can optionally reinitialize
the command's sub-commands as well (off by default).  This is essential if
we want to be be able to run (eg.) "install" twice in one run, as happens
when generating multiple built distributions in one run.
2000-09-16 15:23:28 +00:00
Greg Ward b3e0ad9804 Added the "sub-command" machinery to formalize the notion of "command
families" -- eg. install and its brood, build and its brood, and so forth.
Specifically: added the 'sub_commands' class attribute (empty list, sub-
classes must override it) and a comment describing it, and the
'get_sub_commands()' method.
2000-09-16 15:09:17 +00:00
Greg Ward fadefedb89 Factored the "sub-command" machinery out to Command. Mainly, this
meant removing 'get_sub_commands()', and moving the 'sub_commands' class
attribute to the end and restructuring it to conform to the new regime.
2000-09-16 15:06:57 +00:00
Tim Peters c1d65c34cf Repair senseless random.seed docstring (reported on c.l.py). 2000-09-16 04:02:48 +00:00
Greg Ward 53db8154e6 Tweaked the build temp dir names again. 2000-09-16 02:06:45 +00:00
Greg Ward e918b6fdb5 Typo fix. 2000-09-16 01:59:06 +00:00
Greg Ward 42900941b8 Include the Python version in the platform-specific build directories:
with the recent change in 'get_platform()', we now have directory names
like "build/lib-1.5-linux-i586".  Idea and original patch by
Rene Liebscher.
2000-09-16 01:54:46 +00:00
Greg Ward 9ae7c3c9a5 Document the directory separatory for include dir and library dir lists. 2000-09-16 01:44:45 +00:00
Neil Schemenauer a53cf79275 - add a new test
- document some of the tricky tests (hopefully correctly :)
2000-09-15 22:32:29 +00:00
Jeremy Hylton afde7e24b6 fix bug #110661 (PR#356) -- accept either & or ; as separator for CGI
query string
also some doc string reformatting and use of string methods instead of
    older string.splitfields
2000-09-15 20:06:57 +00:00
Paul Prescod 5c6bd31319 Fixed some typos. Removed one obsolete comment. 2000-09-15 18:38:47 +00:00
Paul Prescod ce88db0230 Fixed bug that disallowed processing instructions before and after
document element.
2000-09-15 17:09:19 +00:00
Jeremy Hylton be467e5c69 Fix Bug #114293:
Strings are unpickled by calling eval on the string's repr. This
    change makes pickle work like cPickle; it checks if the pickled
    string is safe to eval and raises ValueError if it is not.

test suite modifications:
    Verify that pickle catches a variety of insecure string pickles
    Make test_pickle and test_cpickle use exactly the same test suite
    Add test for pickling recursive object
2000-09-15 15:14:51 +00:00
Jack Jansen 344ecdb249 Before comparing os.uname() to BeOS check that os.uname actually exists:-) 2000-09-15 12:59:46 +00:00
Jack Jansen 8b7c3c0be7 For current directory use os.curdir, not ".". 2000-09-15 12:58:08 +00:00
Jack Jansen 00ce51e38e Allow am/pm as well as AM/PM (C9X behaviour). 2000-09-15 12:57:35 +00:00
Martin v. Löwis ff1ce0f44f Support \r in source files. Closes bug #101425. 2000-09-15 06:57:26 +00:00
Fred Drake d2a5ad25d5 Removed some debugging prints: When running user configuration code
from Tk.readprofile(), do not print anything extra to stdout, just run
the code.
2000-09-15 04:41:22 +00:00
Greg Ward bbba66eb7d Added 'warn_dir' option so other code can sneak in and disable
the sometimes inappropriate warning about where we're installing data files.
2000-09-15 01:21:07 +00:00
Greg Ward 9bd3e9b6b2 Adjust to the new sysconfig regime: use 'get_config_vars()' instead
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
  expanded in installation directories (preserving the stupid old names
  of 'sys_prefix' and 'sys_exec_prefix, though).
2000-09-15 01:20:10 +00:00
Greg Ward d602909128 Adjust to the new sysconfig regime: use 'get_config_var()' instead
of globals from sysconfig.
2000-09-15 01:19:03 +00:00
Greg Ward 59399bb303 Revamped 'get_platform()' to try and do something reasonably smart on
POSIX platforms, ie. get a little more detail than 'sys.platform' gives.
2000-09-15 01:16:14 +00:00
Greg Ward 879f0f11ba Changed from eager parsing of Makefile (at import time) to lazy: only do
all that work when someone asks for a "configuration variable" from the
Makefile.  Details:
  - added 'get_config_vars()': responsible for calling one of the
    '_init_*()' functions to figure things out for this platform,
    and to provide an interface to the resulting dictionary
  - added 'get_config_var()' as a simple interface to the dictionary
    loaded by 'get_config_vars()'
  - changed the '_init_*()' functions so they load the global dictionary
    '_config_vars', rather than spewing their findings all over
    the module namespace
  - don't delete the '_init_*()' functions when done importing
  - adjusted 'customize_compiler()' to the new regime
2000-09-15 01:15:08 +00:00
Greg Ward 3fff8d2969 Fixed so 'parse_makefile()' uses the TextFile class to ensure that
comments are stripped and lines are joined according to the backslash
convention.
2000-09-15 00:03:13 +00:00
Jeremy Hylton 30a818196e cope with weird Content-Length values returned from servers by
ignoring them; e.g. Zope sometimes returns 13497L
2000-09-14 20:34:27 +00:00
Jeremy Hylton 7ae51bf82d Remove "," from the list of always_safe characters. It is a reserved
character according to RFC 2396. Add some text to quote doc string
that explains the quoting rules better.

This closes SF Bug #114427.

Add _fast_quote operation that uses a dictionary instead of a list
when the standard set of safe characters is used.
2000-09-14 16:59:07 +00:00
Fred Drake e108a02723 Detlef Lannert <lannert@uni-duesseldorf.de>:
mailbox.py (from the CVS tree) doesn't work with qmail Maildirs:
Filenames are completed when the directories are scanned, and
the directory name is prepended again in the next() method.

Another suggestion: Change the print statement in the _test()
driver to show two more date characters (probably the length
has increased due to the recent Y2K hype ;). Now it shows the
complete date, including the seconds -- at least for me. (I've
also made the sender field left justified, in case it is ever
shorter than the field width).
2000-09-14 14:44:43 +00:00
Greg Ward 3a0310a328 Added --force (-f) option to force installation (including bytecode
compilation).
2000-09-13 01:02:25 +00:00
Greg Ward 1830b21186 Bump version to 0.9.3pre. 2000-09-13 00:44:09 +00:00
Greg Ward d75a276026 Fix install directories on Mac OS: now everything goes to
<prefix>:Lib:site-packages.
2000-09-13 00:12:11 +00:00
Greg Ward 7ac743bd72 Bastian Kleineidam: fix so it cleans up the temporary script-building
directory too.  Also generally cleaned up the code.
2000-09-12 00:07:49 +00:00
Guido van Rossum 94bf62f9c0 Deleted ancient file. 2000-09-11 22:08:27 +00:00
Fred Drake 526a18235a Untabify. When compiling in -tt mode, an inconsistent Tab use error
was raised.  This occurred during installation.
2000-09-11 04:00:46 +00:00
Greg Ward 8fd7ba2c6a Delete some debugging prints. 2000-09-11 00:50:37 +00:00
Greg Ward 20283e5cc3 Added --plat-name option to override sysconfig.get_platform() in
generated filenames.
2000-09-11 00:47:35 +00:00
Greg Ward d0e4b42ee2 Added --python and --fix-python options for better control over what
interpreter the .spec file refers to.
Cosmetic tweaks.
2000-09-10 01:21:27 +00:00
Thomas Heller ecaf0d8b47 The installer now displays info about version of distutils
used to create the distribution and the creation date.

Takes care of the extra_path argument to the setup function,
installs the modules into <prefix>/extra_path and creates
a -pth file (like install_lib does).
2000-09-09 21:15:12 +00:00
Thomas Heller b943840a78 The windows installer must also look under the HKEY_CURRENT_USER key
for python installations, not only under HKEY_LOCAL_MACHINE.
2000-09-09 19:52:49 +00:00
Fred Drake b37bdc2c7c Do not try to fix bugs while sleeping.
Paid more attention to the comments on the report; Martin suggested just
not having a __del__() method, which makes more sense in this case.  So
I have removed it.

This closes SourceForge bug #113850.  Again.
2000-09-09 06:29:35 +00:00
Fred Drake 16c4aa441b Kevin Jacobs <jacobs@darwin.cwru.edu>:
The posixfile __del__ method attempts to close the file (_file_) it
contains. However, if the open() method fails, then _file_ is never
assigned.

This closes SourceForge bug #113850.
2000-09-09 06:26:40 +00:00
Andrew M. Kuchling da85a272a6 Match Sam Rushing's current version of asyncore.py and asynchat.py
(SF patch 101447, fixing PR#113704)
2000-09-08 20:30:39 +00:00
Fred Drake 72e48bd05f Add test cases to make sure we get the right SyntaxError message for
various illegal uses of "continue".
2000-09-08 16:32:34 +00:00
Martin v. Löwis 0d8ce6111c Fix for bug 110629: Generate unique image names by introducing a counter 2000-09-08 16:28:30 +00:00
Thomas Heller 904ca11a87 Changes:
distutils/command/bdist_wininst.py:
- the windows installer is again able to compile after installing
  the files. Note: The default has changed, the packager has to
  give --no-target-compile/--no-target-optimize to NOT compile
  on the target system. (Another note: install_lib's --compile
  --optimize options have the same semantics to switch off
  the compilation. Shouldn't the names change?)
- All references to specific python versions are gone.
- A small bug:
    raise DistutilsPlatformError ("...")
  instead of
    raise DistutilsPlatformError, ("...")
- When bdist_wininst creates an installer for one specific python
  version, this is reflected in the name:
    Distutils-0.9.2.win32-py15.exe instead of
    Distutils-0.9.2.win32.exe
- bdist_wininst, when run as script, reads the wininst.exe file
  and rewrites itself. Previously this was done by hand.

misc/install.c
- All the changes needed for compilation
- Deleted a lot of debug/dead code
2000-09-07 15:59:22 +00:00
Fredrik Lundh a249f16af0 Older Tk versions don't support mousewheel support. Set event.delta
to zero if that's the case (closes bug #113727)
2000-09-07 15:05:09 +00:00
Marc-André Lemburg f156a44e8c Added Unicode objects to the copy mechanism. Since these are immutable,
they are copied as atomic types.
2000-09-07 11:00:03 +00:00
Greg Ward 8d5b5ec513 Typo fix. 2000-09-07 02:38:42 +00:00
Guido van Rossum 00c09256d5 Removing this file again to set its status to 'dead'. 2000-09-07 02:02:56 +00:00
Greg Ward 5fad268ffc Bullet-proofing of 'make_release_tree()':
- 'mkpath()' the distribution dir in case of empty manifest
  - warn if empty manifest
  - detect, warn about, and skip non-regular files in manifest
2000-09-06 02:18:59 +00:00
Greg Ward d3b76a8fbf Reorganized logic in 'get_file_list()' so it's easier to read, and fixed a
bug to boot: now works even if both MANIFEST and MANIFEST.in don't exist.
Don't hardcode setup.py, use 'self.distribution.script_name'.
2000-09-06 02:08:24 +00:00
Greg Ward 6a2035d76b Typo fix. 2000-09-06 02:06:27 +00:00
Guido van Rossum e2ab1451cf The usual. 2000-09-05 04:49:50 +00:00
Guido van Rossum d1252395bd Add new builtin commands "copyright", "license", "credits" which
display the information you would expect them to display.
2000-09-05 04:39:55 +00:00
Guido van Rossum 1d105d15d3 For this server to work on Windows, directories should use "/" as the
separator in the href, not os.sep.

Added a <title> tag to directory listings.

Bumped version to 0.5.
2000-09-04 15:55:31 +00:00
Tim Peters 50699215f8 test_mmap wrote null bytes into its expected-output file; this caused me to
waste an hour tracking down an illusion; repaired it; writing/reading non-
printable characters (except \t\r\n) into/outof text-mode files ain't
defined x-platform, and at least some Windows text editors do surprising
things in their presence.
Also added a by-hand "build humber" to the Windows build, in an approximation
of Python's inexplicable BUILD-number Unix scheme.  I'll try to remember to
increment it each time I make a Windows installer available.  It's starting
at 2, cuz I've put 2 installers out so far (both with BUILD #0).
2000-09-04 07:34:06 +00:00
Andrew M. Kuchling 2cb176f327 Correct docstring about return value when group didn't participate in match
(pointed out by /F)
2000-09-04 03:19:48 +00:00
Guido van Rossum 1d62f492b0 Hack the Windows code to use os.popen().
The returned file is assigned to an instance variable;
otherwise the implied close hangs for a long time.
2000-09-03 17:12:50 +00:00
Fredrik Lundh 03dd010b4f updated SRE test suite (fixes PEP223 problem, shows syntax errors) 2000-09-03 10:43:16 +00:00
Tim Peters acee48628d Repair failing test_sre.py.
This was a funny one!  The test very subtly relied on 1.5.2's
behavior of treating "\x%" as "\x%", i.e. ignoring that was an
\x escape that didn't make sense.  But /F implemented PEP 223,
which causes 2.0 to raise an exception on the bad escape.
Fixed by merely making the 3 such strings of this kind into
raw strings.
2000-09-03 08:15:19 +00:00
Fredrik Lundh 510c97ba2f return -1 for undefined groups (as implemented in 1.5.2) instead of
None (as documented) from start/end/span.  closes bug #113254
2000-09-02 16:36:57 +00:00
Fredrik Lundh 143328ba63 -- tightened up parsing of octal numbers
-- improved the SRE test harness: don't use asserts, test a few more
   things (including more boundary conditions)
2000-09-02 11:03:34 +00:00
Tim Peters 17289426e2 SourceForge patch 101396, by an anonymous friend.
"sre_parse.py missing '7' in DIGITS"
2000-09-02 07:44:32 +00:00
Jeremy Hylton 92f3972090 patch by Neil Schemenauer to improve (fix?) line number generation 2000-09-01 20:47:37 +00:00
Tim Peters 3620857d60 The "more" cmd varies across Windows flavors, sometimes adding stray
newlines at the start or end.  Fiddle test_popen2 and popen2._test() to
tolerate this.  Also change all "assert"s in these tests to raise
explicit exceptions, so that python -O doesn't render them useless.
Also, in case of error, make the msg display the reprs of what we
wrote and what we read, so we can tell exactly why it's failing.
2000-09-01 20:38:55 +00:00
Jeremy Hylton 2051608616 Update magic number.
Fix import support to work with import as variant of Python 2.0.  The
grammar for import changed, requiring changes in transformer and code
generator, even to handle compilation of imports with as.
2000-09-01 20:33:26 +00:00
Guido van Rossum 6f8f92f535 Adding new files, removing some. 2000-09-01 19:27:34 +00:00
Guido van Rossum 8d691c8422 The usual 2000-09-01 19:25:51 +00:00
Barry Warsaw 3a9d0611fb Applying patch #100994 to allow JPython to use more of the standard
Python test suite.  Specifically,

- import time instead of strop in test_b1

- test for ClassType of exceptions using isinstance instead of
  equality in test_exceptions

- remove __builtins__ from dir() output in test_pkg

test_pkg output needs to be regenerated.
2000-09-01 06:53:52 +00:00
Barry Warsaw 5bf94a0b77 Applied patch #101350, closing it. 2000-09-01 06:40:07 +00:00
Barry Warsaw 100d81e8e3 Added support for RFC 959's REST command (restart), closing SF patch
#101187, which some modifications.  Specifically,

ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
`rest' argument, which if not None, is used as the argument to an FTP
REST comman dbefore the socket is returned.  Differences from the SF
patch:

- always compare against None with `is' or `is not' instead of == or !=

- no parens around conditional

- RFC 959 defines the argument to REST is a string containing any
  ASCII characters in the range [33..126].  Therefore, we use the %s
  format character instead of %f or %d as suggested in the patch's
  comments.  Note that we do /not/ sanity checkthe contents of the
  rest argument (but we'll document this in the library reference
  manual).
2000-09-01 06:09:23 +00:00
Guido van Rossum 6aefd91c7f Now that StreamRequestHandler defaults rfile to buffered, make it
unbuffered (by setting the class variable rbufsize to 0), because we
(may) need to pass the file descriptor to the subprocess running the
CGI script positioned after the headers.
2000-09-01 03:27:34 +00:00
Guido van Rossum 01fed4d4e6 In class StreamRequestHandler, make the default buffering for rfile
and wfile class variables (that the instance can also override).
Change the default for rfile to buffered, because that seems to make a
big difference in performance on some platforms.

An anti-patch is needed to revert the effect in CGIHTTPServer.py which
I'll check in momentarily.
2000-09-01 03:25:14 +00:00
Tim Peters c638791d53 Repaired comment. 2000-09-01 02:20:20 +00:00
Greg Ward 1ac9802748 Rene Liebscher/Thomas Heller:
* ensure the "dist" directory exists
* raise exception if using for modules containing compiled extensions
  on a non-win32 platform.
* don't create an .ini file anymore (it was just for debugging)
2000-09-01 01:44:45 +00:00
Greg Ward cec1568625 Rene Liebscher:
* reverse library names from bcpp_library to library_bcpp
* move some code to the right places, to put the def-files
  in the right directories again
2000-09-01 01:28:33 +00:00
Greg Ward 7483d6803b Rene Liebscher: comment fixes. 2000-09-01 01:24:31 +00:00
Greg Ward 66e966f7bd Rene Liebscher: hack '_init_posix()' to handle the BeOS linker script.
(With a worry-wart comment added by me about where we *should* add the
Python library to the link.)
2000-09-01 01:23:26 +00:00
Greg Ward b3b6d395e4 Bump version to 0.9.2. 2000-09-01 01:00:40 +00:00
Greg Ward e3644e245e Added 'run_setup()' to allow outsiders to run a setup script under
fairly tight control, and the '_setup_stop_after' and '_setup_distribution'
globals to provide the tight control.

This isn't entirely reliable yet: it dies horribly with a NameError on the
example PIL setup script in examples/pil_setup.py (at least with Python
1.5.2; untested with current Python).  There's some strangeness going
on with execfile(), but I don't understand it and don't have time
to track it down right now.
2000-09-01 00:52:45 +00:00
Barry Warsaw 9a2d9d7f04 GNUTranslations._parse(): Fix portability problems on 64-bit machines
by masking all unsigned integers with 0xffffffff.
2000-08-31 23:28:52 +00:00
Fredrik Lundh 0c4fdbaee8 closes bug #112468 (and all the other bugs that surfaced when
I fixed the a bug in the regression test harness...)
2000-08-31 22:57:55 +00:00
Fred Drake 762c1cb3e3 Test case to exercise fix for error propogation bug in dictionarys. 2000-08-31 19:48:52 +00:00
Jeremy Hylton 6102e29df2 fixes bug #111951
applies patch #101369 by Moshe Zadke
use explicit list of always safe characters instead of string.letters
add test case
2000-08-31 15:48:10 +00:00
Barry Warsaw b76a55c278 GNUTranslations.BE_MAGIC: don't be so clever in calculating this from
LE_MAGIC; it breaks on Tru64.
2000-08-31 10:45:54 +00:00
Sjoerd Mullender 1c8feae411 New method getnamespace.
Since the application never gets to see the namespace abbreviation
used in the XML document, but some applications may need to know them,
we provide this method.
2000-08-31 10:27:00 +00:00
Jeremy Hylton 34bef2694f tg@freebsd.org
close SF patch #101354
2000-08-31 02:42:11 +00:00
Greg Ward 8a98cd9e25 Add /GX to 'compile_options'. This is definitely needed for C++ source;
according to the MS docs it enables exception-handling, and (according
to Alex Martelli <aleaxit@yahoo.com>) is needed to compile without
getting warnings from standard C++ library headers.  Apparently
it doesn't cause any problems with C code, so I haven't bothered
conditionalizing the use of /GX.
2000-08-31 00:31:07 +00:00
Greg Ward 408e9ae299 Add ".cxx" to the list of known C++ extensions. 2000-08-30 17:32:24 +00:00
Greg Ward 46a69b9c7f Added docstring for 'wrap()' function. 2000-08-30 17:16:27 +00:00
Skip Montanaro ad3bc44d52 patches from David Goodger. Closes patch 101085.
* deletes cache
* adds firstweekday and setfirstweekday functions that allow user to control
  which day of the week is first when displaying calendars
* adds month, week, calendar functions that return their results instead of
  printing them
* adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the
  ordinal values of the weekdays
2000-08-30 14:01:28 +00:00
Barry Warsaw 64dab4602e Expand the test suite to test both the GNU gettext and translation
class-based APIs.
2000-08-30 03:32:07 +00:00
Barry Warsaw 33d8d705b8 Finalize this module for Python 2.0 based on feedback and input from
Martin von Loewis, Peter Funk, James Henstridge, Francois Pinard, and
Marc-Andre Lemburg.
2000-08-30 03:29:58 +00:00
Andrew M. Kuchling d50a1877ee Fix for two problems on FreeBSD:
In test_poll1(), unregister file descriptors as they're closed,
    and also close the read end of the pipe
In test_poll2(), make the code assume less about the combinations of flag
    bits that will be returned
2000-08-29 16:53:34 +00:00
Guido van Rossum 2d21863266 Add support for FreeBSD-[45].
-- tg@FreeBSD.org
2000-08-29 14:57:27 +00:00
Guido van Rossum e504c0c2dc Patch by tg@FreeBSD.org to try /var/tmp first.
This helps on 4.4BSD-based systems.
2000-08-29 14:55:03 +00:00
Barry Warsaw 9182b45a5a Added tests of "print >> None" 2000-08-29 04:57:10 +00:00
Greg Ward 9821bf4e62 Added 'script_name' and 'script_args' instance attributes to Distribution.
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
  'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
  'self.distribution.script_name' rather than 'sys.argv[0]'.
2000-08-29 01:15:18 +00:00
Fred Drake 31f182e830 Added os.popen2() and os.popen3() for non-Windows platforms. 2000-08-28 17:20:05 +00:00
Greg Ward 6f9320b9d1 Fix line-endings.
Fix bad operator precedence: should be "(metadata or '') + '\n'".
2000-08-27 20:44:13 +00:00
Tim Peters c79519569d Open binary files in binary mode. Fixes test failure under Windows. 2000-08-26 21:01:27 +00:00
Moshe Zadka 617c43cafe Tim Peters:
Again due to the duplicate copies of test_support, the checked-in
"expected output" file actually contains verbose-mode output.
2000-08-26 09:59:01 +00:00
Tim Peters 43dee06471 Another new test using "from test.test_support import ...", causing
subtle breakage on Windows (the test is skipped here, but the TestSkipped
exception wasn't recognized as such, because of duplicate copies of
test_support got loaded; so the test looks like a failure under Windows
instead of a skip).
Repaired the import, but

        THIS TEST *WILL* FAIL ON OTHER SYSTEMS NOW!

Again due to the duplicate copies of test_support, the checked-in
"expected output" file actually contains verbose-mode output.  I can't
generate the *correct* non-verbose output on my system.  So, somebody
please do that.
2000-08-26 08:24:18 +00:00
Greg Ward 018cbb15c0 New release of the Windows installer from Thomas Heller.
The known bug (bogus error message when an empty file is
extracted) is fixed.

Other changes:

- The target-compile and target-optimize flags of bdist_wininst
  are gone. It is no longer possible to compile the python
  files during installation.
- The zlib module is no longer required or used by bdist_wininst.

- I moved the decompression/extraction code into a separate
  file (extract.c).

- The installer stub is now compressed by UPX (see
  http://upx.tsx.org/). This reduces the size of the exe
  (and thus the overhead of the final installer program)
  from 40 kB to 16 kB.

- The installer displays a more uptodate user wizard-like
  user interface, also containing a graphic: Just's Python Powered logo.
  (I could not convince myself to use one of the BeOpen logos).
- The installation progress bar now moves correctly.
2000-08-26 02:40:10 +00:00
Greg Ward 889de85d8b Bumped version to 0.9.2pre. 2000-08-26 02:37:07 +00:00
Greg Ward d8014e6608 In 'check_extensions_list()': when converting old-style 'buildinfo' dict,
don't assign None to any attributes of the Extension object.
2000-08-26 02:21:55 +00:00
Fred Drake 28f739aad4 Update the parser module to support augmented assignment.
Add some test cases.
2000-08-25 22:42:40 +00:00
Marc-André Lemburg 4ea8d6e52e Output of the new test 2000-08-25 22:37:51 +00:00
Marc-André Lemburg fa44d794bd New test suite for file objects by Jeremy Hilton. This will need
to be extended somewhat -- right now it only tests the .writelines()
method.
2000-08-25 22:37:31 +00:00
Moshe Zadka a1a4b5916b Closing patch #101120 -- After everyone agreed. 2000-08-25 21:47:56 +00:00
Barry Warsaw fa488ec2a0 _expand_lang(), _find(): Added support for unaliasing and expanded the
language found in the environment variable, contributed by James
Henstridge.
2000-08-25 20:26:43 +00:00