Georg Brandl
87fa559479
Patch #1610437 : fix a tarfile bug with long filename headers.
2006-12-06 22:21:18 +00:00
Matthias Klose
d149d0c76a
- Fix build failure on kfreebsd and on the hurd.
2006-12-03 17:16:41 +00:00
Martin v. Löwis
a00bcac003
Patch #1371075 : Make ConfigParser accept optional dict type
...
for ordering, sorting, etc.
2006-12-03 12:01:53 +00:00
Martin v. Löwis
8609da9b17
Move IDLE news into NEWS.txt.
2006-12-03 09:54:46 +00:00
Raymond Hettinger
8a7e76bcfa
Add name to credits (for untokenize).
2006-12-02 02:00:39 +00:00
Walter Dörwald
f008203cb4
Move xdrlib tests from the module into a separate test script,
...
port the tests to unittest and add a few new tests.
2006-12-01 16:59:47 +00:00
Georg Brandl
21d900f1d6
Bug #1603321 : make pstats.Stats accept Unicode file paths.
2006-11-26 19:27:47 +00:00
Thomas Heller
25d208bd46
Fix bug #1598620 : A ctypes structure cannot contain itself.
2006-11-24 18:45:39 +00:00
Raymond Hettinger
a3c77677ca
... and the number of the counting shall be three.
2006-11-23 21:35:19 +00:00
Michael W. Hudson
f390442130
a test for an error condition not covered by existing tests
...
(noticed this when writing the equivalent code for pypy)
2006-11-23 13:54:04 +00:00
Walter Dörwald
39b8b6afb5
Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))
...
SF bug #1601501 .
2006-11-23 05:03:56 +00:00
Martin v. Löwis
4ebbefe677
Patch #1362975 : Rework CodeContext indentation algorithm to
...
avoid hard-coding pixel widths. Also make the text's scrollbar
a child of the text frame, not the top widget.
2006-11-22 08:50:02 +00:00
Neal Norwitz
10cdb7492e
Oops, convert tabs to spaces
2006-11-21 05:51:51 +00:00
Neal Norwitz
4fe442383d
Bug #1599782 : Fix segfault on bsddb.db.DB().type().
...
The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.
Will backport.
2006-11-21 05:26:22 +00:00
Andrew M. Kuchling
5dba6f74c6
Jython compatibility fix: if uu.decode() opened its output file, be sure to
...
close it.
2006-11-20 13:39:37 +00:00
Martin v. Löwis
07529354db
Patch #1070046 : Marshal new-style objects like InstanceType
...
in xmlrpclib.
2006-11-19 18:51:54 +00:00
Andrew M. Kuchling
9eec51c04f
Add a test case of data w/ bytes > 127
2006-11-19 18:40:01 +00:00
Martin v. Löwis
cffcc8b195
Make cStringIO.truncate raise IOError for negative
...
arguments (even for -1). Fixes the last bit of
#1359365 .
2006-11-19 10:41:41 +00:00
Georg Brandl
283a1353a0
Patch [ 1586791 ] better error msgs for some TypeErrors
2006-11-19 08:48:30 +00:00
Andrew M. Kuchling
db4f255c61
Expand checking in test_sha
2006-11-18 22:17:33 +00:00
Martin v. Löwis
bba003ef24
Patch #1472877 : Fix Tix subwidget name resolution.
...
Will backport to 2.5.
2006-11-18 18:42:11 +00:00
Martin v. Löwis
ef5fd3e7c9
Patch #1594554 : Always close a tkSimpleDialog on ok(), even
...
if an exception occurs.
Will backport to 2.5.
2006-11-18 18:05:35 +00:00
Martin v. Löwis
c73a4a4f51
Patch #1538878 : Don't make tkSimpleDialog dialogs transient if
...
the parent window is withdrawn. This mirrors what dialog.tcl
does.
Will backport to 2.5.
2006-11-18 18:00:23 +00:00
Andrew M. Kuchling
8c456f3b57
Remove file-locking in MH.pack() method.
...
This change looks massive but it's mostly a re-indenting after
removing some try...finally blocks.
Also adds a test case that does a pack() while the mailbox is locked; this
test would have turned up bugs in the original code on some platforms.
In both nmh and GNU Mailutils' implementation of MH-format mailboxes,
no locking is done of individual message files when renaming them.
The original mailbox.py code did do locking, which meant that message
files had to be opened. This code was buggy on certain platforms
(found through reading the code); there were code paths that closed
the file object and then called _unlock_file() on it.
Will backport to 25-maint once I see how the buildbots react to this patch.
2006-11-17 13:30:25 +00:00
Georg Brandl
25aabf4cbb
Bug #1588217 : don't parse "= " as a soft line break in binascii's
...
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
2006-11-16 17:08:45 +00:00
Georg Brandl
540821183b
Bug #1597824 : return the registered function from atexit.register()
...
to facilitate usage as a decorator.
2006-11-16 16:50:59 +00:00
Martin v. Löwis
45cd4ff95d
Patch #1360200 : Use unmangled_version RPM spec field to deal with
...
file name mangling.
Will backport to 2.5.
2006-11-12 18:56:03 +00:00
Martin v. Löwis
36cbc08f3f
Patch #1359217 : Ignore 2xx response before 150 response.
...
Will backport to 2.5.
2006-11-12 18:48:13 +00:00
Martin v. Löwis
065f0c8a06
Patch #1355023 : support whence argument for GzipFile.seek.
2006-11-12 10:41:39 +00:00
Martin v. Löwis
040a927cd1
Patch #1065257 : Support passing open files as body in
...
HTTPConnection.request().
2006-11-12 10:32:47 +00:00
Phillip J. Eby
305e778a82
Fix SF#1566719: not creating site-packages (or other target directory) when
...
installing .egg-info for a project that contains no modules or packages,
while using --root (as in bdist_rpm).
2006-11-10 00:33:36 +00:00
Andrew M. Kuchling
978d8286ae
[Patch #1514543 ] mailbox (Maildir): avoid losing messages on name clash
...
Two changes:
Where possible, use link()/remove() to move files into a directory; this
makes it easier to avoid overwriting an existing file.
Use _create_carefully() to create files in tmp/, which uses O_EXCL.
Backport candidate.
2006-11-09 21:16:46 +00:00
Andrew M. Kuchling
b5686da24f
[Patch #1514544 by David Watson] use fsync() to ensure data is really on disk
2006-11-09 13:51:14 +00:00
Andrew M. Kuchling
a3e5d3757c
[Bug #1569790 ] mailbox.Maildir.get_folder() loses factory information
...
Both the Maildir and MH classes had this bug; the patch fixes both classes
and adds a test.
Will backport to 25-maint.
2006-11-09 13:27:07 +00:00
Martin v. Löwis
038cad7ee4
Patch #1592250 : Add elidge argument to Tkinter.Text.search.
2006-11-09 11:27:32 +00:00
Martin v. Löwis
b2bba739c5
Patch #838546 : Make terminal become controlling in pty.fork().
...
Will backport to 2.5.
2006-11-09 11:06:03 +00:00
Martin v. Löwis
5361e9a54e
Patch #1351744 : Add askyesnocancel helper for tkMessageBox.
2006-11-08 07:35:55 +00:00
Martin v. Löwis
3a62404264
Correctly forward exception in instance_contains().
...
Fixes #1591996 . Patch contributed by Neal Norwitz.
Will backport.
2006-11-08 06:46:37 +00:00
Neal Norwitz
85dbec6da7
Bug #1588287 : fix invalid assertion for `1,2` in debug builds.
...
Will backport
2006-11-04 19:25:22 +00:00
Martin v. Löwis
5310e5078a
- Patch #1060577 : Extract list of RPM files from spec file in
...
bdist_rpm
Will backport to 2.5.
2006-11-04 18:14:06 +00:00
Tim Peters
abd8a336a3
Whitespace normalization.
2006-11-03 02:32:46 +00:00
Vinay Sajip
ef7f3bf3b3
Change to improve speed of _fixupChildren
2006-10-31 17:32:37 +00:00
Neal Norwitz
1ead698494
I'm assuming this is correct, it fixes the tests so they pass again
2006-10-29 23:58:36 +00:00
Walter Dörwald
98c70acf47
Add tests for incremental codecs with an errors
...
argument.
2006-10-29 23:02:27 +00:00
Walter Dörwald
92911bfc6a
Add tests for basic argument errors.
2006-10-29 22:06:28 +00:00
Georg Brandl
7d00099021
Move the check for openpty to the beginning.
2006-10-29 21:54:18 +00:00
Georg Brandl
59ba4299d0
Remove leftover test output file.
2006-10-29 20:35:12 +00:00
Georg Brandl
cd97208110
Convert test_openpty to unittest.
2006-10-29 20:31:17 +00:00
Georg Brandl
e8328ba723
Convert test_MimeWriter to unittest.
2006-10-29 20:28:26 +00:00
Georg Brandl
71a2089712
Completely convert test_httplib to unittest.
2006-10-29 20:24:01 +00:00
Georg Brandl
e184433654
Convert test_cgi to unittest.
2006-10-29 20:09:12 +00:00
Georg Brandl
a962eb32d9
Convert test_cookie to unittest.
2006-10-29 19:51:16 +00:00
Georg Brandl
bd0fb14e51
Convert test_types to unittest.
2006-10-29 19:35:03 +00:00
Georg Brandl
850b2be67e
Convert test_nis to unittest.
2006-10-29 19:24:43 +00:00
Georg Brandl
eecce795a3
Convert test_poll to unittest.
2006-10-29 19:20:45 +00:00
Georg Brandl
3163179f1b
Convert test_mmap to unittest.
2006-10-29 19:13:40 +00:00
Georg Brandl
b9f4ad3a9a
Bug #1576657 : when setting a KeyError for a tuple key, make sure that
...
the tuple isn't used as the "exception arguments tuple".
2006-10-29 18:31:42 +00:00
Georg Brandl
7a4e804469
Bug #1586773 : extend hashlib docstring.
2006-10-29 18:01:08 +00:00
Georg Brandl
2c9838e30f
Bug #1586613 : fix zlib and bz2 codecs' incremental en/decoders.
2006-10-29 14:39:09 +00:00
Georg Brandl
5b4e1c2530
Fix the new EncodedFile test to work with big endian platforms.
2006-10-29 09:32:16 +00:00
Georg Brandl
facd273198
Test assert if __debug__ is true.
2006-10-29 09:18:00 +00:00
Georg Brandl
3354f285b9
Patch #1583880 : fix tarfile's problems with long names and posix/
...
GNU modes.
2006-10-29 09:16:12 +00:00
Georg Brandl
6c0e1e8673
Bug #1357915 : allow all sequence types for shell arguments in
...
subprocess.
2006-10-29 09:05:04 +00:00
Georg Brandl
fe9c71bcd3
Remove trailing comma.
2006-10-29 09:01:01 +00:00
Georg Brandl
5addf70078
Bug #1586448 : the compiler module now emits the same bytecode for
...
list comprehensions as the builtin compiler, using the LIST_APPEND
opcode.
2006-10-29 08:53:06 +00:00
Georg Brandl
8f99f81dfc
Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
...
fix all codecs file wrappers to work correctly with the "with"
statement (bug #1586513 ).
2006-10-29 08:39:22 +00:00
Neal Norwitz
07fdcfd6c9
Fix test_modulefinder so it doesn't fail when run after test_distutils.
2006-10-28 21:56:49 +00:00
Neal Norwitz
21997afb0c
Fix bug #1565514 , SystemError not raised on too many nested blocks.
...
It seems like this should be a different error than SystemError, but
I don't have any great ideas and SystemError was raised in 2.4 and earlier.
Will backport.
2006-10-28 21:19:07 +00:00
Georg Brandl
b21e0815bf
make test_grammar pass with python -O
2006-10-28 20:25:09 +00:00
Georg Brandl
0b679629c6
Convert test_opcodes to unittest.
2006-10-28 13:56:58 +00:00
Georg Brandl
2f03760a98
Convert test_math to unittest.
2006-10-28 13:51:49 +00:00
Georg Brandl
856b446793
Update outstanding bugs test file.
2006-10-28 13:11:41 +00:00
Georg Brandl
c6fdec6d7e
Convert test_global, test_scope and test_grammar to unittest.
...
I tried to enclose all tests which must be run at the toplevel
(instead of inside a method) in exec statements.
2006-10-28 13:10:17 +00:00
Walter Dörwald
3a3d8ea497
Port test_bufio to unittest.
2006-10-28 10:47:12 +00:00
Thomas Heller
112d1a64ac
Modulefinder now handles absolute and relative imports, including
...
tests.
Will backport to release25-maint.
2006-10-27 19:05:53 +00:00
Thomas Heller
df08f0b9a0
WindowsError.str should display the windows error code,
...
not the posix error code; with test.
Fixes #1576174 .
Will backport to release25-maint.
2006-10-27 18:31:36 +00:00
Andrew M. Kuchling
872dba4253
[Patch #1574068 by Scott Dial] urllib and urllib2 were using
...
base64.encodestring() for encoding authentication data.
encodestring() can include newlines for very long input, which
produced broken HTTP headers.
2006-10-27 17:11:23 +00:00
Andrew M. Kuchling
6d72b0e1f8
Clarify docstring
2006-10-27 17:06:16 +00:00
Andrew M. Kuchling
0f87183cf5
[Bug #1575506 ] The _singlefileMailbox class was using the wrong file object in its flush() method, causing an error
2006-10-27 16:55:34 +00:00
Andrew M. Kuchling
41eb7164df
[Bug #1576241 ] Let functools.wraps work with built-in functions
2006-10-27 16:39:10 +00:00
Martin v. Löwis
ee82c0e6b7
Patch #1567274 : Support SMTP over TLS.
2006-10-27 07:13:28 +00:00
Martin v. Löwis
b5bc537c5e
Patch #1549049 : Rewrite type conversion in structmember.
...
Fixes #1545696 and #1566140 . Will backport to 2.5.
2006-10-27 06:16:31 +00:00
Andrew M. Kuchling
efb57072fe
Typo fix
2006-10-26 19:16:46 +00:00
Georg Brandl
a32e0a099b
Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated
2006-10-24 16:54:16 +00:00
Martin v. Löwis
e97c759660
Remove passwd.adjunct.byname from list of maps
...
for test_nis. Will backport to 2.5.
2006-10-22 13:45:13 +00:00
Walter Dörwald
d3973b578f
Port test___future__ to unittest.
2006-10-22 08:59:41 +00:00
Tim Peters
ef3f32f965
Whitespace normalization.
2006-10-18 05:09:12 +00:00
Thomas Heller
d2ea4a2584
ctypes callback functions only support 'fundamental' result types.
...
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584 .
Will backport to release25-maint.
2006-10-17 19:30:48 +00:00
Brett Cannon
d80e0c8677
Fix turtle so that you can launch the demo2 function on its own instead of only
...
when the module is launched as a script.
2006-10-16 03:09:52 +00:00
Martin v. Löwis
a97e06d9db
Round to int, because some systems support sub-second time stamps in stat, but not in utime.
...
Also be consistent with modifying only mtime, not atime.
2006-10-15 11:02:07 +00:00
Martin v. Löwis
cfcd3a9569
Loosen the test for equal time stamps.
2006-10-15 09:35:51 +00:00
Martin v. Löwis
18aaa568fd
Patch #1576166 : Support os.utime for directories on Windows NT+.
2006-10-15 08:43:33 +00:00
Neal Norwitz
cbeb687c68
Update the peephole optimizer to remove more dead code (jumps after returns)
...
and inline jumps to returns.
2006-10-14 21:33:38 +00:00
Georg Brandl
65ad043ea3
Bug #1560179 : speed up posixpath.(dir|base)name
2006-10-12 13:08:16 +00:00
Georg Brandl
35207712dc
Fix tarfile depending on buggy int('1\0', base) behavior.
2006-10-12 12:03:07 +00:00
Georg Brandl
2c1375c8db
Bug #1545497 : when given an explicit base, int() did ignore NULs
...
embedded in the string to convert.
2006-10-12 11:27:59 +00:00
Georg Brandl
5597e261b2
Bug #1548891 : The cStringIO.StringIO() constructor now encodes unicode
...
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
2006-10-12 09:47:12 +00:00
Georg Brandl
b2e81e307d
Bug #1550524 : better heuristics to find correct class definition
...
in inspect.findsource().
2006-10-12 09:20:33 +00:00
Georg Brandl
d076153ee8
Bug #813342 : Start the IDLE subprocess with -Qnew if the parent
...
is started with that option.
2006-10-12 07:57:21 +00:00
Martin v. Löwis
f43893a878
Bug #1565150 : Fix subsecond processing for os.utime on Windows.
2006-10-09 20:44:25 +00:00
Ronald Oussoren
d6272a3cf6
MacOSX: The universal build requires that users have the MacOSX10.4u SDK
...
installed to build extensions. This patch makes distutils emit a warning when
the compiler should use an SDK but that SDK is not installed, hopefully reducing
some confusion.
2006-10-08 17:51:46 +00:00
Ronald Oussoren
d610369e8b
MacOSX: distutils changes the values of BASECFLAGS and LDFLAGS when using a
...
universal build of python on OSX 10.3 to ensure that those flags can be used
to compile code (the universal build uses compiler flags that aren't supported
on 10.3). This patches gives the same treatment to CFLAGS, PY_CFLAGS and
BLDSHARED.
2006-10-08 17:49:52 +00:00
Hye-Shik Chang
b788346573
Bug #1572832 : fix a bug in ISO-2022 codecs which may cause segfault
...
when encoding non-BMP unicode characters. (Submitted by Ray Chason)
2006-10-08 13:48:34 +00:00
Armin Rigo
615842fba6
A very minor bug fix: this code looks like it is designed to accept
...
any hue value and do the modulo itself, except it doesn't quite do
it in all cases. At least, the "cannot get here" comment was wrong.
2006-10-06 16:33:22 +00:00
Andrew M. Kuchling
9d57e53e4e
[Bug #1545341 ] Allow 'classifier' parameter to be a tuple as well as a list. Will backport.
2006-10-06 13:18:26 +00:00
Martin v. Löwis
8b274265f0
Add MSVC8 project files to create wininst-8.exe.
2006-10-04 15:25:28 +00:00
Armin Rigo
7ccbca93a2
Forward-port of r52136,52138: a review of overflow-detecting code.
...
* unified the way intobject, longobject and mystrtoul handle
values around -sys.maxint-1.
* in general, trying to entierely avoid overflows in any computation
involving signed ints or longs is extremely involved. Fixed a few
simple cases where a compiler might be too clever (but that's all
guesswork).
* more overflow checks against bad data in marshal.c.
* 2.5 specific: fixed a number of places that were still confusing int
and Py_ssize_t. Some of them could potentially have caused
"real-world" breakage.
* list.pop(x): fixing overflow issues on x was messy. I just reverted
to PyArg_ParseTuple("n"), which does the right thing. (An obscure
test was trying to give a Decimal to list.pop()... doesn't make
sense any more IMHO)
* trying to write a few tests...
2006-10-04 12:17:45 +00:00
Martin v. Löwis
820d6ac9d7
Fix integer negation and absolute value to not rely
...
on undefined behaviour of the C compiler anymore.
Will backport to 2.5 and 2.4.
2006-10-04 05:47:34 +00:00
Jeremy Hylton
82271f13e7
Fix for SF bug 1569998: break permitted inside try.
...
The compiler was checking that there was something on the fblock
stack, but not that there was a loop on the stack. Fixed that and
added a test for the specific syntax error.
Bug fix candidate.
2006-10-04 02:24:52 +00:00
Barry Warsaw
1e3c3b15df
decode_rfc2231(): As Christian Robottom Reis points out, it makes no sense to
...
test for parts > 3 when we use .split(..., 2).
2006-10-04 02:06:36 +00:00
Brett Cannon
373d90b365
Convert test_imp over to unittest.
2006-10-03 23:23:14 +00:00
Vinay Sajip
2c050af28b
Modified LogRecord.__init__ to make the func parameter optional. (See SF #1569622 ).
2006-10-03 18:21:56 +00:00
Kurt B. Kaiser
e0b673573b
Add comment explaining that error msgs may be due to user code when
...
running w/o subprocess.
2006-10-01 21:54:37 +00:00
Kurt B. Kaiser
c426ffcdfc
Some syntax errors were being caught by tokenize during the tabnanny
...
check, resulting in obscure error messages. Do the syntax check
first. Bug 1562716, 1562719
2006-10-01 21:16:45 +00:00
Georg Brandl
54c3db55a2
Convert test_import to unittest.
2006-09-30 12:16:03 +00:00
Georg Brandl
a92979a1db
Bug #1446043 : correctly raise a LookupError if an encoding name given
...
to encodings.search_function() contains a dot.
2006-09-30 11:22:28 +00:00
Georg Brandl
4ddfcd3b60
Bug #1556784 : allow format strings longer than 127 characters in
...
datetime's strftime function.
2006-09-30 11:17:34 +00:00
Georg Brandl
154324a8c3
Bug #1560617 : in pyclbr, return full module name not only for classes,
...
but also for functions.
2006-09-30 11:06:47 +00:00
Georg Brandl
05b3c450a8
Bug #1457823 : cgi.(Sv)FormContentDict's constructor now takes
...
keep_blank_values and strict_parsing keyword arguments.
2006-09-30 10:58:01 +00:00
Georg Brandl
8d1e5bffc1
Bug #1566602 : correct failure of posixpath unittest when $HOME ends
...
with a slash.
2006-09-30 09:13:21 +00:00
Georg Brandl
3267d28f9d
Bug #1566800 : make sure that EnvironmentError can be called with any
...
number of arguments, as was the case in Python 2.4.
2006-09-30 09:03:42 +00:00
Georg Brandl
5d59c09834
Patch #1567691 : super() and new.instancemethod() now don't accept
...
keyword arguments any more (previously they accepted them, but didn't
use them).
2006-09-30 08:43:30 +00:00
Georg Brandl
8c6674511b
Bug #1565661 : in webbrowser, split() the command for the default
...
GNOME browser in case it is a command with args.
2006-09-30 07:31:57 +00:00
Brett Cannon
11b3535280
Make the error message for when the time data and format do not match clearer.
2006-09-26 23:38:24 +00:00
Armin Rigo
c839c2f226
Another crasher.
2006-09-25 15:16:26 +00:00
Georg Brandl
c7986cee76
Fix a bug in traceback.format_exception_only() that led to an error
...
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
2006-09-24 12:50:24 +00:00
Georg Brandl
a10d3afed2
Fix a bug in the parser's future statement handling that led to "with"
...
not being recognized as a keyword after, e.g., this statement:
from __future__ import division, with_statement
2006-09-24 12:35:36 +00:00
Georg Brandl
2c94bf7d41
Fix webbrowser.BackgroundBrowser on Windows.
2006-09-24 10:36:01 +00:00
Brett Cannon
e042601251
Make output on test_strptime() be more verbose in face of failure. This is in
...
hopes that more information will help debug the failing test on HPPA Ubuntu.
2006-09-23 19:53:20 +00:00
Neal Norwitz
3a23017bb2
Bug #1557232 : fix seg fault with def f((((x)))) and def f(((x),)).
...
These tests should be improved. Hopefully this fixes variations when
flipping back and forth between fpdef and fplist.
Backport candidate.
2006-09-22 08:18:10 +00:00
Jack Diederich
36234e8f66
* regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
...
which breaks negative counts
* added test for negative numbers
will backport to 2.5.1
2006-09-21 17:50:26 +00:00
Neal Norwitz
361b46be24
Add a "crasher" taken from the sgml bug report referenced in the comment
2006-09-11 04:32:57 +00:00
Neal Norwitz
bcc119a22c
Forward port of 51850 from release25-maint branch.
...
As mentioned on python-dev, reverting patch #1504333 because it introduced
an infinite loop in rev 47154.
This patch also adds a test to prevent the regression.
2006-09-11 04:24:09 +00:00
Brett Cannon
ca2ca79d23
Remove the __unicode__ method from exceptions. Allows unicode() to be called
...
on exception classes. Would require introducing a tp_unicode slot to make it
work otherwise.
Fixes bug #1551432 and will be backported.
2006-09-09 07:11:46 +00:00
Thomas Heller
2244af596a
The cast function did not accept c_char_p or c_wchar_p instances
...
as first argument, and failed with a 'bad argument to internal function'
error message.
2006-09-07 19:09:54 +00:00
Thomas Heller
fdb62f0e5f
Anonymous structure fields that have a bit-width specified did not work,
...
and they gave a strange error message from PyArg_ParseTuple:
function takes exactly 2 arguments (3 given).
With tests.
2006-09-07 18:56:28 +00:00
Nick Coghlan
c495c66ea9
Fix the speed regression in inspect.py by adding another cache to speed up getmodule(). Patch #1553314
2006-09-07 10:50:34 +00:00
Gustavo Niemeyer
c36bede6ff
Fixed subprocess bug #1531862 again, after removing tests
...
offending buildbot
2006-09-07 00:48:33 +00:00
Georg Brandl
4e933137af
Fix missing import of the types module in logging.config.
2006-09-06 20:05:58 +00:00
Georg Brandl
38f6237dfe
Bug #1542051 : Exceptions now correctly call PyObject_GC_UnTrack.
...
Also make sure that every exception class has __module__ set to
'exceptions'.
2006-09-06 06:50:05 +00:00
Neal Norwitz
ca460d9722
with and as are now keywords. There are some generated files I can't recreate.
2006-09-06 06:28:06 +00:00
Neal Norwitz
314bef9fff
Revert 51758 because it broke all the buildbots
2006-09-06 03:58:34 +00:00
Gustavo Niemeyer
8cb64eaaf3
Fixing #1531862 : Do not close standard file descriptors in the
...
subprocess module.
2006-09-06 01:58:52 +00:00
Andrew M. Kuchling
e6728252a3
[Bug #1526834 ] Fix crash in pdb when you do 'b f(';
...
the function name was placed into a regex pattern and the unbalanced paren
caused re.compile() to report an error
2006-09-05 13:19:18 +00:00
Andrew M. Kuchling
a5453c48d5
[Bug #1525469 ] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren
2006-09-05 13:15:41 +00:00
Hye-Shik Chang
199f1db1fa
Fix a few bugs on cjkcodecs found by Oren Tirosh:
...
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2
codepoints now.
2006-09-05 12:07:09 +00:00
Neal Norwitz
dac090d3e6
Bug #1520864 (again): unpacking singleton tuples in list comprehensions and
...
generator expressions (x for x, in ... ) works again.
Sigh, I only fixed for loops the first time, not list comps and genexprs too.
I couldn't find any more unpacking cases where there is a similar bug lurking.
This code should be refactored to eliminate the duplication. I'm sure
the listcomp/genexpr code can be refactored. I'm not sure if the for loop
can re-use any of the same code though.
Will backport to 2.5 (the only place it matters).
2006-09-05 03:53:08 +00:00
Neal Norwitz
4bc2c0919b
Patch #1540470 , for OpenBSD 4.0. Backport candidate for 2.[34].
2006-09-05 02:57:01 +00:00
Neal Norwitz
919d5cc163
This was found by Guido AFAIK on p3yk (sic) branch.
2006-09-05 02:35:08 +00:00
Neal Norwitz
a22975fb35
Fix SF bug #1546288 , crash in dict_equal.
2006-09-05 02:24:03 +00:00
Tim Peters
c4a70fbb78
Add missing svn:eol-style property to text files.
2006-09-05 02:22:17 +00:00
Tim Peters
dd5e7b9ae3
Whitespace normalization.
2006-09-05 02:21:19 +00:00
Raymond Hettinger
a0c95fa4d8
Fix endcase for str.rpartition()
2006-09-04 15:32:48 +00:00
Neal Norwitz
c1120b4b66
Hmm, this test has failed at least twice recently on the OpenBSD and
...
Debian sparc buildbots. Since this goes through a lot of tests
and hits the disk a lot it could be slow (especially if NFS is involved).
I'm not sure if that's the problem, but printing periodic msgs shouldn't hurt.
The code was stolen from test_compiler.
2006-09-02 19:40:19 +00:00
Neal Norwitz
681d86743c
Add missing word in comment
2006-09-02 18:51:34 +00:00
Nick Coghlan
ced1218dd1
Make decimal.ContextManager a private implementation detail of decimal.localcontext()
2006-09-02 03:54:17 +00:00
Neal Norwitz
69e8897505
Bug #1550714 : fix SystemError from itertools.tee on negative value for n.
...
Needs backport to 2.5.1 and earlier.
2006-09-02 02:58:13 +00:00
Nick Coghlan
db38588a25
Remove the old decimal context management tests from test_contextlib (guess who didn't run the test suite before committing...)
2006-08-31 12:51:25 +00:00
Nick Coghlan
8b6999b4c5
Fix the wrongheaded implementation of context management in the decimal module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5)
2006-08-31 12:00:43 +00:00
Neal Norwitz
d219e7f986
Fix a couple of typos.
2006-08-29 05:40:58 +00:00
Jack Diederich
7b60464ceb
- Move functions common to all path modules into genericpath.py and have the
...
OS speicifc path modules import them.
- Have os2emxpath import common functions fron ntpath instead of using copies
2006-08-26 18:42:06 +00:00
Tim Peters
4582d7d905
A new test here relied on preserving invisible trailing
...
whitespace in expected output. Stop that.
2006-08-25 22:26:21 +00:00
Tim Peters
147f9ae6db
Whitespace normalization.
2006-08-25 22:05:39 +00:00
Armin Rigo
cd73a78b68
The regular expression engine in '_sre' can segfault when interpreting
...
bogus bytecode. It is unclear whether this is a real bug or a "won't
fix" case like bogus_code_obj.py.
2006-08-25 12:44:28 +00:00
Thomas Heller
98619f267c
Port _ctypes.pyd to win64 on AMD64.
2006-08-25 07:27:33 +00:00
Neal Norwitz
391e5f4c9f
importing types is not necessary if we use isinstance
2006-08-25 01:52:49 +00:00
Thomas Wouters
9e398cac94
Fix SF bug #1545837 : array.array borks on deepcopy.
...
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
2006-08-24 18:40:20 +00:00
Alex Martelli
348dc88097
Reverting the patch that tried to fix the issue whereby x**2 raises
...
OverflowError while x*x succeeds and produces infinity; apparently
these inconsistencies cannot be fixed across ``all'' platforms and
there's a widespread feeling that therefore ``every'' platform
should keep suffering forevermore. Ah well.
2006-08-23 22:17:59 +00:00
Jeremy Hylton
39c532c0b6
Replace dead code with an assert.
...
Now that COMMENT tokens are reliably followed by NL or NEWLINE,
there is never a need to add extra newlines in untokenize.
2006-08-23 21:26:46 +00:00
Jeremy Hylton
76467ba6d6
Bug fixes large and small for tokenize.
...
Small: Always generate a NL or NEWLINE token following
a COMMENT token. The old code did not generate an NL token if
the comment was on a line by itself.
Large: The output of untokenize() will now match the
input exactly if it is passed the full token sequence. The
old, crufty output is still generated if a limited input
sequence is provided, where limited means that it does not
include position information for tokens.
Remaining bug: There is no CONTINUATION token (\) so there is no way
for untokenize() to handle such code.
Also, expanded the number of doctests in hopes of eventually removing
the old-style tests that compare against a golden file.
Bug fix candidate for Python 2.5.1. (Sigh.)
2006-08-23 21:14:03 +00:00
Alex Martelli
20362a820b
x**2 should about equal x*x (including for a float x such that the result is
...
inf) but didn't; added a test to test_float to verify that, and ignored the
ERANGE value for errno in the pow operation to make the new test pass (with
help from Marilyn Davis at the Google Python Sprint -- thanks!).
2006-08-23 20:42:02 +00:00
Jeremy Hylton
29bef0bbaa
Baby steps towards better tests for tokenize
2006-08-23 18:37:43 +00:00
Jeremy Hylton
60e96f666c
Expose column offset information in parse trees.
2006-08-22 20:46:00 +00:00
Neal Norwitz
17753ecbfa
Patch #1541585 : fix buffer overrun when performing repr() on
...
a unicode string in a build with wide unicode (UCS-4) support.
This code could be improved, so add an XXX comment.
2006-08-21 22:21:19 +00:00
Neal Norwitz
4f096d9487
Patch #1542451 : disallow continue anywhere under a finally
...
I'm undecided if this should be backported to 2.5 or 2.5.1.
Armin suggested to wait (I'm of the same opinion). Thomas W thinks
it's fine to go in 2.5.
2006-08-21 19:47:08 +00:00
Neal Norwitz
8a519392d5
Fix bug #1543303 , tarfile adds padding that breaks gunzip.
...
Patch # 1543897.
Will backport to 2.5
2006-08-21 17:59:46 +00:00
Georg Brandl
8c036ccf93
Patch #1542948 : fix urllib2 header casing issue. With new test.
2006-08-20 13:15:39 +00:00
Anthony Baxter
78b1a08373
Updating IDLE's version number to match Python's (as per python-dev
...
discussion).
2006-08-18 07:29:02 +00:00
Martin v. Löwis
2eb8c4f292
Bug #1541863 : uuid.uuid1 failed to generate unique identifiers
...
on systems with low clock resolution.
2006-08-18 03:47:18 +00:00
Neil Schemenauer
4c6b0d5bec
Fix a bug in the ``compiler`` package that caused invalid code to be
...
generated for generator expressions.
2006-08-16 23:38:05 +00:00
Kurt B. Kaiser
7ae354846f
File menu hotkeys: there were three 'p' assignments. Reassign the
...
'Save Copy As' and 'Print' hotkeys to 'y' and 't'. Change the
Shell menu hotkey from 's' to 'l'.
M Bindings.py
M PyShell.py
M NEWS.txt
2006-08-16 21:45:59 +00:00
Fredrik Lundh
dc075b9ddd
SF#1534630
...
ignore data that arrives before the opening start tag
2006-08-16 16:47:07 +00:00
Thomas Heller
b4a0cf17c4
Remove the special casing of Py_None when converting the return value
...
of the Python part of a callback function to C. If it cannot be
converted, call PyErr_WriteUnraisable with the exception we got.
Before, arbitrary data has been passed to the calling C code in this
case.
(I'm not really sure the NEWS entry is understandable, but I cannot
find better words)
2006-08-16 15:10:12 +00:00
Thomas Heller
b0aa98fd4f
The __repr__ method of a NULL py_object does no longer raise an
...
exception. Remove a stray '?' character from the exception text
when the value is retrieved of such an object.
Includes tests.
2006-08-16 14:07:44 +00:00
Marc-André Lemburg
604c864f0f
Revert to having static version numbers again.
2006-08-16 08:13:26 +00:00
Kurt B. Kaiser
f137e1df2c
Get quit() and exit() to work cleanly when not using subprocess.
2006-08-16 07:04:17 +00:00
Ka-Ping Yee
b1cb56ad17
Update code and tests to support the 'bytes_le' attribute (for
...
little-endian byte order on Windows), and to work around clocks
with low resolution yielding duplicate UUIDs.
Anthony Baxter has approved this change.
2006-08-16 07:02:50 +00:00
Kurt B. Kaiser
d112bc7958
Patch #1540892 : site.py Quitter() class attempts to close sys.stdin
...
before raising SystemExit, allowing IDLE to honor quit() and exit().
M Lib/site.py
M Lib/idlelib/PyShell.py
M Lib/idlelib/CREDITS.txt
M Lib/idlelib/NEWS.txt
M Misc/NEWS
2006-08-16 05:01:42 +00:00
Anthony Baxter
b409666e8c
preparing for 2.5c1
2006-08-16 03:42:26 +00:00
Kurt B. Kaiser
2a7ff297c5
The 'with' statement is now a Code Context block opener
2006-08-16 03:15:26 +00:00
Neal Norwitz
271a8689e9
Subclasses of int/long are allowed to define an __index__.
2006-08-15 06:29:03 +00:00
Neal Norwitz
6e482569c8
Update the docstring to use a version a little newer than 1999. This was
...
taken from a Debian patch. Should we update the version for each release?
2006-08-15 04:59:30 +00:00
Neal Norwitz
b476fdf7c3
Fix the test for SocketServer so it should pass on cygwin and not fail
...
sporadically on other platforms. This is really a band-aid that doesn't
fix the underlying issue in SocketServer. It's not clear if it's worth
it to fix SocketServer, however, I opened a bug to track it:
http://python.org/sf/1540386
2006-08-15 04:58:28 +00:00
Tim Peters
c02c1c8a12
Whitespace normalization.
2006-08-15 00:25:04 +00:00
Georg Brandl
d76bd69712
Cookie.py shouldn't "bogusly" use string._idmap.
2006-08-14 22:01:24 +00:00
Georg Brandl
7a1af770b9
Patch #1536071 : trace.py should now find the full module name of a
...
file correctly even on Windows.
2006-08-14 21:55:28 +00:00
Georg Brandl
85fec59104
Add an additional test: BZ2File write methods should raise IOError
...
when file is read-only.
2006-08-14 21:45:32 +00:00
Georg Brandl
3335a7ad63
Patch #1535500 : fix segfault in BZ2File.writelines and make sure it
...
raises the correct exceptions.
2006-08-14 21:42:55 +00:00
Georg Brandl
2463f8f831
Make tabnanny recognize IndentationErrors raised by tokenize.
...
Add a test to test_inspect to make sure indented source
is recognized correctly. (fixes #1224621 )
2006-08-14 21:34:08 +00:00
Thomas Heller
867200483b
Apply the patch #1532975 plus ideas from the patch #1533481 .
...
ctypes instances no longer have the internal and undocumented
'_as_parameter_' attribute which was used to adapt them to foreign
function calls; this mechanism is replaced by a function pointer in
the type's stgdict.
In the 'from_param' class methods, try the _as_parameter_ attribute if
other conversions are not possible.
This makes the documented _as_parameter_ mechanism work as intended.
Change the ctypes version number to 1.0.1.
2006-08-14 11:17:48 +00:00