Guido van Rossum
309b566704
metaclass(): add tests for metaclasses written in Python: one that
...
subclasses type, one that doesn't (the latter isn't fully functional
yet).
2001-08-17 11:43:17 +00:00
Barry Warsaw
f6365e0107
Added a test for module repr truncation when the package name is
...
really long. Closes SF bug #437984 .
2001-08-16 20:42:38 +00:00
Guido van Rossum
501c7c7d0e
classobject.c:instancemethod_descr_get(): when a bound method is
...
assigned to a class variable and then accessed via an instance, it
should not be rebound.
test_descr.py:methods(): test for the condition above.
2001-08-16 20:41:56 +00:00
Andrew M. Kuchling
db7aed5219
[Patch #441691 ] preprocess() method for Borland C compiler.
...
I have no way of testing this.
2001-08-16 20:17:41 +00:00
Tim Peters
4d2dded044
test_descr started breaking in yet another way in the same place.
2001-08-16 19:50:51 +00:00
Fred Drake
3791838339
New unit test for the mimetypes module, to avoid future regressions.
2001-08-16 18:36:59 +00:00
Fred Drake
c81a06998f
Another egregious error that copied the encodings info over the suffix
...
info. Caught by the tests that I'm writing now.
2001-08-16 18:14:38 +00:00
Martin v. Löwis
c47016ee74
Use (c)StringIO for collecting bytes. Fixes bug #451622 .
2001-08-16 17:06:44 +00:00
Tim Peters
63a8d69476
Repair some accidents causing Windows failures:
...
+ test_compare. While None compares less than anything else, it's not
always the case that None has the smallest id().
+ test_descr. The output of %p (pointer) formats varies across platforms.
In particular, on Windows it doesn't produce a leading "0x".
2001-08-16 16:56:16 +00:00
Fred Drake
c019ecb7fe
Bad bug: the MimeTypes.readfp() was supposed to take a file object as a
...
parameter, but did not. This was found because it can create failures
elsewhere based on the presence of mime.types files in some common locations
the module searches by default.
(I will be writing a test for this module shortly!)
2001-08-16 15:54:28 +00:00
Andrew M. Kuchling
b1d6029437
[Patch #444854 from twburton]
...
Add executable extension, needed to get the program name right on Win32
2001-08-16 14:08:02 +00:00
Andrew M. Kuchling
6fb8d3a3d6
[Patch #442530 from twburton]
...
Provide include_dirs argument to all calls to ._preprocess and ._compile
Fix typo: pattern.search(pattern) should be pattern.search(line)
2001-08-16 13:56:40 +00:00
Guido van Rossum
297abadc6b
The change of type(None).__name__ from 'None' to 'NoneType' broke this
...
test in a trivial way. Fixed.
2001-08-16 08:32:39 +00:00
Guido van Rossum
a4ff6ab093
Add tests for overridable operators that have default interpretations
...
(__hash__ etc.), in static and dynamic classes, overridden and
default.
2001-08-15 23:57:59 +00:00
Just van Rossum
ba634b2ec3
Rewrote Jack's latest change so it does what it intended to do...
2001-08-15 21:20:42 +00:00
Guido van Rossum
28962cc0ea
Given a class without __cmp__ or __eq__, cmp() of two instances of
...
that class should compare the id() of those instances. Add a test
that verifies this. This test currently fails; I believe this is
caused by object.c:2.132 (Patch #424475 by loewis).
2001-08-15 21:02:20 +00:00
Guido van Rossum
b5a136b05d
Add a test to verify that bound methods work correctly.
2001-08-15 17:51:17 +00:00
Jack Jansen
31b5323c84
Don't remove non-directories from sys.path on the mac: files
...
can be on sys.path too.
2001-08-15 12:07:46 +00:00
Tim Peters
e5614630fb
Move one of the tests into the "PEP 255" section, to reflect a change in
...
the PEP.
2001-08-15 04:41:19 +00:00
Jeremy Hylton
9272b14d62
Fix typo in astgen script
2001-08-14 21:18:30 +00:00
Guido van Rossum
80e36750c8
Add a test for a weird bug I just discovered: a dynamic subclass
...
doesn't have a __dict__!
2001-08-14 20:00:33 +00:00
Jeremy Hylton
7713ac2ff1
Regenerated from new ast.txt and new astgen.py
2001-08-14 18:59:01 +00:00
Barry Warsaw
033daa49ea
Test the new semantics for setting and deleting a function's __dict__
...
attribute. Deleting it, or setting it to a non-dictionary result in a
TypeError. Note that getting it the first time magically initializes
it to an empty dict so that func.__dict__ will always appear to be a
dictionary (never None).
Closes SF bug #446645 .
2001-08-14 18:28:28 +00:00
Barry Warsaw
b9c1d3dedf
reload(exceptions) should not raise an ImportError, but should act
...
just like reload(sys). Test that this is so. Closes SF bug #422004 .
2001-08-13 23:07:00 +00:00
Tim Peters
04601063e8
Repair Unix-specific assumptions that caused this to fail on Windows.
2001-08-13 22:25:24 +00:00
Barry Warsaw
406d46e185
found_terminator(): Add a debug print showing the data.
2001-08-13 21:18:01 +00:00
Fred Drake
3a28ca8fb8
Nick Mathewson: test suite for the class browser support module.
2001-08-13 20:26:19 +00:00
Fred Drake
03f7a70345
Nick Mathewson: Make sure the recursion is handled properly.
...
This is part of SF patch #440292 .
2001-08-13 20:20:51 +00:00
Guido van Rossum
97dbec97bc
Remove redundant import (PyChecker).
...
Update greeting message to avoid the long copyright notice.
2001-08-13 15:58:26 +00:00
Guido van Rossum
4a5555b19d
Remove unused variable 'imports' from readmodule_ex().
2001-08-13 15:55:19 +00:00
Guido van Rossum
8f15bd8500
Remove redundant 'import string' (PyChecker).
2001-08-13 15:48:06 +00:00
Guido van Rossum
ef8f4dee07
Remove redundant imports (PyChecker).
2001-08-13 15:37:02 +00:00
Guido van Rossum
a79bbaca54
Remove redundant 'import sys' (PyChecker).
2001-08-13 15:34:41 +00:00
Guido van Rossum
f9f48812d0
Remove two redundant statements (PyChecker).
2001-08-13 15:30:22 +00:00
Guido van Rossum
bfbc18dbf9
Remove redundant assignment l = [] from poll3() -- copy-and-paste
...
error.
2001-08-13 15:21:55 +00:00
Guido van Rossum
8710681400
Commenting out the getfillable() method -- it's broken, and nobody
...
remembers what it is supposed to do. :-(
2001-08-13 15:04:33 +00:00
Andrew M. Kuchling
7c2cf73811
Remove redefinition of has_option() method
2001-08-13 14:58:32 +00:00
Andrew M. Kuchling
8ea9227b1b
Remove empty __init__ (PyChecker)
2001-08-13 14:55:17 +00:00
Andrew M. Kuchling
f31d31373e
Remove redefinition of writelines() method
...
Remove unused variable and import
2001-08-13 14:54:12 +00:00
Andrew M. Kuchling
77f9caf633
Remove unused variable (PyChecker)
2001-08-13 14:52:37 +00:00
Andrew M. Kuchling
1f877ef199
Remove some dead code (PyChecker)
2001-08-13 14:50:44 +00:00
Andrew M. Kuchling
86c7e22036
Add forgotten import (PyChecker)
2001-08-13 14:47:12 +00:00
Andrew M. Kuchling
e7abf97903
Remove unused import (PyChecker)
2001-08-13 14:43:43 +00:00
Andrew M. Kuchling
6be424fdd6
Remove redundant import
2001-08-13 14:41:39 +00:00
Andrew M. Kuchling
994b51e906
Capture exception message (PyChecker)
2001-08-13 14:40:47 +00:00
Andrew M. Kuchling
a49e0a0893
Remove unused imports (PyChecker)
2001-08-13 14:40:29 +00:00
Andrew M. Kuchling
3e44248483
Remove unused variable
2001-08-13 14:38:50 +00:00
Andrew M. Kuchling
118aa5337c
Fix malformed line (PyChecker)
2001-08-13 14:37:23 +00:00
Guido van Rossum
49fa2bdaa1
Fix two bugs discovered by PyChecker. (I cannot test these, but I'm
...
confident that the old code was utterly broken -- the worse that can
happen is that the new code is still broken.)
2001-08-13 14:12:35 +00:00
Andrew M. Kuchling
246c425964
Fix for NameError caught by PyChecker.
...
(This command seems to be essentially untested; should fix that...)
2001-08-13 13:56:24 +00:00
Andrew M. Kuchling
fd6608bcea
Fix typo (PyChecker)
2001-08-13 13:48:55 +00:00
Andrew M. Kuchling
fee3126eb3
Catch curses.error instead of a non-existent global (PyChecker)
...
Edit comment
2001-08-13 13:47:23 +00:00
Andrew M. Kuchling
40ea6177b9
Remove redundant import
2001-08-13 13:45:22 +00:00
Steven M. Gava
33277c767f
further work on font config and general feel improvements
2001-08-13 04:36:58 +00:00
Tim Peters
5e824c37d3
SF patch #445412 extract ndiff functionality to difflib, from
...
David Goodger.
2001-08-12 22:25:01 +00:00
Jeremy Hylton
39f77bc90e
Modify _Set to support iteration.
...
Otherwise printlist(surprise) will fail with a TypeError, because map
is called with an argument that doesn't support iteration.
2001-08-12 21:53:08 +00:00
Guido van Rossum
d3077402c7
- Expand test for dynamic objects.
...
- Remove various 'global' directives and move some global definitions
inside the test functions that use them -- we have nested scopes so
the old hacks using globals are no longer needed.
2001-08-12 05:24:18 +00:00
Tim Peters
a45da92484
Make the output of tests skipped readable (i.e., deliberately break it
...
into indented lines each of which probably fits on a typical screen line).
2001-08-12 03:45:50 +00:00
Guido van Rossum
9d4fe4298e
dynamics(): add tests for dynamic *instances* (which are currently
...
broken). Also fix an invalid reference to C (should be S).
2001-08-12 03:38:18 +00:00
Jeremy Hylton
08a6403973
Test the unary operator changes to the compiler
2001-08-12 02:22:27 +00:00
Guido van Rossum
f73e30c3e3
Add the list of expected skips for Linux 2.x. Restructured the code a
...
little bit using a dictionary to avoid more code duplication as
more platforms are supported.
2001-08-12 02:22:19 +00:00
Tim Peters
a2be2d624a
Move line; reported on python-dev by Mark Favas (thanks!).
2001-08-12 02:01:09 +00:00
Tim Peters
b5b7b78414
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
...
about your platform too.
2001-08-12 01:20:39 +00:00
Steven M. Gava
28ccc2463e
removed some cruft
2001-08-12 01:14:55 +00:00
Tim Peters
a6a4f27ef7
_Condition.wait(): never sleep longer than the timeout time remaining,
...
and even if we have a long time left to wait, try the lock at least 20
times/second.
2001-08-12 00:41:33 +00:00
Jack Jansen
dbc363ce35
The test assumed that the local pathname convention for "foo" would sort before "foo/bar", which is not true on the mac (where they are "foo" and ":foo:bar", respectively; ":foo" would be fine too, but "foo" is the preferred spelling). Fixed by sorting the output.
2001-08-11 23:22:43 +00:00
Jeremy Hylton
d5d8fc559c
Replace all type comparisons with isinstance() calls
2001-08-11 21:44:46 +00:00
Steven M. Gava
c01e30f072
repair posix fonts fix
2001-08-11 15:48:13 +00:00
Martin v. Löwis
58682b7fe5
Only catch the errors that can actually occur, as reported in bug #411881 .
2001-08-11 15:02:57 +00:00
Steven M. Gava
abdfc4147d
support for help menu changes
2001-08-11 07:46:26 +00:00
Steven M. Gava
5b3ac8f98f
some re-design
2001-08-11 07:45:28 +00:00
Steven M. Gava
6b1ab255c2
supports about changes
2001-08-11 07:44:28 +00:00
Steven M. Gava
0ba4df89ab
adjust help menu bindings
2001-08-11 07:42:37 +00:00
Fred Drake
cd112f5546
Added tests for rich comparison operator functions.
...
Converted tests to PyUnit.
2001-08-11 03:21:35 +00:00
Guido van Rossum
e45763a8e6
Add test for SF bug #442833 (multiple inheritance).
2001-08-10 21:28:46 +00:00
Guido van Rossum
61cf780b6d
The message accompanying the TypeError exception on a readonly
...
attribute changed again.
2001-08-10 21:25:24 +00:00
Andrew M. Kuchling
f4aa684132
[Bug #414032 ] Make the 'sdist' command work when the distribution contains
...
libraries. This is done by adding a .get_source_files() method,
contributed by Rene Liebscher and slightly modified.
Remove an unused local variable spotted by PyChecker
2001-08-10 20:24:33 +00:00
Guido van Rossum
6d94627f1e
Allow AttributeError as well as TypeError for attribute-less objects.
2001-08-10 19:42:38 +00:00
Andrew M. Kuchling
13f4ea25d4
Remove unused variable
2001-08-10 19:00:41 +00:00
Andrew M. Kuchling
5079fe07fe
Fix typo caught by PyChecker
2001-08-10 19:00:15 +00:00
Andrew M. Kuchling
665f248806
Add forgotten import
2001-08-10 18:59:59 +00:00
Fred Drake
981a1787b7
Wrap a comment to fit in 80 columns.
...
Use construction-syntax for an exception to make the argument easier
to read.
2001-08-10 18:59:30 +00:00
Andrew M. Kuchling
db988b1ed3
Use .get_license()
2001-08-10 18:50:11 +00:00
Andrew M. Kuchling
fa7dc57d6c
[Bug #412271 , bug #449009 ] Use 'license' as the attribute name,
...
though 'licence' is still supported for backward-compatibility
(Should I add a warning to get_licence(), or not bother?)
Also fixes an UnboundLocalError noticed by PyChecker
2001-08-10 18:49:23 +00:00
Andrew M. Kuchling
fcfc8d5c0e
Patch #441091 from Finn Bock: the more advanced flush options are not
...
available in java, so only use the advanced flush options if they
are defined in the zlib module.
2001-08-10 15:50:11 +00:00
Guido van Rossum
315cd29ecf
Disable the sub() optimization until Fredrik has time to look into SF
...
bug #449000 , "re.sub(r'\n', ...) broke". This was Fredrik's
suggestion -- he's on vacation and said he wouldn't be able to work on
this until next week.
2001-08-10 14:56:54 +00:00
Guido van Rossum
e056e4d15c
Check in a testcase for SF bug #449000 : re.sub(r'\n', ...) broke.
2001-08-10 14:52:48 +00:00
Jeremy Hylton
a8b5f7d178
Remove hard-coded NT constants that are already defined in errno on NT.
...
Wrap some long lines.
Remove unnecessary tuple unpack.
2001-08-10 14:30:35 +00:00
Martin v. Löwis
9b75dca192
Expose nl_langinfo through locale where available.
2001-08-10 13:58:50 +00:00
Tim Peters
ab9ba27dc0
Whitespace normalization.
2001-08-09 21:40:30 +00:00
Tim Peters
c7ca3ffba3
Skip test_mhlib on Windows -- too many Unix assumptions.
2001-08-09 21:34:54 +00:00
Guido van Rossum
e4deb959cc
Fix two bugs detected by PyChecker: there's no need for redundant
...
"import MacOS", and there *is* a need for "import operator".
2001-08-09 21:22:15 +00:00
Andrew M. Kuchling
6386a4c846
Import UnknownFileError
2001-08-09 21:02:34 +00:00
Andrew M. Kuchling
106ffdb672
Import the errno module
2001-08-09 20:59:53 +00:00
Andrew M. Kuchling
affadeb9fd
Use correct variable name
2001-08-09 20:57:46 +00:00
Fred Drake
eaa77e2ca1
Added tests for operator.floordiv() and operator.truediv().
2001-08-09 20:23:08 +00:00
Guido van Rossum
3720261729
Restore the test for 'object' that I removed when object was
...
uninstantiable. All is well now.
2001-08-09 19:45:21 +00:00
Guido van Rossum
a995c91243
Use type(x).__name__ to get the name of the type instead of parsing
...
repr(type(x)).
2001-08-09 18:56:27 +00:00
Guido van Rossum
0263c80b90
Unittests for mhlib, by Nick Mathewson.
2001-08-09 18:18:08 +00:00
Tim Peters
55c12d4d5b
SF patch #403640 : incomplete proxy handling in URLLIB
...
Look specific to Windows. Don't know whether it works.
2001-08-09 18:04:14 +00:00
Guido van Rossum
f0713d3f4d
SF Patch #420725 by Walter Doerwald:
...
For local files urllib.py doesn't return the MIME
headers that the documentation says it does:
http://www.python.org/doc/current/lib/module-
urllib.html#l2h-2187 states that "When the method is
local-file, returned headers will include a Date
representing the file's last-modified time, a Content-
Length giving file size, and a Content-Type containing
a guess at the file's type"
But in Python 2.1 the only header that gets returned
is the Content-Type:
>>> import urllib
>>> f = urllib.urlopen("gurk.txt")
>>> f.info().headers
['Content-Type: text/plain\n']
2001-08-09 17:43:35 +00:00
Martin v. Löwis
c8718c13e8
Patch #403514 : precompute _subst_format_str to avoid a call to
...
string.join() on each invocation of _bind.
2001-08-09 16:57:33 +00:00
Guido van Rossum
3c7a25a4d9
Applied SF patch #438424 by Josh Cogliati:
...
Python's logolike module turtle.py did not display
the turtle except when actually drawing lines.
This patch changes the turtle.py module so that
it displays the turtle at all times when tracing is
on. This is similar to the the way that logo works.
When tracing is off the turtle will not be displayed.
2001-08-09 16:42:07 +00:00
Martin v. Löwis
dbdcb0fc3a
Regenerate for glibc 2.2.3.
2001-08-09 12:48:17 +00:00
Martin v. Löwis
4414933f62
Regenerate for Solaris 8.
2001-08-09 12:33:32 +00:00
Martin v. Löwis
8cc965c1fb
Patch #448474 : Add support for tell() and seek() to gzip.GzipFile.
2001-08-09 07:21:56 +00:00
Guido van Rossum
64deef2b17
A test suite for binary operators, disguised as a rational number
...
class.
2001-08-08 22:27:20 +00:00
Greg Ward
034cbf1350
Typo fix (spelling mistake in error message).
2001-08-08 20:55:10 +00:00
Martin v. Löwis
ff88556af6
Patch #449083 : Use builtins to initalize the module.
2001-08-08 16:02:01 +00:00
Steve Purcell
e00dde2087
Merged in bugfix from PyUnit CVS for problem reported by Gary Todd.
...
If 'unittest.py' was run from the command line with the name of a test
case class as a parameter, it failed with an ugly error. (Which was a
shame, because the documentation says you can do that.)
The problem was the old 'is the class X that you imported from me the same
as my class X?' gotcha.
2001-08-08 07:57:26 +00:00
Tim Peters
a38d2608bc
Regenerated token.py to account for new DOUBLESLASH and DOUBLESLASHEQUAL.
2001-08-08 06:35:56 +00:00
Guido van Rossum
96204f5e49
Add new tokens // and //=, in support of PEP 238.
2001-08-08 05:04:07 +00:00
Guido van Rossum
4668b000a1
Implement PEP 238 in its (almost) full glory.
...
This introduces:
- A new operator // that means floor division (the kind of division
where 1/2 is 0).
- The "future division" statement ("from __future__ import division)
which changes the meaning of the / operator to implement "true
division" (where 1/2 is 0.5).
- New overloadable operators __truediv__ and __floordiv__.
- New slots in the PyNumberMethods struct for true and floor division,
new abstract APIs for them, new opcodes, and so on.
I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.
Not yet implemented are warnings (default off) when / is used with int
or long arguments.
This has been on display since 7/31 as SF patch #443474 .
Flames to /dev/null.
2001-08-08 05:00:18 +00:00
Steven M. Gava
074c9d2b20
beginning of work on the conf. handling smarts
2001-08-08 01:30:38 +00:00
Jeremy Hylton
54e99e8b3b
Fix SF bug [ #447370 ] typo in urllib2.py
...
Also fix another bug caught by pychecker-- HTTPError() raised when
redirect limit exceed did not pass an fp object. Had to change method
to keep fp object around until it's certain that the error won't be
raised.
Remove useless line in do_proxy().
2001-08-07 21:12:25 +00:00
Guido van Rossum
16fd3381d4
Apply two small changes to the Windows code, according to SF bug
...
#427345 . These are supposed to support binary data and avoid
buffering problems on Windows.
2001-08-07 19:55:10 +00:00
Fred Drake
56b5fdd295
Remove make_re() function; this is no longer needed since _sre and pcre
...
are now allowed by ok_builtin_modules. This effectively backs out
revision 1.26.
This closes SF bug #448546 .
2001-08-07 19:49:15 +00:00
Fred Drake
c9fadf991c
Add a test that xml.sax.saxutils.XMLGenerator does the right thing
...
when quoting attribute values that contain single & double quotes.
This provides the rest of the regression test for SF bug #440351 .
2001-08-07 19:17:06 +00:00
Fred Drake
dad91dd1e9
Make sure XMLGenerator uses quoteattr() instead of escape() to quote
...
attribute values. Just using escape() can (and always has) led to broken
XML being generated. This makes sure it always produces the right thing.
This actually closes SF bug #440351 .
2001-08-07 19:14:46 +00:00
Guido van Rossum
288cd2cb69
Fix the test so it uses IterableUserDict for the "for x in dict" test.
2001-08-07 17:50:06 +00:00
Guido van Rossum
2050b65e84
Remove the __iter__ method from the UserDict class -- it can silently
...
break old code (in extreme cases). See SF bug #448153 .
Add a new subclass IterableUserDict that has the __iter__ method.
Note that for new projects, unless backwards compatibility with
pre-2.2 Python is required, subclassing 'dictionary' is recommended;
UserDict might become deprecated.
2001-08-07 17:40:42 +00:00
Guido van Rossum
c5943b1c8c
Add the NannyNag exception class and the process_tokens() function to
...
__all__, to indicate these are implied as part of the public API.
IDLE's "Check Module" command uses this, and it broke once already
because the reset_globals() and tokeneater() functions were deleted
when Neil converted this to using the generator API of tokenizer.
(See SF bug #448835.)
2001-08-07 17:19:25 +00:00
Guido van Rossum
15d86c6297
Remove the test for the 'object' type -- it can no longer be
...
instantiated. (Its use as a base class is adequately tested by other
tests.)
2001-08-07 16:53:42 +00:00
Jeremy Hylton
cd738364ce
silence warnings about import *
2001-08-07 16:38:19 +00:00
Steven M. Gava
230e5789e5
more fleshing out, this time primarily the 'general' page
2001-08-07 03:28:25 +00:00
Piers Lauder
e02f904cbf
fix for Bug ID 448100 - "test code using NL instead of CRNL"
2001-08-05 10:43:03 +00:00
Steven M. Gava
f213ccb5d1
began font / indentation page
2001-08-05 08:00:28 +00:00
Greg Ward
cbce202f82
Hack to workaround bug #445984 : attempt to import _socket before
...
starting the test suite proper. If _socket fails to build, that will
make this test fail with an ImportError -- handled by the test harness
as "no such module _socket" -- instead of an AttributeError deep in
CGIHTTPServer.
2001-08-04 22:22:19 +00:00
Steven M. Gava
60fc707be5
further work on keybinding page
2001-08-04 13:58:22 +00:00
Tim Peters
c173137391
Derived from SF patch #446899 Permit import of .pyw under Windows, from
...
David Bolen.
2001-08-04 08:12:36 +00:00
Fred Drake
eeee4ec4f1
Refactor so that it is easier to work with alternate MIME types databases,
...
and programmatically extend the database in different ways.
This closes the SF bug (feature request) #439710 .
2001-08-03 21:01:44 +00:00
Tim Peters
e861365dab
Don't use any characters C doesn't guarantee are safe for text-mode files.
...
This should stop the bizarre translations Jack was getting from Mac CVS.
2001-08-03 20:40:18 +00:00
Fred Drake
84bb9d8dc4
Fix stupid bug: when migrating these tests from the Zope repository, the
...
names of the test methods were not changed from the Zope-standard "check"
names to the Python-standard "test_" names, so the tests were not actually
being run.
Added test of hexadecimal character references as a regression check for
SF bug #445196 .
2001-08-03 19:53:01 +00:00
Fred Drake
1d4601d306
Change some comments into docstrings.
...
Fix handling of hexadecimal character references (legal in XHTML) so that
they are properly interpreted as character references.
This fixes SF bug #445196 .
2001-08-03 19:50:59 +00:00
Jack Jansen
fffd7224df
The test opened the binary test data files in text mode! Fixed.
2001-08-03 13:04:03 +00:00
Steven M. Gava
952d0a57d8
further work on config dialog, particularly highligthing config
2001-08-03 04:43:44 +00:00
Fred Drake
4fd06e0170
Make sure that WeakValueDictionary[] raises KeyError instead of TypeError
...
for keys that are not in the dictionary.
2001-08-03 04:11:27 +00:00
Fred Drake
c916cdc5ca
Miscellaneous minor cleanups.
2001-08-02 20:03:12 +00:00
Tim Peters
d342c62961
This test failed under python -O.
...
rewrite_file(): Delete both .pyc and .pyo leftovers, and explicitly close
the new source file after writing to it.
2001-08-02 17:23:11 +00:00
Guido van Rossum
394a47b268
Unit test for improved package import semantics.
...
Original by Alex Coventry (in SF patch #441791 ), adapted to the
standard regression test framework.
2001-08-02 14:14:20 +00:00
Martin v. Löwis
02d893cfae
Patch #444359 : Remove unused imports.
2001-08-02 07:15:29 +00:00
Tim Peters
6d6c1a35e0
Merge of descr-branch back into trunk.
2001-08-02 04:15:00 +00:00
Tim Peters
722d78f18a
s/endswith/startswith/
2001-08-01 20:23:18 +00:00
Tim Peters
66e1a254a1
Rewritten version of Finn Bock's SF patch #446907 (Allow jython to
...
complete test_import).
2001-08-01 19:38:56 +00:00
Guido van Rossum
b363c1f445
Turn an octal constant into a hex constant.
2001-08-01 18:17:23 +00:00
Steven M. Gava
b9d07b5a8b
A more lightweight (and read only) way to view help text
...
until the new help system is implemented. Removed some
commented cruft.
2001-07-31 11:11:38 +00:00
Steven M. Gava
d721c48165
indentation style changed to match existing source
2001-07-31 10:46:53 +00:00
Steven M. Gava
885c0bbd54
improve viewfile handling
...
indentation style changed to match existing source
2001-07-31 10:44:35 +00:00
Martin v. Löwis
6cd441d129
Add dead imports of modules that are "magically" imported.
2001-07-31 08:54:55 +00:00
Martin v. Löwis
bbe500e5d3
Remove obsolete entries from regen scripts.
2001-07-31 08:47:55 +00:00
Martin v. Löwis
2ad2569c72
Initialize msg to avoid unbound locals.
2001-07-31 08:40:21 +00:00
Steven M. Gava
7d9ed726fb
activate new about dialog for testing
2001-07-31 07:01:47 +00:00
Steven M. Gava
646c65c117
removed redundant separate idlfefork ver
2001-07-31 07:00:39 +00:00
Steven M. Gava
44d3d1a394
some new dialogs and support files for new about and configuration implementations
2001-07-31 06:59:02 +00:00
Guido van Rossum
3fc9582821
Amazing. This would open the sound file in text mode. Fixed.
...
SF bug #446219 .
2001-07-31 06:27:07 +00:00
Tim Peters
108efac24e
test_codeup should not have had an expected-output file; removing it.
2001-07-30 23:10:44 +00:00
Jeremy Hylton
b7a7731e01
Add tests for getattr() and hasattr() with non-string args
2001-07-30 22:49:11 +00:00
Fred Drake
c974bf4dc2
Get the whitespace right!
2001-07-30 22:41:23 +00:00
Jeremy Hylton
5121e7de11
Fix for SF bug [ #443866 ] Evaluating func_code causing core dump
...
Add test that calls eval with a code object that has free variables.
2001-07-30 21:55:29 +00:00
Jeremy Hylton
e3c37d660f
Ugly fix used when pyexpat is not available.
...
If pyexpat is not available and more than one attempt is made to load
an expat-based xml parser, an empty xml.parser.expat module will be
created. This empty module will confuse xml.sax.expatreader into
thinking that pyexpat is available.
The ugly fix is to verify that the expat module actually defines the
names that are imported from pyexpat.
2001-07-30 21:49:22 +00:00
Jeremy Hylton
3c19ec4eab
Fix when pyexpat not built
...
Import pyexpat first so that import error occurs when it is not
available.
2001-07-30 21:47:25 +00:00
Martin v. Löwis
3bd071e3f7
Patch #442866 : Tests for codeop.py.
2001-07-30 12:30:08 +00:00
Martin v. Löwis
27c430e54e
Patch #445538 : add completion for pstats.py sort cmd.
2001-07-30 10:21:13 +00:00
Just van Rossum
8d8e7a3256
Do convert_path() on script paths (now PyXML builds out of the box
...
under MacOS.)
2001-07-29 21:39:18 +00:00
Martin v. Löwis
70195da3ff
Patch #443337 : Fix incompatibilities in imputil's behavior.
2001-07-28 20:33:41 +00:00
Martin v. Löwis
d3011cd1d3
Remove usage of strop module.
2001-07-28 17:59:34 +00:00
Martin v. Löwis
66b6e192b9
Patch #416224 : add readline completion to cmd.Cmd.
2001-07-28 14:44:03 +00:00
Tim Peters
33dc0a1705
One more crack at join(): stop trying to pretend this isn't a mass of
...
special cases. test_pkg works again on Windows.
2001-07-27 08:09:54 +00:00
Tim Peters
4223f89edd
Change ntpath.join() so that join("d:/", "/whatever") returns
...
d:/whatever instead of /whatever. While I'm afraid changing isabs()
to be *consistent* with this would break lots of code, it makes
best sense for join() to do it this way. Thanks to Alex Martelli for
pushing back on this one!
2001-07-26 21:54:37 +00:00
Tim Peters
7321ec437b
SF bug #444510 : int() should guarantee truncation.
...
It's guaranteed now, assuming the platform modf() works correctly.
2001-07-26 20:02:17 +00:00
Marc-André Lemburg
7cf92fa1c8
Add backwards compatibility.
2001-07-26 18:06:58 +00:00
Martin v. Löwis
4f1cd8bdcb
Patch #411138 : Rename config.h to pyconfig.h. Closes bug #231774 .
2001-07-26 13:41:06 +00:00
Martin v. Löwis
4eb5940a4d
Untabify IPv6 changes.
2001-07-26 13:37:33 +00:00
Guido van Rossum
2e441f7836
Fix a denial-of-service attack, SF bug #443120 .
...
Code by Evan Simpson.
2001-07-25 21:00:19 +00:00
Greg Ward
7cf7e7e529
Undo revision 1.7: always mangle a #! line containing "python" to point
...
to the current Python interpreter (ie. the one used for
building/installation), even (especially!) if "/usr/bin/env" appears in
the #! line.
Rationale: installing scripts with "#!/usr/bin/env python" is asking for
trouble, because
1) it might pick the wrong interpreter (not the one used to
build/install the script)
2) it doesn't work on all platforms (try it on IRIX 5, or on Linux
with command-line options for python)
3) "env" might not be in /usr/bin
2001-07-25 20:20:11 +00:00
Greg Ward
e628a2fa85
Don't "import *" from stat at all -- just import what's needed, and
...
do it back in copy_file() (not at module level).
2001-07-25 19:48:03 +00:00
Marc-André Lemburg
80d1dd5f3b
Fix for bug #444493 : u'\U00010001' segfaults with current CVS on
...
wide builds.
2001-07-25 16:05:59 +00:00
Martin v. Löwis
1669669f4c
Remove unused imports from previous checkin.
2001-07-25 06:12:16 +00:00
Martin v. Löwis
a43c2f845e
Patch #401196 : Use getaddrinfo and AF_INET6 in TCP servers and clients.
2001-07-24 20:34:08 +00:00
Fred Drake
5e9eb98ff6
Oh, ok, so plainpager is probably marginally better.
2001-07-23 19:48:10 +00:00
Fred Drake
0a66fcb116
If $TERM is "dumb" or "emacs", just dump the text instead of trying to run
...
"less".
Patch contributed by Alex Convertry.
This closes SF patch #443551 .
2001-07-23 19:44:30 +00:00
Fred Drake
f973c6d594
Make this test work under Windows as well.
2001-07-23 16:30:21 +00:00
Fred Drake
99e87f9e23
Test for the "glob" module, contributed by Nick Mathewson.
...
Heavily modified so this doesn't break on Windows.
This closes SF patch #441175 .
2001-07-23 16:08:36 +00:00
Tim Peters
fa712ca1ed
Whitespace normalization.
...
Note: This test fails on Windows. Don't know why yet.
2001-07-23 09:44:21 +00:00
Fred Drake
4c81d60fcb
Tests for the "commands" module, contributed by Nick Mathewson.
...
This closes SF patch #440291 .
2001-07-23 04:08:01 +00:00
Fred Drake
1586136193
New tests by Nick Mathewson, for the fpformat module.
...
This closes SF patch #440290 .
2001-07-23 02:46:35 +00:00
Steven M. Gava
ba247a6bbb
updated about info for 0.8.1 release
2001-07-21 09:59:58 +00:00
Steven M. Gava
88ff736ee2
new material for 0.8.1 release
2001-07-21 09:50:55 +00:00
Tim Peters
137759407b
On WIndows, skip the part of test_dircache that can't work on Windows.
2001-07-21 02:22:14 +00:00
Tim Peters
87cc0c329e
Whitespace normalization, plus:
...
+ test_quopri.py relied on significant trailing spaces. Fixed.
+ test_dircache.py (still) doesn't work on Windows (directory mtime on
Windows doesn't work like it does on Unix).
2001-07-21 01:41:30 +00:00
Fred Drake
7f5296e7c0
Make the add*() helper functions more robust for use after intialization
...
is complete: recompute _dirs_in_sys_path each time these functions are
entered after module initialization is complete, and reset before
returning to user code.
This closes SF patch #442983 .
2001-07-20 20:06:17 +00:00
Andrew M. Kuchling
5a3e4cb0a2
Patch #429442 from Jason Tishler: Corrects sys.platform and
...
distutils.util.get_platform() problems caused by the cruft contained
in Cygwin's uname -s.
2001-07-20 19:29:04 +00:00
Fred Drake
79e75e1916
Use string.ascii_letters instead of string.letters (SF bug #226706 ).
2001-07-20 19:05:50 +00:00
Fred Drake
0f715d2aa1
Use string.ascii_letters instead of string.letters (SF bug #226706 ).
...
Work-around a font-lock bogosity.
2001-07-20 18:53:34 +00:00
Fred Drake
27eebb8c76
Use string.ascii_letters instead of string.letters.
...
Remove unused import.
2001-07-20 18:52:02 +00:00
Fred Drake
960fdf9ac3
Added the constants ascii_letters, ascii_lowercase, and ascii_uppercase
...
to the string module. This was determined to be the right approach in
SF bug #226706 .
2001-07-20 18:38:26 +00:00
Marc-André Lemburg
6c6bfb7c70
Make the unicode-escape and the UTF-16 codecs handle surrogates
...
correctly and thus roundtrip-safe.
Some minor cleanups of the code.
Added tests for the roundtrip-safety.
2001-07-20 17:39:11 +00:00
Guido van Rossum
27451d0fc8
Copying this 2.1.1 bugfix to the trunk:
...
Fix showstopper SF bug #442983 : use of site.addsitedir() was broken
because it references the global dirs_in_sys_path which is deleted.
The fix avoids deleting that global.
(My email through python.org or digicool.com is non-functional at the
moment; use gvanrossum@home.com to reach me.)
2001-07-20 14:57:12 +00:00
Piers Lauder
15e5d5344d
apply patch item #416253
2001-07-20 10:52:06 +00:00
Piers Lauder
34d9705943
fix missed conversion in ESR's string conversion
2001-07-20 10:28:51 +00:00