Commit Graph

3332 Commits

Author SHA1 Message Date
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
Barry Warsaw 1dce09da61 Group consensus is that supporting alternative locale categories is
useless.  So the test of the dcgettext() function is removed.
2000-08-25 19:53:51 +00:00
Barry Warsaw 84314b72d6 Group consensus is that supporting alternative locale categories is
useless.  So the category argument on _find() is removed, as is the
dcgettext() function.
2000-08-25 19:53:17 +00:00
Barry Warsaw ff6d813657 Set this test up so that we don't have to create xx/LC_MESSAGES in the
cvs tree.  It creates the directory and gettext.mo file on the fly,
from the base64 encode binary data.
2000-08-25 19:50:38 +00:00
Barry Warsaw e332c1f415 updated test output 2000-08-25 19:49:28 +00:00
Barry Warsaw dd46cb38ce output from test_gettext.py test suite 2000-08-25 19:15:00 +00:00
Barry Warsaw 9e03592149 Test suite for new gettext.py module. 2000-08-25 19:14:25 +00:00
Barry Warsaw 95be23dc86 Initial revision of gettext support for Python. This will undergo
some changes.
2000-08-25 19:13:37 +00:00
Sjoerd Mullender d7b86f0056 Pass data on to retrieve method.
Don't people *test* their changes?
2000-08-25 11:23:36 +00:00
Andrew M. Kuchling 3227cc8c09 Test suite for poll() interface (SF patch #100852) 2000-08-25 01:18:45 +00:00
Thomas Wouters 6af3b37021 Add missing opcodes. Thanx to jeremy for reminding me ;) 2000-08-24 22:44:53 +00:00
Peter Schneider-Kamp fa12e13ae7 simple typo that makes regression test test_userstring fail 2000-08-24 21:47:34 +00:00
Thomas Wouters e1519a1b4d Update for augmented assignment, tested & approved by Guido. 2000-08-24 21:44:52 +00:00
Thomas Wouters 34052622c9 Update for augmented assignment. 2000-08-24 21:08:39 +00:00
Thomas Wouters 104a7bcc28 Support for augmented assignment in the UserList, UserDict, UserString and
rfc822 (Addresslist) modules. Also a preliminary testcase for augmented
assignment, which should actually be merged with the test_class testcase I
added last week.
2000-08-24 20:14:10 +00:00
Guido van Rossum ba3113807d Promote the server version from a local variable to a class variable,
so that a subclass can override it.

This partly addresses Bug #112634 -- but the documentation is still
wrong, since it suggests that you can set self.version *after* calling
the base class __init__.  In fact it must be done *before*.

I'll fix that too.
2000-08-24 16:18:04 +00:00
Fred Drake ff5364ac9d Whitespace cleanup; now passes the regression test (the last checkin made
it fail on a TabError (inconsistent tab/space usage)).

Removed a comment about including a test since there is a regression test
for this module.
2000-08-24 14:40:35 +00:00
Andrew M. Kuchling 103d5268c2 Updated test suite: test repr() and str() of cookies, and test metadata
fields with quoted values (as in Path="/acme")
2000-08-24 11:56:19 +00:00
Andrew M. Kuchling 0b29b11187 Updated version of Cookie.py (rev. 2.29) from timo 2000-08-24 11:52:33 +00:00
Fred Drake 316a793a58 Randall Hopper <aa8vb@yahoo.com>>:
Make it easier to use HTTP POST with urlretrieve().
2000-08-24 01:01:26 +00:00
Fred Drake 33438d23fa Charles G. Waldman <cgq@fnal.gov>:
Update the test suite for the changes introduced by the EXTENDED_ARG
opcode.

This closes the regression test changes of SourceForge patch #100893.
2000-08-24 00:35:38 +00:00
Fred Drake ef8ace3a6f Charles G. Waldman <cgw@fnal.gov>:
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit.  This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.

This closes the implementation portion of SourceForge patch #100893.
2000-08-24 00:32:09 +00:00
Jeremy Hylton cf29bb2aa9 style nits 2000-08-23 21:11:05 +00:00
Fred Drake 27c4b39025 When skipping a test, do not include a spurious space between the exception
name and the ":" that separates it from the value.  (Minor cleanup.)
2000-08-23 20:34:40 +00:00
Jeremy Hylton 4d746fca3d add docstring explaining makefile limitation
fix support for passing http version to connect in HTTP
2000-08-23 20:34:17 +00:00
Skip Montanaro 9dcea3f8a8 test case output for dospath regr test 2000-08-23 20:07:21 +00:00
Skip Montanaro 640f483c50 new test - like test_ntpath but without splitunc test cases 2000-08-23 16:55:00 +00:00
Skip Montanaro 877d62e72d added commonprefix test cases 2000-08-23 16:54:27 +00:00
Skip Montanaro 533bc9ad42 updated to correct failing test cases 2000-08-23 16:51:56 +00:00
Jack Jansen 03c06ee7fc Restored commonprefix() semantics. 2000-08-23 09:13:40 +00:00
Tim Peters a48b526745 Rehabilitate autotest.py.
In README:  Write up (Guido's) rules for intra-test imports; warn against
asserts; document test_support.use_large_resources.
2000-08-23 05:28:45 +00:00
Skip Montanaro 623583165e revert semantics of commonprefix to work character-by-character 2000-08-22 13:01:53 +00:00
Skip Montanaro 79f1c1778d * added doc strings to urlopen and unquote_plus
* fixed type in doc string for quote
2000-08-22 03:00:52 +00:00
Skip Montanaro 46dfa5f4ed require list comprehensions to start with a for clause 2000-08-22 02:43:07 +00:00
Guido van Rossum 2823f03a56 Patch by Toby Dickenson: don't die when an error occurs during string
conversion in an exception, but instead display <unprintable %s
object> where %s is the type name.
2000-08-22 02:04:46 +00:00
Greg Ward 986659fffe Don't bother to 'mkpath()' the 'dist_dir' -- that's now taken care of
in archive_util.py.
2000-08-22 01:49:41 +00:00
Greg Ward 04e25a1bdf Ensure destination directory exists before trying to create a tarball
or ZIP file.
2000-08-22 01:48:54 +00:00
Guido van Rossum ff18b800a4 Don't reference a module named test.test_support. Always use plain
test_support.  Also fixed the expected output.
2000-08-21 22:59:29 +00:00
Fred Drake 79ca79d1a9 Add a minimal test suite for the parser module. 2000-08-21 22:30:53 +00:00
Fred Drake a893957c8e Denis S. Otkidach <den@analyt.chem.msu.ru>:
Let UserString.translate() method work with unicode data.

This closes SourceForge patch #101246.
2000-08-21 21:47:20 +00:00
Fred Drake 567ca8e732 Patch from Paul Schreiber <paul@commerceflow.com>:
Patch description
-----------------
This addresses four issues:

(1) usernames and passwords in urls with special characters are now
    decoded properly. i.e. http://foo%2C:bar@www.whatever.com/

(2) Basic Auth support has been added to HTTPS, like it was in HTTP.

(3) Version 1.92 sent the POSTed data, but did not deal with errors
    (HTTP responses other than 200) properly. HTTPS now behaves the
    same way HTTP does.

(4) made URL-checking beahve the same way with HTTPS as it does with
    HTTP (changed == to !=).
2000-08-21 21:42:42 +00:00
Barry Warsaw 203da6dfe4 Add the new PRINT_ITEM_TO and PRINT_NEWLINE_TO opcodes. 2000-08-21 17:18:40 +00:00
Fred Drake 62c53ddabe Add TestSkipped as another interesting item defined by test_support. 2000-08-21 16:55:57 +00:00
Barry Warsaw efc92eec33 PEP 214, Extended print Statement, has been accepted by the BDFL.
Additional test cases for the extended print form.
2000-08-21 15:46:50 +00:00
Tim Peters e82e7ccdbd Remove the winreg module from the project. I don't believe any
docs changes are needed (only reference to winreg I could find
was in libwinreg.tex, which is documenting _winreg, and merely
mentions that a higher-level winreg module *may* appear someday;
that's still true).
2000-08-21 02:27:22 +00:00
Tim Peters 84f28db66a Changed the popen2.py _test function to use the "more" cmd when
os.name == "nt".  This makes test_popen2 pass under Win98SE.
HOWEVER, the Win98 "more" invents a leading newline out
of thin air, and I'm not sure that the other Windows flavors
of "more" also do that.
So, somebody please try under other Windows flavors!
2000-08-20 05:57:36 +00:00
Tim Peters 571bb8fc72 David Goodger's new getopt test module (thanks, David!).
https://sourceforge.net/patch/?func=detailpatch&patch_id=101110&group_id=5470
Accepted as-is, except for purging an "import *".
2000-08-20 04:18:40 +00:00
Moshe Zadka 514a1028a2 Adding tests of the "attrs" optional argument, and of the js_output
functionality.
2000-08-19 15:57:33 +00:00
Andrew M. Kuchling cdec8c746b Test case for Cookie.py 2000-08-19 15:21:12 +00:00
Andrew M. Kuchling 52ea872777 Added Tim O'Malley's Cookie.py module (master version at
http://www.timo-tasi.org/python/Cookie.py)
This is revision 2.26 according to Tim's RCS history.
2000-08-19 13:01:19 +00:00
Fred Drake 8ae9ce5e5b Better conformance to the Python Style Guide: use spaces around operators. 2000-08-18 16:09:56 +00:00
Fred Drake fe5c22a85e When a KeyboardInterrupt is caught, just use the "raise" syntax to
re-raise it instead of re-raising it "manually" the ugly way.
2000-08-18 16:04:05 +00:00
Fred Drake 7b4fc17c6d Revise to use atexit instead of monkeying with sys.exitfunc directly. 2000-08-18 15:50:54 +00:00
Fred Drake def003845b Convert some old-style string exceptions to class exceptions. 2000-08-18 14:59:33 +00:00
Fred Drake b65b006595 Convert some old-style string exceptions to class exceptions. 2000-08-18 14:50:20 +00:00
Fred Drake 4148877acf Update to reflect the recent Grammar changes. 2000-08-17 23:08:05 +00:00
Thomas Wouters 5215225ea1 Apply SF patch #101135, adding 'import module as m' and 'from module import
name as n'. By doing some twists and turns, "as" is not a reserved word.

There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
2000-08-17 22:55:00 +00:00
Thomas Wouters 1d75a79c00 Apply SF patch #101029: call __getitem__ with a proper slice object if there
is no __getslice__ available. Also does the same for C extension types.
Includes rudimentary documentation (it could use a cross reference to the
section on slice objects, I couldn't figure out how to do that) and a test
suite for all Python __hooks__ I could think of, including the new
behaviour.
2000-08-17 22:37:32 +00:00
Fred Drake 227b120468 Convert some old-style string exceptions to class exceptions. 2000-08-17 05:06:49 +00:00
Fred Drake 9b8d801c37 Convert some old-style string exceptions to class exceptions. 2000-08-17 04:45:13 +00:00
Peter Schneider-Kamp 2d2785aad1 updated occurences of fqdn algorithm (closes patch #101197) 2000-08-16 20:30:21 +00:00
Fred Drake 0ebc1c6952 Use socket.getfqdn() instead of defining make_fqdn(). 2000-08-16 14:26:22 +00:00
Fred Drake a6070f0221 Revise the wrapper structure for the socket module:
socket.py is used for all platforms, and it defines the additional
classes and alternate socket() function for Windows and BeOS systems.

The plat-*/socket.py files are no longer needed, since there is a
shared socket.py.

make_fqdn() is provided, but I decided to call it getfqdn() to be
consistent with the other names in the socket module.  Since it is
really a "get" operation and does not create a new name, this is
the right name to give it.

Move the docstring here from the _socket module.
2000-08-16 14:14:32 +00:00
Thomas Wouters caa658d047 Apply SF patch #101151, by Peter S-K, which fixes smtplib's passing of the
'helo' and 'ehlo' message, and exports the 'make_fqdn' function. This
function should be moved to socket.py, if that module ever gets a Python
wrapper.
2000-08-15 19:30:36 +00:00
Fred Drake 56221a7cfa Chris Herborth <chrish@pobox.com>:
Minor updates for BeOS R5.

Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding
change in BeOS/README (by Fred).

This closes SourceForge patch #100978.
2000-08-15 18:52:33 +00:00
Fred Drake a64436e853 Update test output to reflect change in SyntaxError formatting.
This closes SourceForge bug #110628 (Jitterbug PR#278).
2000-08-15 15:51:18 +00:00
Greg Ward f40ff1b8b2 Bump version to 0.9.1. 2000-08-15 13:14:27 +00:00
Greg Ward 44a980dff9 Fixed the move-RPM-files hack so it knows about the '--binary-only' and
'--source-only' options.
2000-08-15 13:05:35 +00:00
Greg Ward a12c195064 Added support for the '--dist-dir' option, including a mildly nasty
hack to find the two created RPM files (source and binary) and
move them to the "dist dir" (default "dist").
2000-08-15 13:03:16 +00:00
Greg Ward c0fe82ca26 Fix long-hidden inconsistency in internal interface: 'find_modules()' now
represents packages as strings, not tuples.  This allowed a simplification
in 'get_package_dir()', too -- can now assume that 'package' is a string.
2000-08-15 13:01:25 +00:00
Barry Warsaw 97ca66fd57 tests for binascii.b2a_hex() and binascii.a2b_hex(). 2000-08-15 06:08:31 +00:00
Barry Warsaw 3fdcccb82f Added a test of the md5.hexdigest() method. Funny enough, this test
had yet-another Python implementation of a binary-data-to-hex-digit
encoder!
2000-08-15 06:01:36 +00:00
David Scherer 7aced17437 Initial revision 2000-08-15 01:13:23 +00:00
Mark Hammond 041307d95c Remove the test for abspath with an empty path - too hard to do in a cross-platform manner. 2000-08-14 23:06:37 +00:00
Mark Hammond 673c6cf3d4 Test for fix to bug #110673: os.abspatth() now always returns os.getcwd() on Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName()) 2000-08-14 06:21:26 +00:00
Mark Hammond 647d2fe145 Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName()) 2000-08-14 06:20:32 +00:00
Mark Hammond 0d0b1e93e1 Check in the correct output - even though the module itself may not survive! 2000-08-14 06:05:40 +00:00
Greg Ward e8e9d11453 Overhauld 'check_config_h()': now returns a (status, details) tuple,
and is much better documented to boot.
2000-08-13 01:18:55 +00:00
Greg Ward 1398045136 Added a whinging comment about the ugliness of constructing the BCPP
argument list.
2000-08-13 00:54:39 +00:00
Greg Ward b1dceae3df Rene Liebscher:
* use self.debug_print() for debug messages
  * uses now copy.copy() to copy lists
  * added 'shared_lib_extension=".dll"', ... , this is necessary if you
    want use the compiler class outside of the standard distutils build
    process.
  * changed result type of check_config_h() from int to string
2000-08-13 00:43:56 +00:00
Greg Ward a4662bc1bc Rene Liebscher:
* changed some list.extend([...]) to list.append(...)
  * added '/g0' to compiler_options, so compiler doesn't
    stop after 100 warnings
2000-08-13 00:43:16 +00:00
Greg Ward a35c931eb2 get_export_symbols() changed, adds now module init function if not given
by the user.
2000-08-13 00:42:35 +00:00
Greg Ward 1f6a0d4568 Rene Liebscher: ext.export_symbols is now always a list (added 'or []'). 2000-08-13 00:41:40 +00:00
Greg Ward 45b87bc96d Typo fix in docstring. 2000-08-13 00:38:58 +00:00
Greg Ward 29124ff4f2 Fix references to functions formerly imported from 'util'. 2000-08-13 00:36:47 +00:00
Thomas Wouters 46cc7c0f7b Bring Tools/compiler almost up to date. Specifically:
- fix tab space issues (SF patch #101167 by Neil Schemenauer)
- fix co_flags for classes to include CO_NEWLOCALS (SF patch #101145 by Neil)
- fix for merger of UNPACK_LIST and UNPACK_TUPLE into UNPACK_SEQUENCE,
  (SF patch #101168 by, well, Neil :)
- Adjust bytecode MAGIC to current bytecode.

TODO: teach compile.py about list comprehensions.
2000-08-12 20:32:46 +00:00
Andrew M. Kuchling c7ef59128b Updated this module after the recent grammar changes 2000-08-12 19:09:14 +00:00
Skip Montanaro 803d6e5451 list comprehensions. see
http://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470

for details.
2000-08-12 18:09:51 +00:00
Thomas Wouters 0be5aab04d Merge UNPACK_LIST and UNPACK_TUPLE into a single UNPACK_SEQUENCE, since they
did the same anyway.

I'm not sure what to do with Tools/compiler/compiler/* -- that isn't part of
distutils, is it ? Should it try to be compatible with old bytecode version ?
2000-08-11 22:15:52 +00:00
Trent Mick f29f47b38b Add largefile support for Linux64 and WIn64. Add test_largefile and some minor
change to regrtest.py to allow optional running of test_largefile ('cause it's
slow on Win64).

This closes patches:
http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470
and
http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470
2000-08-11 19:02:59 +00:00
Sjoerd Mullender d2653a9e07 Use built in function filter instead of doing it laboriously by hand. 2000-08-11 07:48:36 +00:00