Raymond Hettinger
127ef44c7b
Bug #1575169 : operator.isSequenceType() now returns False for subclasses of dict.
2007-02-07 22:12:01 +00:00
Raymond Hettinger
113776c411
Check for a common user error with defaultdict().
2007-02-07 21:40:49 +00:00
Peter Astrand
39e23b2bfa
Applied patch 1124861.3.patch to solve bug #1124861 : Automatically create pipes on Windows, if GetStdHandle fails. Backport from rev 53646.
2007-02-06 15:41:46 +00:00
Raymond Hettinger
21191f4f0c
Bug #1648179 : set.update() not recognizing __iter__ overrides in dict subclasses.
2007-02-01 21:01:21 +00:00
Georg Brandl
cd7a78e0a4
[Patch #783050 from Patrick Lynch] The emulation of forkpty() is incorrect;
...
the master should close the slave fd.
Added a test to test_pty.py that reads from the master_fd after doing
a pty.fork(); without the fix it hangs forever instead of raising an
exception. (<crossing fingers for the buildbots>)
Backport from trunk rev. 53146.
2007-01-31 07:48:49 +00:00
Georg Brandl
20aa477a2d
Patch #1638243 : the compiler package is now able to correctly compile
...
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
(backport from rev. 53575)
2007-01-27 17:43:07 +00:00
Brett Cannon
6d8e5ad09d
Backport fix for bug #1643943 .
2007-01-25 23:22:24 +00:00
Thomas Heller
817b489422
Merged revisions 53556 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r53556 | thomas.heller | 2007-01-25 19:34:14 +0100 (Do, 25 Jan 2007) | 3 lines
Fix for #1643874 : When calling SysAllocString, create a PyCObject
which will eventually call SysFreeString to free the BSTR resource.
........
2007-01-25 19:19:35 +00:00
Brett Cannon
ba2ec0545a
Clarify bug #1377858 entry.
2007-01-23 22:46:12 +00:00
Brett Cannon
75ba075110
If you created a weakref in an object's __del__ method to itself it would
...
segfault the interpreter during weakref clean up. Now any new weakrefs created
after __del__ is run are removed silently.
Fixes bug #1377858 and the weakref_in_del crasher for new-style classes.
Classic classes are still affected.
2007-01-23 22:41:20 +00:00
Martin v. Löwis
601d03a5be
Make PyTraceBack_Here use the current thread, not the
...
frame's thread state. Fixes #1579370 .
2007-01-23 21:11:58 +00:00
Thomas Wouters
e471317a08
Backport trunk revision 53527:
...
SF patch #1630975 : Fix crash when replacing sys.stdout in sitecustomize
When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.
This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
2007-01-23 13:54:30 +00:00
Andrew M. Kuchling
b8c6e1f33f
[Bug #1552726 ] Avoid unnecessary polling at the interpreter prompt when certain versions of readline are being used
2007-01-22 16:10:27 +00:00
Peter Astrand
bb6a0edce1
Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181 . Backport from rev. 53295.
2007-01-21 15:45:25 +00:00
Georg Brandl
962e9165aa
Patch #1627441 : close sockets properly in urllib2.
...
(backport from rev. 53511)
2007-01-21 10:35:14 +00:00
Georg Brandl
8e932e7d68
Bug #1486663 : don't reject keyword arguments for subclasses of builtin
...
types.
(backport from rev. 53509)
2007-01-21 10:28:56 +00:00
Martin v. Löwis
9d179ce4f9
Prefix AST symbols with _Py_. Fixes #1637022 .
2007-01-19 06:42:33 +00:00
Georg Brandl
eb68188a0d
Bug #1629125 : fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
...
(backport from rev. 53477)
2007-01-17 21:20:01 +00:00
Thomas Heller
dcb6eba831
Bug #1610795 : ctypes.util.find_library works now on BSD systems.
2007-01-17 19:55:40 +00:00
Matthias Klose
9e031c7c9d
- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092 ).
2007-01-11 11:42:43 +00:00
Thomas Heller
5131925034
Change the ctypes version number to "1.0.2".
2007-01-10 20:07:29 +00:00
Raymond Hettinger
5b44cbe6d8
Fix zero-length corner case for iterating over a mutating deque.
2007-01-08 18:05:53 +00:00
Neal Norwitz
7770f9f6d2
Backport:
...
Prevent crash on shutdown which can occur if we are finalizing
and the module dict has been cleared already and some object
raises a warning (like in a __del__).
2007-01-05 05:28:50 +00:00
Gregory P. Smith
1a050f5f52
support linking the _bsddb extension module against BerkeleyDB 4.5
...
[backport of r53252]
2007-01-05 02:09:06 +00:00
Martin v. Löwis
bea1c70144
Bug #1566280 : Explicitly invoke threading._shutdown from Py_Main,
...
to avoid relying on atexit.
2007-01-04 21:06:57 +00:00
Raymond Hettinger
ca516d21ab
Fix stability of heapq's nlargest() and nsmallest().
2007-01-04 17:53:16 +00:00
Raymond Hettinger
9cdf70399f
For sets with cyclical reprs, emit '...' instead of recursing.
2006-12-29 18:49:13 +00:00
Lars Gustäbel
f9a2c63c79
Patch #1504073 : Fix tarfile.open() for mode "r" with a fileobj argument.
...
Backport from rev. 53161.
2006-12-27 10:36:58 +00:00
Lars Gustäbel
12e087a1b1
Patch #1262036 : Prevent TarFiles from being added to themselves under
...
certain conditions.
(backport from rev. 53155)
Moved message from my previous change to the right place in
Misc/NEWS.
2006-12-23 18:13:57 +00:00
Lars Gustäbel
aedb92e59c
Patch #1230446 : tarfile.py: fix ExFileObject so that read() and tell()
...
work correctly together with readline().
(backport from rev. 53153)
2006-12-23 16:51:47 +00:00
Andrew M. Kuchling
60775f29de
[Patch #827559 from Chris Gonnerman] Make SimpleHTTPServer redirect when a directory URL is missing the trailing slash; this lets relative links work.
2006-12-22 19:08:41 +00:00
Andrew M. Kuchling
bbad84b41a
[Bug #737202 ; fix from Titus Brown] Make CGIHTTPServer work for scripts in sub-directories
2006-12-22 13:28:43 +00:00
Raymond Hettinger
5425a67331
Bug #1590891 : random.randrange don't return correct value for big number
2006-12-20 07:43:59 +00:00
Andrew M. Kuchling
fcb7513fc9
Add NEWS item
2006-12-19 15:13:44 +00:00
Andrew M. Kuchling
e6acc8718c
Add forgotten NEWS item for previous commit
2006-12-18 20:27:30 +00:00
Matthias Klose
f877b25008
- Fix the build of the library reference in info format.
2006-12-09 12:13:02 +00:00
Georg Brandl
2bcf0154d5
Patch #1608267 : fix a race condition in os.makedirs() is the directory
...
to be created is already there.
(backport from rev. 52972)
2006-12-09 09:10:18 +00:00
Raymond Hettinger
775ebe29a5
Backport fixes to set objects:
...
rev 52964 sf 1576657 KeyError unpacks tuple arguments
rev 52963 sf 1456209 obscure resizing vulnerability
rev 52962 redundant calls to PyObject_Hash()
2006-12-08 18:12:24 +00:00
Georg Brandl
25f58f6b5a
Patch #1610437 : fix a tarfile bug with long filename headers.
...
(backport from rev. 52938)
2006-12-06 22:21:23 +00:00
Matthias Klose
fa713e18f6
- Fix build failure on kfreebsd and on the hurd.
2006-12-03 17:13:54 +00:00
Martin v. Löwis
95b744cea9
Patch #1544279 : Improve thread-safety of the socket module by moving
...
the sock_addr_t storage out of the socket object.
2006-12-03 11:24:00 +00:00
Thomas Heller
84a90cade5
Fix #1563807 : _ctypes built on AIX fails with ld ffi error.
...
The contents of ffi_darwin.c must be compiled unless __APPLE__ is
defined and __ppc__ is not.
Backport from trunk.
2006-11-28 20:43:11 +00:00
Martin v. Löwis
9147f7ed8b
Disable _XOPEN_SOURCE on NetBSD 1.x.
2006-11-25 15:39:28 +00:00
Thomas Heller
558e56d599
Fix bug #1598620 : A ctypes structure cannot contain itself.
...
Backport from trunk.
2006-11-24 19:00:39 +00:00
Martin v. Löwis
2396f4c3b1
Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
...
and _CRT_NONSTDC_NO_DEPRECATE.
2006-11-21 18:21:34 +00:00
Neal Norwitz
5890a6a8a6
Backport of 52811:
...
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.
2006-11-21 05:29:34 +00:00
Martin v. Löwis
0e64202fd7
Patch #1472877 : Fix Tix subwidget name resolution.
2006-11-18 18:42:22 +00:00
Martin v. Löwis
e350c840b3
Patch #1594554 : Always close a tkSimpleDialog on ok(), even
...
if an exception occurs.
2006-11-18 18:05:57 +00:00
Martin v. Löwis
ce9212f018
Patch #1538878 : Don't make tkSimpleDialog dialogs transient if
...
the parent window is withdrawn. This mirrors what dialog.tcl
does.
2006-11-18 18:00:34 +00:00
Andrew M. Kuchling
830358af09
Remove locking of individual message files in MH.pack().
...
[Backport of rev52776 from the trunk.]
2006-11-17 16:16:28 +00:00
Georg Brandl
dd3bffb679
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.
(backport from rev. 52765)
2006-11-16 17:08:48 +00:00
Martin v. Löwis
962e4317bc
Patch #1360200 : Use unmangled_version RPM spec field to deal with
...
file name mangling.
2006-11-12 18:56:18 +00:00
Martin v. Löwis
867ef13436
Patch #1359217 : Ignore 2xx response before 150 response.
2006-11-12 18:48:30 +00:00
Andrew M. Kuchling
7ea928c452
[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.
2006-11-10 13:15:58 +00:00
Andrew M. Kuchling
bb876b9c69
[Patch #1514544 by David Watson] use fsync() to ensure data is really on disk
2006-11-10 13:08:03 +00:00
Andrew M. Kuchling
d52a0b8583
[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.
2006-11-09 13:33:53 +00:00
Martin v. Löwis
3f63454e22
Patch #838546 : Make terminal become controlling in pty.fork().
2006-11-09 11:06:30 +00:00
Martin v. Löwis
a1e3422205
Correctly forward exception in instance_contains().
...
Fixes #1591996 . Patch contributed by Neal Norwitz.
2006-11-08 06:46:49 +00:00
Neal Norwitz
a3ce6aa8b7
Backport 52621:
...
Bug #1588287 : fix invalid assertion for `1,2` in debug builds.
2006-11-04 19:32:54 +00:00
Martin v. Löwis
56602a14e6
Patch #1060577 : Extract list of RPM files from spec file in
...
bdist_rpm
2006-11-04 18:14:22 +00:00
Georg Brandl
5e9f94ac7a
Bug #1576657 : when setting a KeyError for a tuple key, make sure that
...
the tuple isn't used as the "exception arguments tuple".
(backport from rev. 52535)
2006-10-29 18:31:45 +00:00
Georg Brandl
c68d2cc3f2
Bug #1586613 : fix zlib and bz2 codecs' incremental en/decoders.
...
(backport from rev. 52529)
2006-10-29 14:39:13 +00:00
Georg Brandl
2527f7fee0
Patch #1583880 : fix tarfile's problems with long names and posix/
...
GNU modes.
(backport from rev. 52524)
2006-10-29 09:16:15 +00:00
Georg Brandl
2a5a3027f2
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 ).
(backport from rev. 52517)
2006-10-29 08:39:27 +00:00
Neal Norwitz
2f0940b6ca
Backport 52504:
...
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.
2006-10-28 21:38:43 +00:00
Georg Brandl
a35f8e0538
Patch #1552024 : add decorator support to unparse.py demo script.
...
(backport from rev. 52488)
2006-10-27 20:39:47 +00:00
Thomas Heller
a0a50feea8
WindowsError.str should display the windows error code,
...
not the posix error code; with test.
Fixes #1576174 .
Backported from trunk, revision 52485.
2006-10-27 18:47:29 +00:00
Andrew M. Kuchling
ff9e7abac8
[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.
2.4 backport candidate, probably.
2006-10-27 17:13:33 +00:00
Andrew M. Kuchling
7d1d540cc3
[Bug #1575506 ] The _singlefileMailbox class was using the wrong file object in its flush() method, causing an error
2006-10-27 16:57:44 +00:00
Andrew M. Kuchling
3d6a834e29
[Bug #1576241 ] Let functools.wraps work with built-in functions
2006-10-27 16:42:19 +00:00
Andrew M. Kuchling
5f95870868
[Bug #1542016 ] Report PCALL_POP value. This makes the return value of sys.callstats() match its docstring.
...
Backport candidate. Though it's an API change, this is a pretty obscure
portion of the API.
2006-10-27 13:29:41 +00:00
Martin v. Löwis
62e58040c1
[Backport of r52452]
...
Patch #1549049 : Rewrite type conversion in structmember.
Fixes #1545696 and #1566140 .
The new warnings have been omitted in the backport.
2006-10-27 06:17:21 +00:00
Martin v. Löwis
920fa6a102
Remove passwd.adjunct.byname from list of maps
...
for test_nis.
2006-10-22 13:46:23 +00:00
Martin v. Löwis
63a9b8b067
- Patch #1560695 : Add .note.GNU-stack to ctypes' sysv.S so that
...
ctypes isn't considered as requiring executable stacks.
2006-10-22 10:55:25 +00:00
Thomas Heller
dcbf64d34d
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 .
Backported from trunk.
2006-10-17 19:41:10 +00:00
Martin v. Löwis
ca362b6937
Forward-port r52358:
...
- Bug #1578513 : Cross compilation was broken by a change to configure.
Repair so that it's back to how it was in 2.4.3.
2006-10-17 18:59:06 +00:00
Martin v. Löwis
2c7aa634cb
Bug #1567666 : Emulate GetFileAttributesExA for Win95.
2006-10-15 09:44:02 +00:00
Martin v. Löwis
6abebb2836
Patch #1576954 : Update VC6 build directory; remove redundant
...
files in VC7.1 pythoncore.vcproj.
2006-10-15 07:55:42 +00:00
Georg Brandl
dd4c398c27
Bug #1545497 : when given an explicit base, int() did ignore NULs
...
embedded in the string to convert.
(backport from rev. 52305)
2006-10-12 11:28:04 +00:00
Georg Brandl
3c48709e3a
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.
(backport from rev. 52301)
2006-10-12 09:47:17 +00:00
Georg Brandl
8984370c06
Bug #1565919 : document set types in the Language Reference.
...
(backport from rev. 52297)
2006-10-12 08:22:57 +00:00
Georg Brandl
f0db92a676
Bug #813342 : Start the IDLE subprocess with -Qnew if the parent
...
is started with that option.
(backport from rev. 52295)
2006-10-12 07:57:24 +00:00
Martin v. Löwis
463a42b5de
Bug #1565150 : Fix subsecond processing for os.utime on Windows.
2006-10-09 20:44:50 +00:00
Georg Brandl
7444eda3d6
Patch #1572724 : fix typo ('=' instead of '==') in _msi.c.
...
(backport from rev. 52251)
2006-10-09 19:03:12 +00:00
Andrew M. Kuchling
0037300f15
[Bug #1545341 ] Let the 'classifiers' parameter be a tuple as well as a list.
2006-10-09 17:13:26 +00:00
Hye-Shik Chang
f4fe46d74b
Backport from trunk r52223:
...
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 14:01:45 +00:00
Georg Brandl
a5fe3ef8d8
Fix #1569998 : no break inside try statement (outside loop) allowed.
...
(backport from rev. 52129)
2006-10-08 07:12:23 +00:00
Georg Brandl
74284b9606
Patch #1542451 : fix crash with continue in nested try/finally
...
(backport from rev. 51439)
2006-10-08 07:06:29 +00:00
Andrew M. Kuchling
d79524a4cc
[Backport to 2-5maint of r52147 | andrew.kuchling ; the buildbots seem OK
...
with this change.]
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
2006-10-05 17:26:33 +00:00
Armin Rigo
4b63c21d6f
Forward-port of r52136: 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 11:44:06 +00:00
Martin v. Löwis
10525ad313
Fix integer negation and absolute value to not rely
...
on undefined behaviour of the C compiler anymore.
2006-10-04 05:47:47 +00:00
Martin v. Löwis
da70fd1599
Fix test for uintptr_t. Fixes #1568842 .
2006-10-02 14:56:15 +00:00
Georg Brandl
0988904df8
Bug #1546052 : clarify that PyString_FromString(AndSize) copies the
...
string pointed to by its parameter.
(backport from rev. 52078)
2006-09-30 12:03:02 +00:00
Georg Brandl
1206a933cc
Bug #1446043 : correctly raise a LookupError if an encoding name given
...
to encodings.search_function() contains a dot.
(backport from rev. 52075)
2006-09-30 11:22:35 +00:00
Georg Brandl
6d7c36332f
Bug #1556784 : allow format strings longer than 127 characters in
...
datetime's strftime function.
(backport from rev. 52072)
2006-09-30 11:17:43 +00:00
Georg Brandl
7037745be7
Bug #1560617 : in pyclbr, return full module name not only for classes,
...
but also for functions.
(backport from rev. 52069)
2006-09-30 11:06:55 +00:00
Georg Brandl
9c9a9ab634
Bug #1566602 : correct failure of posixpath unittest when $HOME ends
...
with a slash.
(backport from rev. 52065)
2006-09-30 09:13:29 +00:00
Georg Brandl
ad4e11e16d
Bug #1566663 : remove obsolete example from datetime docs.
...
(backport from rev. 52063)
2006-09-30 09:06:49 +00:00
Georg Brandl
506cc189a9
Bug #1566800 : make sure that EnvironmentError can be called with any
...
number of arguments, as was the case in Python 2.4.
(backport from rev. 52061)
2006-09-30 09:03:45 +00:00
Georg Brandl
af4337a017
Patch #1567691 : super() and new.instancemethod() now don't accept
...
keyword arguments any more (previously they accepted them, but didn't
use them).
(backport from rev. 52058)
2006-09-30 08:43:50 +00:00
Georg Brandl
bbcb2814f2
Bug #1565661 : in webbrowser, split() the command for the default
...
GNOME browser in case it is a command with args.
(backport from rev. 52056)
2006-09-30 07:32:00 +00:00
Gregory P. Smith
6fed7937c6
fix: DB.stat flags and txn keyword arguments were backwards.
2006-09-30 06:05:07 +00:00
Georg Brandl
c57221e158
Backport rev. 51972:
...
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.
2006-09-25 07:04:10 +00:00
Georg Brandl
934c90de0d
Backport rev. 51971:
...
Fix %zd string formatting on Mac OS X so it prints negative numbers.
In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time. Need to verify the buildbot results.
2006-09-25 06:58:00 +00:00
Georg Brandl
edd81b2402
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.
(backport from rev. 51995)
2006-09-24 12:50:28 +00:00
Georg Brandl
a6b9ce185e
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
(backport from rev. 51993)
2006-09-24 12:35:40 +00:00
Georg Brandl
1f21578965
Fix webbrowser.BackgroundBrowser on Windows.
...
(backport from rev. 51991)
2006-09-24 10:36:08 +00:00
Jack Diederich
6cc16bec17
added itertools.count(-n) fix
2006-09-21 20:38:39 +00:00
Brett Cannon
c70e003f75
Backport of fix to allow exception instances to be sliced once again.
2006-09-21 18:12:15 +00:00
Anthony Baxter
2d8697f32c
Preparing for 2.5 final.
...
(damn, it's nice to see the line
#define PY_VERSION "2.5"
in patchlevel.h)
2006-09-18 06:51:50 +00:00
Anthony Baxter
72345f2a0b
remove 2.5 final section from NEWS.txt until after rc2 (reduced confusion)
2006-09-11 15:32:50 +00:00
Anthony Baxter
2d4183c5f6
preparing for 2.5c2
2006-09-11 15:30:13 +00:00
Neal Norwitz
0bcafac29e
Building with HP's cc on HP-UX turned up a couple of problems.
...
_PyGILState_NoteThreadState was declared as static inconsistently.
Make it static as it's not necessary outside of this module.
Some tests failed because errno was reset to 0. (I think the tests
that failed were at least: test_fcntl and test_mailbox).
Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS.
This only affected debug builds.
This needs to be ported to HEAD. I'll try to remember to do that tomorrow.
(Anyone, feel free to port it.)
2006-09-11 08:51:17 +00:00
Neal Norwitz
48829ba61d
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.
Will backport to 2.4 and head later.
2006-09-11 04:05:18 +00:00
Neal Norwitz
2e488fdebf
Add NEWS entries for ctypes backports.
2006-09-11 04:03:07 +00:00
Brett Cannon
19d76c5aa8
Remove __unicode__ method so that ``unicode(BaseException)`` succeeds.
...
Fixes bug #1551432 .
2006-09-09 07:18:44 +00:00
Nick Coghlan
62f19e4281
Backport inspect.py fix from rev 51803
2006-09-08 10:01:23 +00:00
Hye-Shik Chang
137ae0cf7c
Backport from trunk r51737:
...
Fixed a few bugs on cjkcodecs:
- 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 0213:2
codepoints now.
2006-09-07 12:50:38 +00:00
Gustavo Niemeyer
d1b1b8c882
Fixed bug #1531862 : Do not close standard file descriptors in subprocess.
...
Let's try that once more. Buildbots were broken last time, but probably
because tests were sending data to stderr for testing it (sending to a
file doesn't touch the problem).
The fix is still the same, but tests were reduced (removing tests to
be able to fix something is weird, but oh well).
2006-09-06 22:44:51 +00:00
Marc-André Lemburg
8a230b50a1
Backport bug fix for SF bug report #1546372 .
2006-09-06 20:38:50 +00:00
Georg Brandl
4dc095249e
Fix missing import of the types module in logging.config.
...
(backport from rev. 51785)
2006-09-06 20:06:27 +00:00
Georg Brandl
ecab623e13
Bug #1542051 : Exceptions now correctly call PyObject_GC_UnTrack.
...
Also make sure that every exception class has __module__ set to
'exceptions'.
(backport)
2006-09-06 06:47:02 +00:00
Georg Brandl
37a9e579ec
Bug #1550983 : emit better error messages for erroneous relative
...
imports (if not in package and if beyond toplevel package).
(backport from rev. 51765)
2006-09-06 06:09:34 +00:00
Georg Brandl
b20cb33f7f
Bug #1551427 : fix a wrong NULL pointer check in the win32 version
...
of os.urandom().
(backport from rev. 51762)
2006-09-06 06:04:06 +00:00
Neal Norwitz
f3ce2ab2f1
Revert 51759 because it broke all the buildbots
2006-09-06 03:58:59 +00:00
Gustavo Niemeyer
63d675ce82
Backporting fix for bug #1531862 , committed in 51758, into 2.5,
...
making subprocess not close standard file descriptors.
2006-09-06 02:05:35 +00:00
Neal Norwitz
9a2447943e
Add another NEWS entry for a fix already in 2.5c1
2006-09-05 04:49:45 +00:00
Neal Norwitz
24b6f208ae
Add some NEWS for fixes already in 2.5c1
2006-09-05 04:43:56 +00:00
Neal Norwitz
3b3aae013b
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.
2006-09-05 03:56:01 +00:00
Neal Norwitz
541a48b262
Patch #1540470 , for OpenBSD 4.0. Backport candidate for 2.[34].
2006-09-05 02:54:42 +00:00
Neal Norwitz
716692ff13
Backport fix from 51683.
2006-09-05 02:33:44 +00:00
Neal Norwitz
7ae5f29465
Backport fix for SF bug #1550714 , itertools.tee raises SystemError
2006-09-05 02:30:10 +00:00
Neal Norwitz
29a5fdb7ca
Fix str.rpartition(sep) when sep is not found in str.
...
Partially from SF patch #1551339 , but also taken from head.
2006-09-05 02:21:38 +00:00
Neal Norwitz
8dc71f2161
This was found by Guido AFAIK on p3yk (sic) branch.
2006-09-05 02:00:21 +00:00
Neal Norwitz
d3da7d394a
Fix SF bug #1546288 , crash in dict_equal
2006-09-05 01:54:06 +00:00
Tim Peters
cbdd350dd7
i_divmod(): As discussed on Python-Dev, changed the overflow
...
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.
2006-09-05 01:47:53 +00:00
Nick Coghlan
08c496d81d
NEWS entry for decimal module changes
2006-09-03 01:13:06 +00:00
Martin v. Löwis
58af7ef55d
Patch #1545507 : Exclude ctypes package in Win64 MSI file.
2006-08-25 00:11:38 +00:00
Neal Norwitz
19c35bba5d
- Patch #1541585 : fix buffer overrun when performing repr() on
...
a unicode string in a build with wide unicode (UCS-4) support.
I will forward port to 2.6. Can someone backport to 2.4?
2006-08-21 22:13:11 +00:00
Neal Norwitz
7443b80549
Backport 51432:
...
Fix bug #1543303 , tarfile adds padding that breaks gunzip.
Patch # 1543897. (remove the padding)
2006-08-21 18:43:51 +00:00
Georg Brandl
db232dc86a
Patch #1542948 : fix urllib2 header casing issue. With new test.
...
(backport from rev. 51416)
2006-08-20 13:15:43 +00:00
Neal Norwitz
d6f8629b20
SF #1542693 : Remove semi-colon at end of PyImport_ImportModuleEx macro
2006-08-19 04:19:43 +00:00
Georg Brandl
595d9b6bc6
Bug #1541682 : Fix example in the "Refcount details" API docs.
...
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
(backport from rev. 51364)
2006-08-18 07:28:03 +00:00
Martin v. Löwis
2c3a256351
Bug #1541863 : uuid.uuid1 failed to generate unique identifiers
...
on systems with low clock resolution.
2006-08-18 03:40:13 +00:00
Martin v. Löwis
552262409d
Invoke debug mk1mf.pl after running Configure.
2006-08-17 18:54:43 +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
Andrew M. Kuchling
c13324e313
Grammar fix
2006-08-16 17:11:18 +00:00
Marc-André Lemburg
574cfea993
Add NEWS item mentioning the reverted distutils version number patch.
2006-08-16 16:11:01 +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
Andrew M. Kuchling
f9b5b8e9f8
Wording/typo fixes
2006-08-16 14:21:14 +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
Anthony Baxter
581795902d
news entry for 51307
2006-08-16 13:08:25 +00:00
Martin v. Löwis
a09fd6efdd
Build _hashlib on Windows. Build OpenSSL with masm assembler code.
...
Fixes #1535502 .
2006-08-16 12:55:10 +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
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
Neal Norwitz
bf8c19536e
Georg fixed one of my bugs, so I'll repay him with 2 NEWS entries.
...
Now we're even. :-)
2006-08-15 04:14:57 +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
3335a7ad63
Patch #1535500 : fix segfault in BZ2File.writelines and make sure it
...
raises the correct exceptions.
2006-08-14 21:42:55 +00:00
Thomas Heller
1ce433e937
News item for rev 51281.
2006-08-14 16:20:04 +00:00
Marc-André Lemburg
757ea27b0f
Readd NEWS items that were accidentally removed by r51276.
2006-08-14 11:44:34 +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
Marc-André Lemburg
040f76b79c
Slightly revised version of patch #1538956 :
...
Replace UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.
All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.
2006-08-14 10:55:19 +00:00
Neal Norwitz
56423e5762
Fix segfault when doing string formatting on subclasses of long if
...
__oct__, __hex__ don't return a string.
Klocwork 308
2006-08-13 18:11:08 +00:00
Neal Norwitz
1872b1c01f
Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots
...
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c) In reviewing the code for classic
classes, there were 2 problems. Any negative value return could be returned.
Always return -1 if there was an error. Also make the checks similar
with the new-style classes. I believe this is correct for 32 and 64 bit
boxes, including Windows64.
Add a test of classic classes too.
2006-08-12 18:44:06 +00:00
Neal Norwitz
8a87f5d37e
Patch #1538606 , Patch to fix __index__() clipping.
...
I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
2006-08-12 17:03:09 +00:00
Georg Brandl
0a7d1bb168
logging's atexit hook now runs even if the rest of the module has
...
already been cleaned up.
2006-08-11 07:26:10 +00:00
Neal Norwitz
003c9e2952
Fix the failures on cygwin (2006-08-10 fixed the actual locking issue).
...
The first hunk changes the colon to an ! like other Windows variants.
We need to always wait on the child so the lock gets released and
no other tests fail. This is the try/finally in the second hunk.
2006-08-11 06:09:41 +00:00
Tim Peters
4643c2fda1
Followup to bug #1069160 .
...
PyThreadState_SetAsyncExc(): internal correctness changes wrt
refcount safety and deadlock avoidance. Also added a basic test
case (relying on ctypes) and repaired the docs.
2006-08-10 22:45:34 +00:00
Guido van Rossum
c69ac2527d
Fix title -- it's rc1, not beta3.
2006-08-10 18:09:25 +00:00
Guido van Rossum
133f4e465b
News item for SF bug 1112549.
2006-08-10 17:42:50 +00:00
Martin v. Löwis
ab2f8f7bd5
__hash__ may now return long int; the final hash
...
value is obtained by invoking hash on the long int.
Fixes #1536021 .
2006-08-09 07:57:39 +00:00
Thomas Heller
ab1049c046
memcmp() can return values other than -1, 0, and +1 but tp_compare
...
must not.
2006-08-08 17:37:00 +00:00
Andrew MacIntyre
16ee33adfc
test_threading now skips testing alternate thread stack sizes on
...
platforms that don't support changing thread stack size.
2006-08-06 12:37:03 +00:00
Georg Brandl
7e3ba2a699
Bug #1535165 : fixed a segfault in input() and raw_input() when
...
sys.stdin is closed.
2006-08-06 08:23:54 +00:00
Georg Brandl
9908d1656c
Bug #1535182 : really test the xreadlines() method of bz2 objects.
2006-08-06 07:06:33 +00:00
Georg Brandl
212b587a52
Patch #1534922 : correct and enhance unittest docs.
2006-08-05 06:10:54 +00:00
Bob Ippolito
e6c9f982a0
Fix #1530559 , struct.pack raises TypeError where it used to convert.
...
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
2006-08-04 23:59:21 +00:00
Thomas Heller
db7b443d8a
Fix #1534738 : win32 debug version of _msi must be _msi_d.pyd, not _msi.pyd.
...
Fix the name of the pdb file as well.
2006-08-04 19:49:31 +00:00
Thomas Heller
1798489547
Fix #1530448 - fix ctypes build failure on solaris 10.
...
The '-mimpure-text' linker flag is required when linking _ctypes.so.
2006-08-04 18:57:34 +00:00
Thomas Heller
74d36f0d95
On Windows, make PyErr_Warn an exported function again.
2006-08-04 18:17:40 +00:00
Georg Brandl
e9462c72bd
Change fix for segfaulting property(), add a NEWS entry and a test.
2006-08-04 18:03:37 +00:00
Neil Schemenauer
06ded09d40
Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.
...
In the 2.5 development cycle, MAKE_CLOSURE as changed to take free
variables as a tuple rather than as individual items on the stack.
Closes patch #1534084 .
2006-08-04 16:20:30 +00:00
Neal Norwitz
0cbd805a10
Bug #1333982 : string/number constants were inappropriately stored
...
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
2006-08-04 05:09:28 +00:00
Neal Norwitz
4ffedadb10
Bug #1191458 : tracing over for loops now produces a line event
...
on each iteration. I'm not positive this is the best way to handle
this. I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly. It would be great if people
that use pdb or tracing could test heavily.
Also:
* Remove dead/duplicated code that wasn't used/necessary
because we already handled the docstring prior to entering the loop.
* add some debugging code into the compiler (#if 0'd out).
2006-08-04 04:58:47 +00:00
Neal Norwitz
ff4b63b80f
Bug #1531405 , format_exception no longer raises an exception if
...
str(exception) raised an exception.
2006-08-04 04:50:21 +00:00
Martin v. Löwis
961b91bd3c
Correction of patch #1455898 : In the mbcs decoder, set final=False
...
for stream decoder, but final=True for the decode function.
2006-08-02 13:53:55 +00:00
Anthony Baxter
5d32a9f188
pre-release machinations
2006-08-02 07:43:09 +00:00
Neal Norwitz
9b0ca79213
Patch #1519025 and bug #926423 : If a KeyboardInterrupt occurs during
...
a socket operation on a socket with a timeout, the exception will be
caught correctly. Previously, the exception was not caught.
2006-08-02 06:46:21 +00:00
Neal Norwitz
c5e060dee6
_PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long.
2006-08-02 06:14:22 +00:00
Ronald Oussoren
26cad08748
This fixes bug #1527397 : PythonLauncher runs scripts with the wrong working
...
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
2006-08-01 21:00:57 +00:00
Georg Brandl
07fec3aa5a
os.urandom no longer masks unrelated exceptions like SystemExit or
...
KeyboardInterrupt.
2006-08-01 18:49:24 +00:00
Martin v. Löwis
0907f4dc5b
Drop usage of test -e in configure as it is not portable.
...
Fixes #1439538
Will backport to 2.4
Also regenerate pyconfig.h.in.
2006-07-30 14:09:47 +00:00
Martin v. Löwis
77621585e4
Mention Cygwin in distutils error message about a missing VS 2003.
...
Fixes #1257728 .
2006-07-30 13:27:31 +00:00
Martin v. Löwis
1f30c3777c
Base __version__ on sys.version_info, as distutils is
...
no longer maintained separatedly.
2006-07-30 13:14:05 +00:00
Martin v. Löwis
4e67838d6c
Don't copy directory stat times in shutil.copytree on Windows
...
Fixes #1525866 .
2006-07-30 13:00:31 +00:00
Georg Brandl
e34ac7ce7a
Bug #1002398 : The documentation for os.path.sameopenfile now correctly
...
refers to file descriptors, not file objects.
2006-07-30 11:07:23 +00:00
Neal Norwitz
f71ec5a0ac
Bug #1515471 : string.replace() accepts character buffers again.
...
Pass the char* and size around rather than PyObject's.
2006-07-30 06:57:04 +00:00
Neal Norwitz
07aadb14f3
Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
...
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
2006-07-30 06:55:48 +00:00
Neal Norwitz
0d62a06206
Patch #1531113 : Fix augmented assignment with yield expressions.
...
Also fix a SystemError when trying to assign to yield expressions.
2006-07-30 06:53:31 +00:00