Neal Norwitz
9f39f68533
initscr() will exit if there's an error. Try to catch the obvious failure
...
cases if TERM isn't set or is unknown (perhaps we should only check if
unset or empty?)
Skip the test if TERM isn't set. This seems to occur when running under
buildbot and presumably cron.
For some more info check here:
http://mail.python.org/pipermail/python-checkins/2006-January/048704.html
Will backport if it works.
2006-01-06 04:18:21 +00:00
Martin v. Löwis
1df5c3961c
Generalize buildno to be a sequence of non-comma
...
characters.
2006-01-06 00:44:11 +00:00
Neal Norwitz
c6d1f9100f
If the audio file does not exist, the test should be skipped. Will backport.
2006-01-05 07:16:13 +00:00
Neal Norwitz
eeab7da591
Skip test_curses if stdin is not a tty (like when run from cron or buildbot). Will backport.
2006-01-05 06:09:13 +00:00
Tim Peters
0cdc3d884e
test_main(): Restore the original root logger level after running
...
the tests. This stops the confusing/annoying:
No handlers could be found for logger "cookielib"
message we got whenever some test running after test_logging
happened to use cookielib.py (when not using regrtest's -r,
this happened during test_urllib2; when using -r, it varied).
2005-12-30 20:46:23 +00:00
Tim Peters
1b27f86411
Whitespace normalization.
2005-12-30 18:42:42 +00:00
Martin v. Löwis
4cfa136680
Work around test_locale failing on Solaris.
...
Will backport to 2.4.
2005-12-30 12:51:45 +00:00
Skip Montanaro
39b29be8a6
Fix a delimiter detection problem in sniffer. Sniffing "a|b|c\r\n" was
...
returning 'a' as the delimiter. It now returns '|', but not because I
understood better what the code was supposed to do. Would someone that
understands the idea behind _guess_delimiter() (see its doc string) look to
see if my fallback choice is better than before or if it's just serendipity
that I picked the proper delimiter?
2005-12-30 05:09:48 +00:00
Fredrik Lundh
24f0fa97c5
SF#1391872
...
Floating point literals don't work in non-US locale in 2.5. Patch and
new locale tests by Hye-Shik Chang.
2005-12-29 20:35:52 +00:00
Armin Rigo
037d1e0ff3
SF bug #1153075 : "PyXxx_Check(x) trusts x->ob_type->tp_mro".
...
A patch by mwh to check that user-defined mro's are reasonable
enough.
2005-12-29 17:07:39 +00:00
Armin Rigo
f5bd3b442d
adding in-place operators to the operator module.
2005-12-29 16:50:42 +00:00
Armin Rigo
fd163f92ce
SF patch #1390657 :
...
* set sq_repeat and sq_concat to NULL for user-defined new-style
classes, as a way to fix a number of related problems. See
test_descr.notimplemented()). One of these problems was fixed
in r25556 and r25557 but many more existed; this is a general
fix and thus reverts r25556-r25557.
* to avoid having PySequence_Repeat()/PySequence_Concat() failing
on user-defined classes, they now fall back to nb_add/nb_mul if
sq_concat/sq_repeat are not defined and the arguments appear to
be sequences.
* added tests.
Backport candidate.
2005-12-29 15:59:19 +00:00
Skip Montanaro
91bb70c5c0
Fix for problem with Sniffer class. If your delimiter is whitespace and the
...
last field was empty it would strip the delimiter and incorrectly guess that
"" was the delimiter. Reported in c.l.py by Laurent Laporte. Will
backport.
2005-12-28 15:37:25 +00:00
Georg Brandl
c0b24734e0
Bug #649974 : make docstrings for url2pathname consistent
2005-12-26 22:53:56 +00:00
Tim Peters
536cf99536
Whitespace normalization.
2005-12-25 23:18:31 +00:00
Tim Peters
83a8c393b0
test_bug_1333982(): This one must fail under -O.
...
All the --all test pass using -O on WinXP now.
2005-12-25 22:52:32 +00:00
Neal Norwitz
71dad72ebe
SF patch #1157027 , cookielib mis-handles RFC 2109 cookies in Netscape mode
2005-12-23 21:43:48 +00:00
Neal Norwitz
3e7de59bd2
Fix SF #1117398 , cookielib LWPCookieJar and MozillaCookieJar exceptions
...
cookielib.LWPCookieJar and .MozillaCookieJar are documented to raise
cookielib.LoadError on attempt to load an invalid cookies file, but
raise IOError instead. Compromise by having LoadError subclass IOError.
2005-12-23 21:24:35 +00:00
Neal Norwitz
51abbc7b4a
Fix Armin's bug 1333982. He found it, he didn't created it :-)
...
This code generated a C assertion:
assert 1, ([s for s in x] +
[s for s in x])
pass
assert was completely broken, it needed to use the proper block.
compiler_use_block() is now no longer used, so remove it.
2005-12-18 07:06:23 +00:00
Neal Norwitz
db83eb3170
Fix Bug #1378022 , UTF-8 files with a leading BOM crashed the interpreter.
...
Needs backport.
2005-12-18 05:29:30 +00:00
Neal Norwitz
e7214a130b
Get float() to be more portable across platforms. Disable hex strings.
2005-12-18 05:03:17 +00:00
Neal Norwitz
3dafaabfb5
Fix _sys_version() so it works with the new buildno, not sure if it is correct. test_platform passes
2005-12-18 04:10:10 +00:00
Neal Norwitz
8856fb750b
SF Patch #1365916 , mmap fails on AMD64
...
Fix some 64-bit issues due to mismatch format characters w/actual data types
2005-12-18 03:34:22 +00:00
Neal Norwitz
f599f424a2
SF patch #1355913 , PEP 341 - Unification of try/except and try/finally
...
Modified since ast-arenas was implemented.
2005-12-17 21:33:47 +00:00
Hye-Shik Chang
835b243c71
Bug #1379994 : Fix *unicode_escape codecs to encode r'\' as r'\\'
...
just like string codecs.
2005-12-17 04:38:31 +00:00
Fredrik Lundh
8911ca3d70
added encoding tests to ElementTree/cElementTree tests
2005-12-16 22:07:17 +00:00
Georg Brandl
6ee6952eb2
Patch #1360443 : Make SimpleHTTPServer display unencoded directory names.
2005-12-16 19:36:08 +00:00
Georg Brandl
07f159de86
Bug #1378455 : a problem of urllib using open_local_file
2005-12-15 21:59:00 +00:00
Walter Dörwald
3b287702dd
Add two tests for the script interface.
2005-12-15 20:17:20 +00:00
Fredrik Lundh
9235ea4f26
added cElementTree tests
2005-12-15 18:41:22 +00:00
Neal Norwitz
a716eabca7
Revert r41662 and the part of 41552 that originally caused the problem
...
(calling ftell(stdin) doesn't seem defined). So we won't test errors
from ftell unless we can do it portably.
2005-12-15 05:25:09 +00:00
Walter Dörwald
b197543680
If quopri uses the implementations from binascii do the tests a second time
...
using the Python implementations of the functions. This imcreases code
coverage and makes sure that both implementations do the same thing.
2005-12-14 23:32:22 +00:00
Fredrik Lundh
63168a52f4
added PSF licensing blurbs to relevant files
2005-12-14 22:29:34 +00:00
Fredrik Lundh
4c86ec651e
added cElementTree/_elementtree build stuff and wrapper module
2005-12-14 18:46:16 +00:00
Armin Rigo
9ed7306031
Subversion settings:
...
svn:ignore *.pyc *.pyo
svn:eol-style native
The .py files appear to have been checked in with Windows or inconsistent line
endings. The current check-in disrupts the 'svn blame', but hopefully it is
irrelevant for freshly imported code.
2005-12-14 18:10:45 +00:00
Fred Drake
7316ad224d
- remove leftover directory
...
- add file I forgot to add in previous commit
2005-12-14 06:26:11 +00:00
Fred Drake
c6730e1772
move the xml package implementation to xmlcore, and adjust the tests to
...
test that package, not the xmlcore/PyXML switcheroo fiasco in the xml
module/package
2005-12-14 06:20:35 +00:00
Hye-Shik Chang
e2f8e3c14f
Fix test not to fail on FreeBSD. Directories work also as data
...
files on the platform.
2005-12-13 17:06:45 +00:00
Fredrik Lundh
af57fa13f4
r1077@spiff: Fredrik | 2005-12-12 22:58:44 +0100
...
make sure xml.etree can be used even if PyXML is present
(solution proposed by Philip J. Eby)
2005-12-12 21:59:52 +00:00
Fredrik Lundh
0e664e15ef
skip NIS entries, empty entries, etc
2005-12-12 20:53:40 +00:00
Fredrik Lundh
80768f8635
skip nis entries, if not filtered out by getpwall itself
2005-12-12 20:46:31 +00:00
Fredrik Lundh
2a60d9ac2d
added xml.etree test (enough of the ElementTree selftest to
...
make sure that all included components work)
2005-12-12 20:19:44 +00:00
Fredrik Lundh
7e0aef0e75
r1068@spiff: Fredrik | 2005-12-12 19:50:30 +0100
...
assorted xml.etree tweaks
2005-12-12 18:54:55 +00:00
Fredrik Lundh
075854fcc5
added ElementTree core components to xml.etree
2005-12-12 15:10:44 +00:00
Neal Norwitz
f8d403dd97
SF #1377897 , Bus error in ast
...
If a line had multiple semi-colons and ended with a semi-colon, we would
loop too many times and access a NULL node. Exit the loop early if
there are no more children.
2005-12-11 20:12:40 +00:00
Hye-Shik Chang
aaa2f1dea7
Patch #1276356 : Implement new resource "urlfetch" for regrtest.
...
This enables even impatient people to run tests that require remote
files such as test_normalization and test_codecmaps_*.
2005-12-10 17:44:27 +00:00
Neal Norwitz
ec77645df9
mwh spotted a copied error message, make it unique (and correct)
2005-12-05 01:23:48 +00:00
Neal Norwitz
a6fc397a80
Fix SF #1373161 , r41552 broke test_file on OS X
...
You apparently can seek(0) on sys.stdin on OS X.
But you can't go backwards, so seek(-1).
2005-12-05 01:17:03 +00:00
Andrew M. Kuchling
593d6b311e
[Bug #1281032 ] Pass encoding from the input source to pyexpat's ParserCreate()
2005-12-04 19:53:45 +00:00
Andrew M. Kuchling
bdb3901001
[Bug #1164912 ] Ensure Datetime wrapper class .value attribute is an 8-bit string, not a Unicode string
2005-12-04 19:11:17 +00:00
Andrew M. Kuchling
427aedbbd4
[Patch #1039083 ] Add 'encoding' parameter to SimpleXMLRPCServer
2005-12-04 17:13:12 +00:00
Andrew M. Kuchling
ce100d8d4c
Use boolean name
2005-12-04 16:45:05 +00:00
Andrew M. Kuchling
10a16dea74
[Patch #893642 ] Add optional allow_none argument to SimpleXMLRPCServer, CGIXMLRPCRequestHandler
2005-12-04 16:34:40 +00:00
Andrew M. Kuchling
bc6a195344
[Bug #1372836 ] Remove unused code
2005-12-04 16:09:54 +00:00
Andrew M. Kuchling
e63fde72f3
[Bug #792570 ] Under Windows, socket.read() seems to run into trouble when
...
asked to read tens of megabytes of data. On my Mac, it hits MemoryErrors
when reading around 15Mb in one chunk. The fix is to read the body in several
parts, not as one big piece.
It would be nice to fix the underlying socket.read() problem, too.
2.4 bugfix candidate.
2005-12-04 15:36:57 +00:00
Andrew M. Kuchling
3a97605500
[Bug #1222790 ] Set reuse-address and close-on-exec flags on the HTTP listening socket
2005-12-04 15:07:41 +00:00
Walter Dörwald
ede187f022
Test another error case in PyFloat_FromString().
2005-11-29 15:45:14 +00:00
Neal Norwitz
fcf4435ae0
Improve test coverage. Hope the test_file changes work the same on windows.
2005-11-27 20:37:43 +00:00
Martin v. Löwis
307021f40b
Patch #1162825 : Support non-ASCII characters in IDLE window titles.
2005-11-27 16:59:04 +00:00
Georg Brandl
1f663574ee
bug #1365984 : urllib and data: URLs. Problem was that cStringIO objects cannot be assigned attributes on the fly.
2005-11-26 16:50:44 +00:00
Walter Dörwald
9356fb9881
SF patch #1364545 : test_cmd_line.py relied on english error messages when
...
invoking the Python interpreter (which didn't work on non-english Windows
versions). Check return codes instead.
2005-11-25 15:22:10 +00:00
Neal Norwitz
212a575242
Remove unused _callers member. No need for types, use isinstance
2005-11-25 03:19:29 +00:00
Neal Norwitz
ef260c0803
Stop looping to do nothing, just pass.
2005-11-25 03:18:58 +00:00
Neal Norwitz
d752f7d8e8
No need for types, use isinstance
2005-11-25 03:17:59 +00:00
Neal Norwitz
f9232678ae
Use sorted() builtin
2005-11-25 03:16:34 +00:00
Neal Norwitz
89886ab2b0
Test is still disabled, but access through public module
2005-11-25 03:15:49 +00:00
Neal Norwitz
21d19f7203
Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs more work.
2005-11-25 03:14:00 +00:00
Neal Norwitz
545d4962f5
Cleanup a bit more references so test_urllibnet is stable (test_urllib2 is sometimes stable, at least in isolation)
2005-11-25 02:55:49 +00:00
Neal Norwitz
7025ce6fb0
Fix some comment typos
2005-11-25 02:02:50 +00:00
Neal Norwitz
2fcf206a6f
Fix typo in comment.
...
Delete globals which contain variable information at the end of the test.
This makes the test stable (no reported leaks) when running regrtest -R
to find reference leaks.
2005-11-24 23:28:37 +00:00
Neal Norwitz
430f68b447
Move registration of the codec search function to the module scope
...
so it is only executed once. Otherwise the same search function is
repeated added to the codec search path when regrtest is run with -R
and leaks are reported.
2005-11-24 22:00:56 +00:00
Neal Norwitz
a98e7694ee
move test into a unittest.TestCase, no functional changes
2005-11-24 21:58:51 +00:00
Kurt B. Kaiser
9df23ea1fc
Fix main() call
...
Patch 1315161 sebastien blanchet
2005-11-23 15:12:19 +00:00
Brett Cannon
ad07ff2c77
Prevent threading.Thread.join() from blocking when a previous call raised an
...
exception (e.g., passing in an illegal argument).
Applies patch #1314396 . Thanks Eric Blossom.
2005-11-23 02:15:50 +00:00
Kurt B. Kaiser
5c6e0a1a0c
1. Made advanced keybinding dialog functional.
...
2. Allow binding of movement keys
2005-11-22 21:09:37 +00:00
Georg Brandl
4a5a91838b
Prefer GNOME browser over mozilla.
2005-11-22 19:18:01 +00:00
Andrew M. Kuchling
841d25ee66
[Patch #1094164 ] replaceChild(x,x) ends up removing x of the tree. Add fix from Felix Rabe and a test case
2005-11-22 19:03:16 +00:00
Andrew M. Kuchling
bb7e800506
[Patch #1350573 ] zlib.crc32 doesn't handle 0xffffffff seed. Add tests and bugfix. Bug reported by John Schmidt; bugfix by Danny Yoo.
2005-11-22 15:32:28 +00:00
Walter Dörwald
d331b433c3
Use optparse instead of getopt for command line options.
...
Use "raise instance" instead of "raise class, args".
Modernize the code in other spots (bools, startswith()).
2005-11-22 14:12:21 +00:00
Walter Dörwald
91043f3286
Avoid using str as a variable name.
2005-11-22 12:58:19 +00:00
Neal Norwitz
5898fa2dcd
improve test coverage in Python/pystrtod.c and Python/mystrtoul.c.
2005-11-22 05:17:40 +00:00
Kurt B. Kaiser
3b148ca43d
Fix typo and update comment obsoleted by 'syntax' patch
2005-11-22 02:17:10 +00:00
Kurt B. Kaiser
2bf2af6d9b
Default two second delay on attribute pop-up, less noisy interface.
...
(Opens immediately if TAB is typed after '.')
2005-11-22 01:52:22 +00:00
Kurt B. Kaiser
5a67f9b815
Following 'syntax' patch, accelerator keys in menus weren't being
...
updated after a keyset change. Also, formatted ApplyKeyBindings()
2005-11-22 01:47:14 +00:00
Walter Dörwald
09f0dd5842
Use basestring instead of type.StringType for checking whether a input
...
or output file is a file name instead of a file object. This enables
unicode file names as arguments to uu.encode() and uu.decode().
2005-11-21 19:10:07 +00:00
Walter Dörwald
705fd474e9
Add a test for uu.encode() that passed filenames as
...
in_file and out_file.
2005-11-21 18:55:56 +00:00
Walter Dörwald
c69d1c498f
Add a rudimentary test for the platform module that at least calls each
...
documented function once.
2005-11-21 17:48:12 +00:00
Walter Dörwald
e5a7fad356
Fix typo.
2005-11-21 17:01:27 +00:00
Kurt B. Kaiser
b17544551f
Merge IDLE-syntax-branch r39668:41449 into trunk
...
A idlelib/AutoCompleteWindow.py
A idlelib/AutoComplete.py
A idlelib/HyperParser.py
M idlelib/PyShell.py
M idlelib/ParenMatch.py
M idlelib/configDialog.py
M idlelib/EditorWindow.py
M idlelib/PyParse.py
M idlelib/CallTips.py
M idlelib/CallTipWindow.py
M idlelib/run.py
M idlelib/config-extensions.def
A idlelib/MultiCall.py
2005-11-18 22:05:48 +00:00
Walter Dörwald
c85c74cd08
Increase code coverage in Python/structmember.c from 33% to 40%
...
(by forcing a call to the listmember() function).
2005-11-18 16:51:05 +00:00
Walter Dörwald
690402ff17
Add tests to increase code coverage in Python/codecs.c and Python/exceptions.c.
2005-11-17 18:51:34 +00:00
Walter Dörwald
e22d339dc5
Add tests for various error cases and for readbuffer_encode() and
...
charbuffer_encode(). This increases code coverage in Modules/_codecsmodule.c
from 83% to 95%.
2005-11-17 08:52:34 +00:00
Kurt B. Kaiser
b61602c968
Better indentation after first line of string continuation.
...
IDLEfork Patch 681992, Noam Raphael
2005-11-15 07:20:06 +00:00
Fredrik Lundh
96c1c7a571
SF#1343671.
...
The removedirs function removes empty directories, it doesn't
empty them.
2005-11-12 15:55:04 +00:00
Fredrik Lundh
d489398da9
r903@spiff: Fredrik | 2005-11-12 16:28:37 +0100
...
removed outdated copyright notices (etc)
2005-11-12 15:28:52 +00:00
Fredrik Lundh
0d89e351e1
r879@spiff: Fredrik | 2005-11-12 14:38:03 +0100
...
r878@spiff: Fredrik | 2005-11-12 14:37:22 +0100
minor docstring and comment tweaks (wikipedia might not be the
ultimate reference, but it's a lot better than "XXX" ;-)
2005-11-12 15:21:05 +00:00
Walter Dörwald
e62e936e79
Change PrettyPrinter.pprint(), so that output is written directly to the
...
output stream, instead of writing it to a StringIO first and writing the
result of this to the output stream. This should speed up the initial
output.
2005-11-11 18:18:51 +00:00
Georg Brandl
1cb179e93f
Bug #1338995 : fix problem with new webbrowser.py.
2005-11-09 21:42:48 +00:00
Walter Dörwald
966c264b02
Fix typos.
2005-11-09 17:12:43 +00:00
Vinay Sajip
8b6b53f8ac
Fixed indentation bug in _connect_unixsocket (thanks to Ken Lalonde for reporting it/supplying a patch)
2005-11-09 13:55:13 +00:00
Marc-André Lemburg
380f417e15
Patch by pythonic <pythonic@gmail.com> to support Fedora
...
as Linux distro.
2005-11-07 16:11:02 +00:00
Armin Rigo
c6686b7c7e
Added proper reflection on instances of <type 'method-wrapper'>, e.g.
...
'[].__add__', to match what the other internal descriptor types provide:
'__objclass__' attribute, '__self__' member, and reasonable repr and
comparison.
Added a test.
2005-11-07 08:38:00 +00:00
Armin Rigo
f4afb21526
similar to SF bug 847019: a quick check in the time() constructor, which
...
accepts strings only for unpickling reasons. This check prevents the honest
mistake of passing a string like '2:59.0' to time() and getting an insane
object.
2005-11-07 07:15:48 +00:00
Ka-Ping Yee
9a2dcf8ac1
Fix SF bug #417833 (pydoc HTTP reload failure) by removing from
...
sys.modules all submodules of a the given module/package path
when trying to reload a module.
2005-11-05 05:04:41 +00:00
Ka-Ping Yee
a487e4eb05
Accept patch to resolve SF bug #651124 .
2005-11-05 04:49:18 +00:00
Neal Norwitz
6d98ed4ad2
Oops, forgot to add the output file to 41388.
2005-11-03 05:07:15 +00:00
Neal Norwitz
0f46bbf781
Bug #1346533 , select.poll() doesn't raise an error if timeout > sys.maxint
...
Need to check return result of PyInt_AsLong()
Will backport.
2005-11-03 05:00:25 +00:00
Brett Cannon
5d0bf9446b
Change time.strptime() to raise ValueError whenever there is an error in the
...
format string. Before exceptions generated by the internal code propagated up
to the user and were not helpful.
Closes bug #1340337 .
2005-11-02 23:04:26 +00:00
Neal Norwitz
cf4863831c
Fix SF #1345263 , colorsys tests, bug in frange
...
Fix a typo that caused step to be ignored.
Will backport.
2005-11-02 05:54:27 +00:00
Vinay Sajip
245a5ab31b
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
2005-10-31 14:27:01 +00:00
Vinay Sajip
85c1909a78
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
2005-10-31 13:14:19 +00:00
Tim Peters
383d3c0a68
test_directories(): This test had no chance of passing on
...
Windows. Hacked it to pass, but not sure it's worth the
bother.
2005-10-30 01:15:38 +00:00
Fred Drake
db390c1ad8
fix typos, mostly in comments
2005-10-28 14:39:47 +00:00
Neal Norwitz
f339654280
Patch #1338314 , Bug #1336623 : fix tarfile so it can extract
...
REGTYPE directories from tarfiles written by old programs.
Will backport.
2005-10-28 05:52:22 +00:00
Marc-André Lemburg
d9cf593b49
Cosmetic change: make all hex literals use upper case hex so that they
...
look more like the Unicode Consortium files.
Add ending new-line to all source files.
2005-10-24 12:14:59 +00:00
Marc-André Lemburg
3c72ded23d
Removed the decoding_map from the codecs where this is possible.
...
Replaced the tis_620, cp1140 and koi8_u codecs with new ones
based on custom mapping files.
2005-10-24 12:07:49 +00:00
Neal Norwitz
6ab080cd40
Fix problem handling EXTENDED_ARGs from SF bug # 1333982
2005-10-24 00:08:10 +00:00
Neal Norwitz
f8950654e3
Fix compiler test when run with -u (long mode)
2005-10-24 00:01:37 +00:00
Vinay Sajip
1e86beb3f8
One-off "No handlers..." error message only raised if raiseExceptions is set.
2005-10-23 22:32:59 +00:00
Neil Schemenauer
d403c45386
Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have
...
historically been looked up using LOAD_NAME, not LOAD_GLOBAL.
looked up by LOAD_NAME, not
2005-10-23 04:24:49 +00:00
Neal Norwitz
ebc3457937
Revert previous checkin:
...
According to Jeremy, the comment only made sense when
the yield was disallowed. Now it's testing that the yield
is allowed, so it's not bad and the outer finally is irrelevant.
2005-10-22 03:51:42 +00:00
Neil Schemenauer
ab541bb98e
Revert change, func_name of lambda's is back to <lambda>.
2005-10-21 18:11:40 +00:00
Marc-André Lemburg
0f00ba8bd8
Replace the old EBCDIC codecs with new ones using the decoding table.
2005-10-21 14:35:35 +00:00
Marc-André Lemburg
7797be7b3b
Alias iso8859_1 to latin_1 which is the same encoding, but has
...
a much faster codec implementation.
2005-10-21 14:02:28 +00:00
Marc-André Lemburg
75c9e8392e
Add a few more Mac OS encodings. The mapping tables for these are
...
available at ftp.unicode.org.
2005-10-21 13:58:32 +00:00
Marc-André Lemburg
a1129f4b9b
Replace the old charmap codecs with new ones generated from the current
...
mapping tables available at ftp.unicode.org.
These new codecs include and use character decoding tables which speeds
up decoding by a few factors.
2005-10-21 13:49:12 +00:00
Michael W. Hudson
b2308bb9be
Fix bug:
...
[ 1327110 ] wrong TypeError traceback in generator expressions
by removing the code that can stomp on the users' TypeError raised by the
iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly
reasonable message itself. Also, a couple of tests.
2005-10-21 11:45:01 +00:00
Neal Norwitz
37c0844b35
Fix SF bug #1167751 , Argument genexp corner case
...
Incorrect code was generated for:
foo(a = i for i in range(10))
This should have generated a SyntaxError. Fix the Grammar so
it raises a SyntaxError and test it.
I'm uncertain whether this should be backported. It makes
something that was Syntactically valid invalid. However,
the code would either be completely broken or do the wrong thing.
2005-10-21 06:24:02 +00:00
Neal Norwitz
1e8659b963
Don't use a string exception since it's deprecated
2005-10-21 06:00:24 +00:00
Neal Norwitz
f21c8ed58a
Add comment lost from AST merge
2005-10-21 04:34:18 +00:00
Jeremy Hylton
3e0055f8c6
Merge ast-branch to head
...
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Jeremy Hylton
bc2a62fcfd
Disable some tests in anticipation of merging ast-branch to the head
2005-10-20 14:27:21 +00:00
Neal Norwitz
b0e32e2b71
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)
...
Problem: if two files are assigned the same inode
number by the filesystem, the second one will be added
as a hardlink to the first, which means that the
content will be lost.
The patched code checks if the file's st_nlink is
greater 1. So only for files that actually have several
links pointing to them hardlinks will be created, which
is what GNU tar does.
Will backport.
2005-10-20 04:50:13 +00:00
Neal Norwitz
40563eddf1
Get BSD DB working most for version 3.2
2005-10-20 04:36:08 +00:00
Raymond Hettinger
4b0f20def3
Teach unquote() to handle unicode inputs
2005-10-15 16:41:53 +00:00
Vinay Sajip
239322b97e
Optimised Placeholders handling of child loggers by using a dict rather than a list (much slower in the pathological case of hundreds of child Loggers to a Placeholder - problem reported by Ryan Blazecka).
2005-10-14 09:36:35 +00:00
Vinay Sajip
b79350601b
Added Host and Content-type headers to requests sent by HTTPHandler (suggested by Steven Vereecken)
2005-10-11 13:15:31 +00:00
Walter Dörwald
007f8dfde2
Bug #1245379 : Add "unicode-1-1-utf-7" as an alias for "utf-7" as specified
...
by RFC 1642.
2005-10-09 19:42:27 +00:00
Georg Brandl
b980113a8d
Fix errors in _synthesize because of missing basename attribute of
...
browser controller classes.
2005-10-08 20:47:38 +00:00
Guido van Rossum
c252c5964c
Fix unit test failure -- the output received from Python can be empty,
...
but verify_valid_flag() wasn't expecting that. Will backport.
2005-10-08 20:04:35 +00:00
Vinay Sajip
43d6e812c8
Fixed bug where the logging message was wrongly being demoted from Unicode to string (SF #1314107 )
2005-10-07 08:35:36 +00:00
Walter Dörwald
d1c1e10f70
Part of SF patch #1313939 : Speedup charmap decoding by extending
...
PyUnicode_DecodeCharmap() the accept a unicode string as the mapping
argument which is used as a mapping table.
This code isn't used by any of the codecs yet.
2005-10-06 20:29:57 +00:00
Raymond Hettinger
cc9a951f35
SF #1313496 : bisect C replacement doesn't accept named args
2005-10-05 11:39:12 +00:00
Neal Norwitz
196f733d93
Fix pychecker warnings
2005-10-04 03:17:49 +00:00
Kurt B. Kaiser
389482ccbe
Incorporate Tal Einat's comment on Patch 936169: Fixes alignment problem.
2005-10-03 20:08:25 +00:00
Kurt B. Kaiser
0a1357930a
Tweak CodeContext.py docstrings, comments, and names.
2005-10-03 19:26:03 +00:00
Georg Brandl
e8f244305e
Patch #754022 : Greatly enhanced webbrowser.py.
2005-10-03 14:16:44 +00:00
Neal Norwitz
11bd119226
SF bug #887946 , segfault if redirecting directory
...
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
2005-10-03 00:54:56 +00:00
Kurt B. Kaiser
74910225df
Increased performance in CodeContext extension Patch 936169 Noam Raphael
2005-10-02 23:36:46 +00:00
Neal Norwitz
40d3781416
- Fix segfault with invalid coding.
...
- SF Bug #772896 , unknown encoding results in MemoryError, which is not helpful
I will only backport the segfault fix. I'll let Anthony decide if he wants
the other changes backported. I will do the backport if asked.
2005-10-02 01:48:49 +00:00
Georg Brandl
8b813db2ef
bug [ 729103 ] Cannot retrieve name of super object
2005-10-01 16:32:31 +00:00
Neal Norwitz
484d9a409a
Patch #1309009 , Fix segfault in pyexpat when the XML document is
...
in latin_1, but Python incorrectly assumes it is in UTF-8 format
Will backport.
2005-09-30 04:46:49 +00:00
Georg Brandl
aa93517de8
patch [ 1300515 ] xdrlib.py: pack_fstring() did not use null bytes for padding
2005-09-29 20:49:16 +00:00
Georg Brandl
80ba8e8549
bug [ 1296004 ] MemoryError in httplib
2005-09-29 20:16:07 +00:00
Armin Rigo
dd5c023af5
some more fixes and tests for inspect.getsource(), triggered by crashes
...
from the PyPy project as well as the SF bug #1295909 .
2005-09-25 11:45:45 +00:00
Raymond Hettinger
6b27cda643
Convert iterator __len__() methods to a private API.
2005-09-24 21:23:05 +00:00
Peter Astrand
3a708dfc88
Changed license header: Now simply referring to PSF. This closes bug
...
1138653.
2005-09-23 17:37:29 +00:00
Michael W. Hudson
10402a306f
Patches #1298449 and #1298499 : Add some missing checks for error
...
returns in cStringIO.c. Thanks to Andrew Bennetts.
This must be a backport candidate.
2005-09-22 09:19:01 +00:00
Jack Jansen
19e11c86a7
MacOSX 10.4 apparently does not allow the creation time to be set to later
...
than the modification time. Changed the SetDates test to accomodate.
Backport candidate.
2005-09-21 20:52:11 +00:00
Armin Rigo
f879024487
test and fix for buggy handling of exceptions raised by C functions,
...
causing the profiler to crash on an AssertionError if the same Python
function catches multiple exceptions from C functions.
2005-09-20 18:50:13 +00:00
Matthias Klose
f3f231f60c
- Patch #1166948 : locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE
...
to get the correct encoding.
- Patch #1166938 : locale.py: Parse LANGUAGE as a colon separated list of
languages.
2005-09-20 07:02:49 +00:00
Armin Rigo
3a703b6059
Reverted revision 1.83, which introduced a bug and subtle incompatibility
...
issues. See bug #1112856 .
2005-09-19 09:11:04 +00:00
Skip Montanaro
f8948ca5d7
skip _locale test if OS X < 10.4
2005-09-19 03:54:46 +00:00
Martin v. Löwis
4ed673877d
Patch #1268314 : Cache lines in StreamReader.readlines for performance.
...
Will backport to Python 2.4.
2005-09-18 08:34:39 +00:00
Georg Brandl
9e28107ce8
Test case for latest complexobject fix.
2005-09-17 07:51:15 +00:00
Vinay Sajip
116f16e4ab
Added lock acquisition around handler removal from logger
2005-09-16 10:33:40 +00:00
Raymond Hettinger
9bda1d6f64
No longer ignore exceptions raised by comparisons during key lookup.
...
Inspired by Armin Rigo's suggestion to do the same with dictionaries.
2005-09-16 07:14:21 +00:00
Brett Cannon
a783d06f8c
Clear out the regex cache when the TimeRE cache is invalidated by a locale
...
change.
Fixes bug #1290505 .
2005-09-15 02:34:56 +00:00
Guido van Rossum
8ee3e5aa93
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Gustavo Niemeyer
6fa0c5a452
Bug #1202493 : Fixing SRE parser to handle '{}' as perl does, rather than
...
considering it exactly like a '*'.
2005-09-14 08:54:39 +00:00
Raymond Hettinger
ebb7f30111
Speed-up escape()
2005-09-12 22:50:37 +00:00
Raymond Hettinger
a1d09e2ded
Minor cleanup.
2005-09-11 16:34:05 +00:00
Raymond Hettinger
cf6b6326e5
Corrected version of 1.170
2005-09-10 18:17:54 +00:00
Raymond Hettinger
2bdec7bfb0
Revert 1.170. Add tests.
2005-09-10 14:30:09 +00:00
Raymond Hettinger
803ce801ab
Simplify and speed-up unquote().
2005-09-10 06:49:04 +00:00
Raymond Hettinger
957b126649
Simplify and speed-up quote_plus().
2005-09-10 02:27:41 +00:00
Raymond Hettinger
199d2f7997
SF #1285086 : urllib.quote is too slow
...
Simplify and speed-up quote() function.
2005-09-09 22:27:13 +00:00
Vinay Sajip
0ee9ba258e
Added _handlerList to allow shutdown to flush and close handlers in reverse order of creation (see SF# 1282539)
2005-09-08 18:14:16 +00:00
Hye-Shik Chang
e029da0aca
Quote docstring with r"" to keep '\r\n' in example code.
2005-09-07 07:40:05 +00:00
Vinay Sajip
c384fc2357
Changed _srcfile determination to support py2exe.
2005-09-02 11:20:33 +00:00
Walter Dörwald
c5238b8288
SF bug #1235646 : codecs.StreamRecoder.next() now reencodes the data it reads
...
from the input stream, so that the output is a byte string in the correct
encoding instead of a unicode string.
2005-09-01 11:56:53 +00:00
Georg Brandl
cd3c26a717
Reverting previous checkin. This breaks too much of HTMLParser to be applied
...
without thought. Anyway, such malformed HTML is better handled by something
like BeautifulSoup.
2005-09-01 06:25:34 +00:00
Neal Norwitz
4ce69a5b06
No need to import exceptions, they are builtins
2005-09-01 00:45:28 +00:00
Neal Norwitz
6203196c7c
Remove unused import
2005-09-01 00:39:02 +00:00
Georg Brandl
a1be88e24d
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
2005-08-31 22:48:45 +00:00
Georg Brandl
7847405a76
bug [ 761452 ] HTMLParser chokes on my.yahoo.com output
2005-08-31 22:08:45 +00:00
Piers Lauder
be5615ef99
updated __version__
2005-08-31 10:50:03 +00:00
Piers Lauder
14f39402af
changed select() so readonly flag is treated as a boolean
2005-08-31 10:46:29 +00:00
Walter Dörwald
a47d1c08d0
SF bug #1251300 : On UCS-4 builds the "unicode-internal" codec will now complain
...
about illegal code points. The codec now supports PEP 293 style error handlers.
(This is a variant of the Nik Haldimann's patch that detects truncated data)
2005-08-30 10:23:14 +00:00
Brett Cannon
f1b2ba6aa1
Fix logic error introduced in last commit. Also add a comment to explain what
...
the code is doing.
2005-08-29 18:25:55 +00:00
Brett Cannon
6e372d1422
fix bug where str.find() was being misused where __contains__ should have been
...
used.
2005-08-27 19:25:59 +00:00
Martin v. Löwis
5dbdc59577
Patch #1168594 : set sizes of non-regular files to zero. Fixes #1167128 .
...
Will backport to 2.4.
2005-08-27 10:07:56 +00:00
Tim Peters
9e34c04732
Whitespace normalization (via reindent.py).
2005-08-26 15:20:46 +00:00
Tim Peters
e8889c5741
testSeekBackwardsFromEnd(): Repair obvious syntax error.
2005-08-26 14:33:57 +00:00
Georg Brandl
d603c04bcd
Add list() around xreadlines()
2005-08-26 13:23:54 +00:00
Georg Brandl
62fe585b4b
*** empty log message ***
2005-08-26 13:21:50 +00:00
Georg Brandl
5a650a253c
patch [ 810023 ] Fix for off-by-one bug in urllib.URLopener.retrieve
2005-08-26 08:51:34 +00:00
Georg Brandl
d2e3ba7a35
patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on Windows
2005-08-26 08:34:00 +00:00
Georg Brandl
905a01aba4
bug [ 1262320 ] minidom.py alternate newl support is broken
2005-08-25 22:14:15 +00:00
Georg Brandl
175a7dcf65
bug [ 1262320 ] minidom.py alternate newl support is broken
2005-08-25 22:02:43 +00:00