Amaury Forgeot d'Arc
69b747b735
Fix a reference leak found by Georg, when compiling a class nested in another class.
...
Now "regrtest.py -R:: test_compile" is satisfied.
Will backport.
2008-03-28 20:30:50 +00:00
Georg Brandl
fc8eef3c78
Patch #1810 by Thomas Lee, reviewed by myself:
...
allow compiling Python AST objects into code objects
in compile().
2008-03-28 12:11:56 +00:00
Gregory P. Smith
b9803421d2
Accept patch issue2426 by Paul Kippes (kippesp).
...
Adds sqlite3.Connection.iterdump to allow dumping of databases.
2008-03-28 08:32:09 +00:00
Amaury Forgeot d'Arc
da0c025a43
Issue2495: tokenize.untokenize did not insert space between two consecutive string literals:
...
"" "" => """", which is invalid code.
Will backport
2008-03-27 23:23:54 +00:00
Georg Brandl
deaf2cafbd
#2248 : return result of QUIT from quit().
2008-03-27 13:27:31 +00:00
Christian Heimes
3c60833e1e
Patch #2477 : Added from __future__ import unicode_literals
...
The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
2008-03-26 22:01:37 +00:00
Christian Heimes
8c78cc3b6c
Updated Misc/NEWS
2008-03-26 12:53:58 +00:00
Mark Dickinson
8e85ffa4b2
Issue #2482 : Make sure that the coefficient of a Decimal
...
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
2008-03-25 18:47:59 +00:00
Mark Dickinson
3b24ccbe7e
Issue #2478 : Decimal(sqrt(0)) failed when the decimal context
...
was not explicitly supplied.
2008-03-25 14:33:23 +00:00
Georg Brandl
1e7c37514d
#2359 : add Py3k warning for array.read/array.write.
2008-03-25 08:37:23 +00:00
Georg Brandl
80055f6295
#2355 : py3k warning for buffer().
2008-03-25 07:56:27 +00:00
Martin v. Löwis
aef18b1c67
Patch #2240 : Implement signal.setitimer and signal.getitimer.
2008-03-24 13:31:16 +00:00
Martin v. Löwis
cdbc977c03
Install 2to3 script.
2008-03-24 12:57:53 +00:00
Raymond Hettinger
b72233ce63
Issue 2460: Make Ellipsis objects copyable.
2008-03-24 08:17:39 +00:00
Raymond Hettinger
bbc50eafe5
Issue 1681432: Add triangular distribution the random module.
2008-03-23 13:32:32 +00:00
Amaury Forgeot d'Arc
9a0d3462fc
#1477 : ur'\U0010FFFF' raised in narrow unicode builds.
...
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, just like the unicode-escape codec.
2008-03-23 09:55:29 +00:00
Christian Heimes
0e9ab5f2f0
Applied patch #1657 epoll and kqueue wrappers for the select module
...
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue syscalls. Thanks to Thomas Herve and the Twisted people for their support and help.
TODO: Finish documentation documentation
2008-03-21 23:49:44 +00:00
Georg Brandl
65bb42dc1b
#2348 : add py3k warning for file.softspace.
2008-03-21 20:38:24 +00:00
Georg Brandl
07e5681fd3
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
2008-03-21 20:21:46 +00:00
Georg Brandl
5a44424c5e
#2358 : add py3k warning to sys.exc_clear().
2008-03-21 20:11:46 +00:00
Georg Brandl
77354cf5ef
Issue #2432 : give DictReader the dialect and line_num attributes
...
advertised in the docs.
2008-03-21 20:01:51 +00:00
Georg Brandl
331243270d
#2136 : allow single quotes in realm spec.
2008-03-21 19:54:00 +00:00
Marc-André Lemburg
a1867750f6
Add news items for platform module changes.
2008-03-20 18:08:00 +00:00
Sean Reifscheider
68fa8e6c45
Forgot to add NEWS item about smtplib SSL readline hang fix.
2008-03-20 00:50:07 +00:00
Brett Cannon
7919d98d56
test_nis would fail if test.test_support.verbose was true but NIS was not set
...
up on the machine.
Closes issue2411. Thanks Michael Bishop.
2008-03-19 16:50:13 +00:00
Martin v. Löwis
5e37baea80
Import lib2to3.
2008-03-19 04:43:46 +00:00
Martin v. Löwis
a4d77898db
Issue #2400 : Allow relative imports to "import *".
2008-03-19 04:39:13 +00:00
Eric Smith
7c47894a2a
Backport of the print function, using a __future__ import.
...
This work is substantially Anthony Baxter's, from issue
1633807. I just freshened it, made a few minor tweaks,
and added the test cases. I also created issue 2412,
which is to check for 2to3's behavior with the print
function. I also added myself to ACKS.
2008-03-18 23:45:49 +00:00
Gregory P. Smith
37f3f430b8
news entry for the chown fix
2008-03-18 20:40:01 +00:00
Sean Reifscheider
493894c3e0
Issue 1577: shutil.move() where destination is a directory was doing a
...
copy, now it is doing a os.rename() if it's on the same file-system.
2008-03-18 17:24:12 +00:00
Neal Norwitz
b1d3d96374
Issue 2332: add new attribute names for instance method objects
2008-03-18 04:46:00 +00:00
Guido van Rossum
6d91be3758
- Issue 2379: Raise a Py3K warning for __getitem__ or __getslice__ on
...
exception instances.
2008-03-18 04:42:22 +00:00
Guido van Rossum
504153d55b
Issue #2341 : Add a Py3k warning when raising an exception that doesn't
...
derive from BaseException.
2008-03-18 04:26:48 +00:00
Brett Cannon
a5573b3153
The output directory for tests that compare against stdout is now gone!
2008-03-18 04:16:06 +00:00
Brett Cannon
aa5778d1b8
Remove our implementation of memmove() and strerror(); both are in the C89
...
standard library.
2008-03-18 04:09:00 +00:00
Brett Cannon
b7ec8e5a9e
test_errno was a no-op test; now it actually tests things and uses unittest.
2008-03-18 03:46:22 +00:00
Guido van Rossum
04edb528ca
- Issue #2371 : Add a Py3k warning when catching an exception that
...
doesn't derive from BaseException.
2008-03-18 02:49:46 +00:00
Brett Cannon
0bb7950829
Move test_extcall to doctest.
2008-03-18 01:58:56 +00:00
Brett Cannon
ba17cfc66c
Convert test_dummy_threading and test_dbm to unittest.
2008-03-18 01:50:25 +00:00
Brett Cannon
6eeaddc341
Convert test_strftime, test_getargs, and test_pep247 to use unittest.
2008-03-18 01:00:07 +00:00
Neal Norwitz
419fd49abe
Issue 2321: reduce memory usage (increase the memory that is returned
...
to the system) by using pymalloc for the data of unicode objects.
Will backport.
2008-03-17 20:22:43 +00:00
Eric Smith
0aed07ad80
Added PEP 3127 support to tokenize (with tests); added PEP 3127 to NEWS.
2008-03-17 19:43:40 +00:00
Gregory P. Smith
f48f9d38c0
Force zlib.crc32 and zlib.adler32 to return a signed integer on all platforms
...
regardless of the native sizeof(long) used in the integer object.
This somewhat odd behavior of returning a signed is maintained in 2.x for
compatibility reasons of always returning an integer rather than a long object.
Fixes Issue1202 for Python 2.6
2008-03-17 18:48:05 +00:00
Jeffrey Yasskin
1b4e45bab9
Allow Gnu gcc's to build python on OSX by removing -Wno-long-double,
...
-no-cpp-precomp, and -mno-fused-madd from configure.
* r22183 added -no-cpp-precomp, which
http://gcc.gnu.org/ml/gcc/2005-12/msg00368.html claims hasn't been
needed since gcc-3.1.
* r25607 added -Wno-long-double to avoid a warning in
Include/objimpl.h (issue 525481). The long double is still there,
but OSX 10.4's gcc no longer warns about it.
* r33666 fixed issue 775892 on OSX 10.3 by adding -mno-fused-madd,
which changed the sign of some float 0s. Tim Peters said it wasn't
a real issue anyway, and it no longer causes test failures.
Fixes issue #1779871 .
2008-03-17 14:40:53 +00:00
Neal Norwitz
400aedacc0
Add a warning for code like:
...
assert (0, 'message')
An empty tuple does not create a warning. While questionable usage:
assert (), 'message'
should not display a warning. Tested manually.
The warning message could be improved. Feel free to update it.
2008-03-15 22:03:18 +00:00
Skip Montanaro
32ed8c267c
.
2008-03-15 16:07:11 +00:00
Mark Dickinson
c23b8a7af9
Issue 705836: Fix struct.pack(">f", 1e40) to behave consistently
...
across platforms: it should now raise OverflowError on all
platforms. (Previously it raised OverflowError only on
non IEEE 754 platforms.)
Also fix the (already existing) test for this behaviour
so that it actually raises TestFailed instead of just
referencing it.
2008-03-14 14:23:37 +00:00
Martin v. Löwis
bf7b0b7b81
Patch #2284 : add -x64 option to rt.bat.
2008-03-14 13:56:09 +00:00
Brett Cannon
1f5182b572
Convert test_fcntl to unittest.
...
Closes issue #2055 . Thanks Giampaolo Rodola.
2008-03-13 21:09:28 +00:00
Brett Cannon
4a6e8d669a
Move test_gdbm to use unittest.
...
Closes issue #1960 . Thanks Giampaolo Rodola.
2008-03-13 21:02:16 +00:00
Brett Cannon
2e0f9f3dd9
Convert test_contains, test_crypt, and test_select to unittest.
...
Patch from GHOP 294 by David Marek.
2008-03-13 20:47:41 +00:00
Brett Cannon
b8d37359cd
Move test_tokenize to doctest.
...
Done as GHOP 238 by Josip Dzolonga.
2008-03-13 20:33:10 +00:00
Brett Cannon
66865d2ebd
Move test_thread over to unittest. Commits GHOP 237.
...
Thanks Benjamin Peterson for the patch.
2008-03-13 20:27:00 +00:00
Raymond Hettinger
53bdf09343
Issue 2274: Add heapq.heappushpop().
2008-03-13 19:03:51 +00:00
Facundo Batista
c54aec1fda
Issue 1106316. post_mortem()'s parameter, traceback, is now
...
optional: it defaults to the traceback of the exception that is currently
being handled.
2008-03-08 16:50:27 +00:00
Nick Coghlan
7af53be66f
Speed up with statements by storing the __exit__ method on the stack instead of in a temp variable (bumps the magic number for pyc files)
2008-03-07 14:13:28 +00:00
Jeffrey Yasskin
e75f59a578
Progress on issue #1193577 by adding a polling .shutdown() method to
...
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
2008-03-07 06:22:15 +00:00
Georg Brandl
98aa805b10
Bug #2220 : handle rlcompleter attribute match failure more gracefully.
2008-03-06 07:45:52 +00:00
Georg Brandl
a7bd27f0a8
#2225 : return nonzero status code from py_compile if not all files could be compiled.
2008-03-06 07:41:16 +00:00
Georg Brandl
810ea29b0e
Add missing NEWS entry for r61263.
2008-03-06 07:34:52 +00:00
Martin v. Löwis
d2bbe526c3
Patch #2232 : os.tmpfile might fail on Windows if the user has no
...
permission to create files in the root directory.
Will backport to 2.5.
2008-03-06 06:55:22 +00:00
Raymond Hettinger
66f91ea966
C implementation of itertools.permutations().
2008-03-05 20:59:58 +00:00
Thomas Heller
f3c0559b5e
Issue 1872: Changed the struct module typecode from 't' to '?', for
...
compatibility with PEP3118.
2008-03-05 15:34:29 +00:00
Thomas Heller
78b8f4458d
News entry for yesterdays commit.
2008-03-05 14:53:39 +00:00
Amaury Forgeot d'Arc
d21fb4c2e0
Issue#2238: some syntax errors from *args or **kwargs expressions
...
would give bogus error messages, because of untested exceptions::
>>> f(**g(1=2))
XXX undetected error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
instead of the expected SyntaxError: keyword can't be an expression
Will backport.
2008-03-05 01:50:33 +00:00
Andrew M. Kuchling
c6511a851e
Typo fix
2008-03-04 01:48:26 +00:00
Andrew M. Kuchling
91ae0c9a70
Typo fix
2008-03-04 00:40:32 +00:00
Christian Heimes
608c1d8e87
Since abc._Abstract was replaces by a new type flags the regression test suite fails. I've added a new function inspect.isabstract(). Is the mmethod fine or should I check if object is a instance of type or subclass of object, too?
2008-03-03 18:28:04 +00:00
Brett Cannon
56c4debe0d
Refactor test_logging to use unittest. This should finally solve the flakiness
...
issues.
Thanks to Antoine Pitrou for the patch.
2008-03-03 00:38:58 +00:00
Gerhard Häring
11ab807fff
Added note about update of sqlite3 module.
2008-03-02 13:12:27 +00:00
Barry Warsaw
65475fdba7
Set things up for 2.6a2.
2008-03-01 17:11:41 +00:00
Barry Warsaw
7c07523c80
Add date to NEWS
2008-03-01 02:53:36 +00:00
Fred Drake
a8ee94ba1c
fix typo
2008-03-01 02:45:07 +00:00
Barry Warsaw
5297361198
Bump to version 2.6a1
2008-03-01 02:23:38 +00:00
Mark Dickinson
1ddf1d8482
Add __format__ method to Decimal, to support PEP 3101
2008-02-29 02:16:37 +00:00
Raymond Hettinger
b4cbc98c39
Add alternate constructor for itertools.chain().
2008-02-28 22:46:41 +00:00
Raymond Hettinger
93e804da9c
Add itertools.combinations().
2008-02-26 23:40:50 +00:00
Neal Norwitz
ca37661a69
Add a timing flag to Trace so you can see where slowness occurs
...
like waiting for socket timeouts in test_smtplib :-).
2008-02-26 08:21:28 +00:00
Georg Brandl
8c460d5241
#1627 : httplib now ignores negative Content-Length headers.
2008-02-24 00:14:24 +00:00
Georg Brandl
2363503074
#900744 : If an invalid chunked-encoding header is sent by a server,
...
httplib will now raise IncompleteRead and close the connection instead
of raising ValueError.
2008-02-24 00:03:22 +00:00
Georg Brandl
ebcfd11c16
#1506171 : added operator.methodcaller().
2008-02-23 23:04:35 +00:00
Georg Brandl
e2065c65d3
#1826 : allow dotted attribute paths in operator.attrgetter.
2008-02-23 23:02:23 +00:00
Christian Heimes
4034685a58
Issue #2051 and patch from Alexander Belopolsky:
...
Permission for pyc and pyo files are inherited from the py file.
2008-02-23 17:52:07 +00:00
Christian Heimes
f0476e8169
Patch #1957 : syslogmodule: Release GIL when calling syslog(3)
2008-02-23 17:42:31 +00:00
Georg Brandl
ad61bc8d9b
#2067 : file.__exit__() now calls subclasses' close() method.
2008-02-23 15:11:18 +00:00
Facundo Batista
7e251e83d5
Issue 1089358. Adds the siginterrupt() function, that is just a
...
wrapper around the system call with the same name. Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.
2008-02-23 15:07:35 +00:00
Georg Brandl
1647923bbf
#1492 : allow overriding BaseHTTPServer's content type for error messages.
2008-02-23 15:02:28 +00:00
Christian Heimes
5224d28d38
Patch #1759 : Backport of PEP 3129 class decorators
...
with some help from Georg
2008-02-23 15:01:05 +00:00
Facundo Batista
b12f0b581a
Issue 1781. Now ConfigParser.add_section does not let you add a
...
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.
2008-02-23 12:46:10 +00:00
Facundo Batista
fc2d01032f
Issue 1881. Increased the stack limit from 500 to 1500. Also added
...
a test for this (and because of this test you'll see in stderr a
message that parser.c sends before raising MemoryError).
Thanks Ralf Schmitt.
2008-02-23 12:01:13 +00:00
Eric Smith
a73fbe791d
Added future_builtins, which contains PEP 3127 compatible versions of hex() and oct().
2008-02-23 03:09:44 +00:00
Raymond Hettinger
c5705a823b
Document itertools.product().
2008-02-22 19:50:06 +00:00
Guido van Rossum
af16ece18e
Fix a few typos and layout glitches (more work is needed).
...
Move 2.5 news to Misc/HISTORY.
2008-02-21 19:46:35 +00:00
Guido van Rossum
8bc0965adf
Removed uses of dict.has_key() from distutils, and uses of
...
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given. More work like this needs to
be done in the rest of the stdlib.
2008-02-21 18:18:37 +00:00
Guido van Rossum
b5e2684a1a
Remove news about float repr() -- issue 1580 is still in limbo.
2008-02-21 17:46:16 +00:00
Eric Smith
7ef40bf9c7
Trim leading zeros from a floating point exponent, per C99. See issue 1600. As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
2008-02-20 23:34:22 +00:00
Eric Smith
5a3c135e17
Added PEP 3101.
2008-02-19 13:21:56 +00:00
Facundo Batista
d14600ec94
Issue 1224. Now we support again the double slash in the URL.
...
Thanks Anthony Lenton.
2008-02-18 12:48:43 +00:00
Facundo Batista
759bfc6207
Issue #1916 . Added isgenerator() and isgeneratorfunction() to
...
inspect.py. Thanks Javi Mansilla for patch review and
corrections.
2008-02-18 03:43:43 +00:00
Facundo Batista
e139688d34
Issue 2112. mmap does not raises EnvironmentError no more, but
...
a subclass of it. Thanks John Lenton.
2008-02-17 18:59:29 +00:00
Facundo Batista
f88a077f69
Now we handle different the backup copy, because of security
...
issues regarding user/group and permissions. Fixes 1050828.
2008-02-17 16:21:13 +00:00
Brett Cannon
f9db8a3a20
Move test_logging over to doctest.
...
Thanks to Christopher White from GHOP.
2008-02-17 01:59:18 +00:00
Amaury Forgeot d'Arc
632fad3933
Prevent a crash with nested scopes, again caused by calling Py_DECREF when the pointer
...
is still present in the containing structure.
2008-02-16 20:55:24 +00:00
Amaury Forgeot d'Arc
60d6c7f0cc
Issue #2115 : __slot__ attributes setting was 10x slower.
...
Also correct a possible crash using ABCs.
This change is exactly the same as an optimisation
done 5 years ago, but on slot *access*:
http://svn.python.org/view?view=rev&rev=28297
2008-02-15 21:22:45 +00:00
Christian Heimes
7adfad850a
Bug #2111 : mmap segfaults when trying to write a block opened with PROT_READ
...
Thanks to Thomas Herve for the fix.
2008-02-15 08:20:11 +00:00
Christian Heimes
2f0da53d28
Fixed repr() and str() of complex numbers. Complex suffered from the same problem as floats but I forgot to test and fix them.
2008-02-15 06:57:08 +00:00
Christian Heimes
3b718a79af
Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation.
2008-02-14 12:47:33 +00:00
Thomas Heller
a06a1a88ee
Add pickle support to ctypes types.
2008-02-13 20:21:53 +00:00
Georg Brandl
0a40ffb1b3
#2063 : correct order of utime and stime in os.times()
...
result on Windows.
2008-02-13 07:20:22 +00:00
Martin v. Löwis
dad88dc159
Patch #1966 : Break infinite loop in httplib when the servers
...
implements the chunked encoding incorrectly.
Will backport to 2.5.
2008-02-12 18:47:34 +00:00
Martin v. Löwis
e0d30ef0ca
Patch #1736 : Fix file name handling of _msi.FCICreate.
2008-02-12 13:47:26 +00:00
Mark Dickinson
d058cd2cc8
Rename rational.Rational to fractions.Fraction, to avoid name clash
...
with numbers.Rational. See issue #1682 for related discussion.
2008-02-10 21:29:51 +00:00
Raymond Hettinger
da614dcc4f
Complete an open todo on pickletools -- add a pickle optimizer.
2008-02-10 20:35:16 +00:00
Nick Coghlan
ac094dc8a3
Add missing NEWS entry for r60695
2008-02-10 07:32:52 +00:00
Christian Heimes
95d644708e
Issue #1706 : Require Windows 2000+
...
Added Py_BUILD_CORE_MODULES macro to set WINVER and NTDDI_VERSION to Windows 2000 for core modules, too
Added -d option to build.bat (same as -c Debug) and fixed warning about /build option
Updated Windows related readme.txt files
2008-02-09 19:55:22 +00:00
Hye-Shik Chang
01612e7dec
Update big5hkscs codec to conform to the HKSCS:2004 revision.
2008-02-08 17:10:20 +00:00
Amaury Forgeot d'Arc
b01aa430d5
issue 2045: Infinite recursion when printing a subclass of defaultdict,
...
if default_factory is set to a bound method.
Will backport.
2008-02-08 00:56:02 +00:00
Christian Heimes
f75dbef208
Deallocate content of the dict free list on interpreter shutdown
2008-02-08 00:11:31 +00:00
Raymond Hettinger
5b07ebce86
Issue 2025: Add tuple.count() and tuple.index() to follow the ABC in collections.Sequence.
2008-02-07 00:54:20 +00:00
Mark Dickinson
2fc9263df5
Issue 1979: Make Decimal comparisons (other than !=, ==) involving NaN
...
raise InvalidOperation (and return False if InvalidOperation is trapped).
2008-02-06 22:10:50 +00:00
Christian Heimes
5b970ad483
Unified naming convention for free lists and their limits. All free lists
...
in Object/ are named ``free_list``, the counter ``numfree`` and the upper
limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.
The chances should make it easier to adjust Python for platforms with
less memory, e.g. mobile phones.
2008-02-06 13:33:44 +00:00
Christian Heimes
6075a82243
Limit free list of method and builtin function objects to 256 entries each.
2008-02-06 12:44:34 +00:00
Georg Brandl
b70907796a
* Use the same code to profile for test_profile and test_cprofile.
...
* Convert both to unittest.
* Use the same unit testing code.
* Include the expected output in both test files.
* Make it possible to regenerate the expected output by running
the file as a script with an '-r' argument.
2008-02-05 19:58:17 +00:00
Lars Gustäbel
0192e43d64
Issue #2004 : Use mode 0700 for temporary directories and default
...
permissions for missing directories.
(will backport to 2.5)
2008-02-05 11:51:40 +00:00
Amaury Forgeot d'Arc
6fd03bb607
#1750076 : Debugger did not step on every iteration of a while statement.
...
The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.
Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.
The lnotab seems to be exactly the same as with python2.4.
2008-02-04 21:45:05 +00:00
Amaury Forgeot d'Arc
578a8caf43
Correct quotes in NEWS file
2008-02-04 20:53:14 +00:00
Christian Heimes
422051a367
Patch #1953
...
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
2008-02-04 18:00:12 +00:00
Amaury Forgeot d'Arc
cab3d98ca1
Ensure that PySet_Add() operates on a newly created frozenset, like PyTuple_SetItem does.
...
Add PyFrozenSet_Check(), which was not needed before; The list of Py*Set_Check* macros seems to be complete now.
Add missing NEWS entries about all this.
2008-02-03 22:51:43 +00:00
Brett Cannon
70c0c02691
Add an entry for r60537.
2008-02-03 09:59:21 +00:00
Gregory P. Smith
eeed5b7c22
Merge this fix from the pybsddb tree:
...
r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines
Solved memory leak when using cursors with
databases without environment.
2008-02-03 07:20:53 +00:00
Christian Heimes
951cc0f474
Fixed bug #1983 : Return from fork() is pid_t, not int
2008-01-31 23:08:23 +00:00
Mark Dickinson
105be7725b
Issue #1678380 . Fix a bug that identifies 0j and -0j when they appear
...
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.
2008-01-31 22:17:37 +00:00
Christian Heimes
cba36bbe65
Bug #1234 : Fixed semaphore errors on AIX 5.2
2008-01-30 22:54:18 +00:00
Christian Heimes
4d4f270941
Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
2008-01-30 11:32:37 +00:00
Christian Heimes
908caac52e
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
2008-01-27 23:34:59 +00:00
Georg Brandl
6caad7d2cb
Move C API entries to the corresponding section.
2008-01-26 14:19:22 +00:00
Georg Brandl
0cdf9a36ec
#1473257 : add generator.gi_code attribute that refers to
...
the original code object backing the generator. Patch by Collin Winter.
2008-01-26 14:14:20 +00:00
Georg Brandl
29604a1b4c
#1940 : make it possible to use curses.filter() before curses.initscr()
...
as the documentation says.
2008-01-26 14:03:47 +00:00
Christian Heimes
7f39c9fcbb
Backport of several functions from Python 3.0 to 2.6 including PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0.
...
First chapter of the Python 3.0 io framework back port: _fileio
The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
2008-01-25 12:18:43 +00:00
Amaury Forgeot d'Arc
31eaafef4a
News entry for r60265 (Issue 1920).
2008-01-24 22:59:25 +00:00
Guido van Rossum
eead05fdd6
News about recently fixed crashers:
...
- A few crashers fixed: weakref_in_del.py (issue #1377858 );
loosing_dict_ref.py (issue #1303614 , test67.py);
borrowed_ref_[34].py (not in tracker).
2008-01-24 18:21:02 +00:00
Vinay Sajip
d7cf32e668
Updated for optional delay argument to FileHandler and subclasses.
2008-01-24 12:43:33 +00:00
Christian Heimes
b2302ba977
Applied #1069410
...
The "can't load dll" message box on Windows is suppressed while an extension is loaded by calling SetErrorMode in dynload_win.c. The error is still reported properly.
2008-01-23 17:15:06 +00:00
Christian Heimes
082c9b0267
Fixed bug #1915 : Python compiles with --enable-unicode=no again. However several extension methods and modules do not work without unicode support.
2008-01-23 14:20:50 +00:00
Raymond Hettinger
c226c31139
Let pprint() support sets and frozensets (suggested by David Mertz).
2008-01-23 00:04:40 +00:00
Gregory P. Smith
95cd5c0b72
- Fix Issue #1703448 : A joined thread could show up in the
...
threading.enumerate() list after the join() for a brief period until
it actually exited.
2008-01-22 01:20:42 +00:00
Gregory P. Smith
c64386b595
accepts and closes issue #1221598 : adds an optional callback to ftplib.FTP
...
storbinary() and storlines() methods.
2008-01-22 00:19:41 +00:00
Georg Brandl
32a3fb5ec9
Patch #1720595 : add T_BOOL to the range of structmember types.
...
Patch by Angelo Mottola, reviewed by MvL, tests by me.
2008-01-21 21:23:15 +00:00
Georg Brandl
f2dae0e14a
#1715 : include sub-extension modules in pydoc text output.
2008-01-21 21:05:49 +00:00
Georg Brandl
26543b1dfa
Add NEWS entry for #1882 .
2008-01-21 18:36:51 +00:00
Vinay Sajip
2bdc48c6e0
Updated to include news on recent logging fixes and documentation changes.
2008-01-21 18:16:05 +00:00
Georg Brandl
501601591b
#1530959 : change distutils build dir for --with-pydebug python builds.
2008-01-21 17:42:40 +00:00
Georg Brandl
864de8274c
#1555501 : document plistlib and move it to the general library.
2008-01-21 16:34:07 +00:00
Georg Brandl
5ca3fd8d39
mmap is an extension module.
2008-01-21 14:18:14 +00:00
Georg Brandl
845c403c08
#1087741 : make mmap.mmap the type of mmap objects, not a
...
factory function. Allow it to be subclassed.
2008-01-21 14:16:46 +00:00
Georg Brandl
66e7363c10
#1269 : fix a bug in pstats.add_callers() and add a unit test file for pstats.
2008-01-21 10:24:59 +00:00
Georg Brandl
5235398323
#1669 : don't allow shutil.rmtree() to be called on a symlink.
2008-01-20 14:17:42 +00:00
Georg Brandl
56112895d6
#1648 : add sys.gettrace() and sys.getprofile().
2008-01-20 13:59:46 +00:00
Georg Brandl
d5e6cf2b15
#1664522 : in urllib, don't read non-existing directories in ftp mode,
...
returning a 0-byte file -- raise an IOError instead.
Original patch from Phil Knirsch.
2008-01-20 12:18:17 +00:00
Georg Brandl
2235011d49
#856047 : respect the ``no_proxy`` env var when checking for proxies
...
in urllib and using the other ``_proxy`` env vars.
Original patch by Donovan Baarda.
2008-01-20 12:05:43 +00:00
Georg Brandl
9b0d46db11
#1178141 : add addinfourl.code to get http status code from urllib.
2008-01-20 11:43:03 +00:00
Gregory P. Smith
f25680afd0
note for r60121
2008-01-20 01:26:04 +00:00
Andrew M. Kuchling
4a2762d146
Patch #1048820 from Stefan Wehr: add insert-mode editing to Textbox.
...
Fix an off-by-one error I noticed.
2008-01-20 00:00:38 +00:00
Gregory P. Smith
350d03b18a
Fixes/Accepts Patch for issue1189216 - Work properly with archives
...
that have file headers past the 2**31 byte boundary.
2008-01-19 23:10:52 +00:00
Gregory P. Smith
b9ba075400
note about r60104
2008-01-19 21:00:37 +00:00
Andrew M. Kuchling
060e6855a8
Patch #1019808 from Federico Schwindt: Return correct socket error when
...
a default timeout has been set, by using getsockopt() to get the error
condition (instead of trying another connect() call, which seems to be
a Linuxism).
2.5 bugfix candidate, assuming no one reports any problems with this change.
2008-01-19 20:47:59 +00:00
Georg Brandl
309501a617
#1663329 : add os.closerange() to close a range of fds,
...
ignoring errors, and use this in subprocess to speed up
subprocess creation in close_fds mode. Patch by Mike Klaas.
2008-01-19 20:22:13 +00:00
Georg Brandl
c6fde7293e
Fix #1146 : TextWrap vs words 1-character shorter than the width.
...
Patch by Quentin Gallet-Gilles.
2008-01-19 19:48:19 +00:00
Georg Brandl
14404b68d8
Fix #1679 : "0x" was taken as a valid integer literal.
...
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
2008-01-19 19:27:05 +00:00
Skip Montanaro
562133b8be
missing from r60088 checkin.
2008-01-19 18:47:24 +00:00
Facundo Batista
6e22be7226
Comment in NEWS regarding the change in trace.py.
2008-01-19 18:45:46 +00:00
Andrew M. Kuchling
5c60bfcfbf
Patch #976880 : add mmap .rfind() method, and 'end' paramter to .find().
...
Contributed by John Lenton.
2008-01-19 18:18:41 +00:00
Andrew M. Kuchling
e45a77adbe
Patch #742598 from Michael Pomraning: add .timeout attribute to SocketServer that will call
...
.handle_timeout() method when no requests are received within the timeout period.
2008-01-19 16:26:13 +00:00
Facundo Batista
2b1b195d39
Fix issue #1822 : MIMEMultipart.is_multipart() behaves correctly for a
...
just-created (and empty) instance. Added tests for this. Thanks
Jonathan Share.
2008-01-19 12:32:27 +00:00
Christian Heimes
288e89acfc
Added bytes and b'' as aliases for str and ''
2008-01-18 18:24:07 +00:00
Christian Heimes
bd865db90c
Added win_add2path.py to Tools/scripts/
...
Added builddoc.bat to Doc/
2008-01-18 11:58:50 +00:00
Raymond Hettinger
44bd6c0a4f
Issue #1861 : Add read-only attribute listing upcoming events in the order they will be run.
2008-01-17 19:31:38 +00:00
Gregory P. Smith
bde4ae4bde
Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339
...
- Factor out the duplication of EHLO/HELO in login() and sendmail() to
a new function, ehlo_or_helo_if_needed().
- Use ehlo_or_helo_if_needed() in starttls()
- Check for the starttls exception in starttls() in the same way as
login() checks for the auth extension.
Contributed by Bill Fenner.
2008-01-17 08:35:49 +00:00
Gregory P. Smith
2b3ba58bf4
entry for r60015
2008-01-17 08:03:17 +00:00
Raymond Hettinger
473170908e
Make starmap() match its pure python definition and accept any itertable input (not just tuples).
2008-01-17 03:02:14 +00:00
Raymond Hettinger
3ad2acc857
Add news entry.
2008-01-16 23:49:35 +00:00
Thomas Heller
415c1e36a9
Raise a TypeError instead of a ValueError when too many initializers
...
are used in a Structure or Union constructor.
2008-01-16 19:45:51 +00:00
Thomas Heller
02ec289f3e
Raise a TypeError if conflicting positional and named arguments are
...
passed to a Structure or Union constructor.
2008-01-16 19:37:33 +00:00
Thomas Heller
902d30752f
Convert the internal ctypes array type cache to a WeakValueDict so
...
that array types do not live longer than needed.
2008-01-16 19:16:27 +00:00
Guido van Rossum
cad3724352
Issue #1786 (by myself): pdb should use its own stdin/stdout around an
...
exec call and when creating a recursive instance.
2008-01-15 17:59:29 +00:00
Raymond Hettinger
cbf8f6cffb
Temporarily revert 59967 until GC can be added.
2008-01-15 05:39:59 +00:00
Raymond Hettinger
c216df9288
Issue 1820: structseq objects did not work with the % formatting operator or isinstance(t, tuple).
...
Orignal patch (without tests) by Leif Walsh.
2008-01-15 03:02:37 +00:00
Raymond Hettinger
351e1a3e88
Fix 1698398: Zipfile.printdir() crashed because the format string expected a tuple object of length six instead of a time.struct_time object.
2008-01-14 22:58:05 +00:00
Christian Heimes
c94e2b5c12
Now that I've learnt about structseq objects I felt like converting sys.float_info to a structseq. It's
...
readonly and help(sys.float_info) explains the attributes nicely.
2008-01-14 04:13:37 +00:00
Christian Heimes
f31b69f9db
Applied patch #1816 : sys.flags patch
2008-01-14 03:42:48 +00:00
Christian Heimes
9c2019632b
Added new an better structseq representation. E.g. repr(time.gmtime(0)) now returns 'time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)' instead of '(1970, 1, 1, 0, 0, 0, 3, 1, 0)'. The feature is part of #1816 : sys.flags
2008-01-14 03:33:52 +00:00
Amaury Forgeot d'Arc
e4c270c2a8
Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)
...
now that ctypes uses a more supported method to create types:
Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
2008-01-14 00:29:41 +00:00
Georg Brandl
d1c131a6e3
Back out r59931 - test_ctypes fails with it.
2008-01-13 15:04:05 +00:00
Georg Brandl
27e26ec418
Patch #1700288 : Method cache optimization, by Armin Rigo, ported to
...
2.6 by Kevin Jacobs.
2008-01-12 13:47:57 +00:00
Mark Dickinson
59bc20bb27
Issue 1780: Allow leading and trailing whitespace in Decimal constructor,
...
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
2008-01-12 01:56:00 +00:00
Georg Brandl
2f32c39227
News entries for rev. 5990[567].
2008-01-11 09:20:58 +00:00
Raymond Hettinger
fff4e6e171
Doctest results return a named tuple for readability
2008-01-11 01:25:54 +00:00
Neal Norwitz
3fc15b8ba4
Reword entry, not sure I made it much better though.
2008-01-10 05:42:58 +00:00
Christian Heimes
3403f1589d
Fixed #1776 . __import__() no longer imports modules by file name
2008-01-09 19:56:33 +00:00
Fred Drake
d4e5613c5f
minor cleaning
2008-01-09 03:11:28 +00:00
Facundo Batista
4473d225a8
Issue 846388. Adds a call to PyErr_CheckSignals to
...
SRE_MATCH so that signal handlers can be invoked during
long regular expression matches. It also adds a new
error return value indicating that an exception
occurred in a signal handler during the match, allowing
exceptions in the signal handler to propagate up to the
main loop. Thanks Josh Hoyt and Ralf Schmitt.
2008-01-08 21:10:12 +00:00
Christian Heimes
b39a756afd
Added __enter__ and __exit__ functions to HKEY object
...
Added ExpandEnvironmentStrings to the _winreg module.
2008-01-08 15:46:10 +00:00
Andrew M. Kuchling
62182c8b72
Patch 1114: fix compilation of curses module on 64-bit AIX, and any other LP64 platforms where attr_t isn't a C long
2008-01-08 14:56:02 +00:00
Andrew M. Kuchling
e0a49b6e05
Patch 1137: allow assigning to .buffer_size attribute of PyExpat.parser objects
2008-01-08 14:30:55 +00:00
Facundo Batista
52b25795c0
Issue #1757 : The hash of a Decimal instance is no longer affected
...
by the current context. Thanks Mark Dickinson.
2008-01-08 12:25:20 +00:00
Georg Brandl
62416bcf5a
#467924 , patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall.
2008-01-07 18:47:44 +00:00
Georg Brandl
aed6c66aa8
patch #1668 : clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG.
2008-01-07 17:25:53 +00:00
Georg Brandl
2da0fceba7
Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
2008-01-07 17:09:35 +00:00
Christian Heimes
fb2d25a154
Issue #1646 : Make socket support TIPC. The socket module now has support
...
for TIPC under Linux, see http://tipc.sf.net/ for more information.
Thanks to Alberto Bertogli for the patch
2008-01-07 16:12:44 +00:00
Georg Brandl
183a084da3
#1742 : don't raise exception on os.path.relpath("a", "a"), but return os.curdir.
...
Reported by Jesse Towner.
2008-01-06 14:27:15 +00:00
Guido van Rossum
c6a04c2629
Patch #1637 : fix urlparse for URLs like ' http://x.com?arg=/foo '.
...
Fix by John Nagle.
2008-01-05 22:19:06 +00:00
Guido van Rossum
ced4eb06e4
Patch #1698 by Senthil: allow '@' in username when parsed by urlparse.py.
2008-01-05 01:21:57 +00:00
Christian Heimes
04ae916fa2
Added interface to Windows' WSAIoctl and a simple example for a network sniffer.
2008-01-04 15:23:30 +00:00
Lars Gustäbel
2ee1c760cc
Issue #1735 : TarFile.extractall() now correctly sets
...
directory permissions and times.
(will backport to 2.5)
2008-01-04 14:00:33 +00:00
Christian Heimes
0687561c94
Bug #1713 : posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
2008-01-04 13:21:07 +00:00
Andrew M. Kuchling
adc60ab626
Typo fix
2008-01-04 02:26:00 +00:00
Amaury Forgeot d'Arc
e0b7695286
Partial port of r59682 from py3k.
...
On Windows, when import fails to load a dll module, the message says
"error code 193" instead of a more informative text.
It turns out that FormatMessage needs additional parameters for some error codes.
For example: 193 means "%1 is not a valid Win32 application".
Since it is impossible to know which parameter to pass, we use
FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better
than the number.
2008-01-04 02:04:15 +00:00
Christian Heimes
8267d1dfe5
Bug #1481296 : Fixed long(float('nan'))!=0L.
2008-01-04 00:37:34 +00:00
Christian Heimes
0613188bc3
Fixed #1687 : plistlib.py restricts <integer> to Python int when writing
2008-01-04 00:04:52 +00:00
Guido van Rossum
076d9eef7b
Bug #1301 : fixed a bad assert in _tkinter.
2008-01-03 23:54:04 +00:00
Christian Heimes
eebb79cc69
Added copysign(x, y) function to the math module
2008-01-03 22:32:26 +00:00
Christian Heimes
000a074c95
Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0
...
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
2008-01-03 22:16:32 +00:00
Christian Heimes
e2ca4245c9
Added math.isinf() and math.isnan()
2008-01-03 20:23:15 +00:00
Guido van Rossum
ae04c3356e
Issue #1700 , reported by Nguyen Quan Son, fix by Fredruk Lundh:
...
Regular Expression inline flags not handled correctly for some unicode
characters. (Forward port from 2.5.2.)
2008-01-03 19:12:44 +00:00
Christian Heimes
1beea3be3e
Issue #1726 : Remove Python/atof.c from PCBuild/pythoncore.vcproj
2008-01-03 15:41:30 +00:00
Jeffrey Yasskin
2f3c16be73
Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
...
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689 .
2008-01-03 02:21:52 +00:00
Christian Heimes
d9fbab2621
Removed PCbuild8/ directory and added a new build directory for VS 2005
...
based on the VS 2008 build directory to PC/VS8.0. The script
PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0.
Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files.
2008-01-02 17:43:40 +00:00
Martin v. Löwis
84b9aab82d
News item for r59653.
2008-01-01 21:09:07 +00:00
Christian Heimes
3adfe9aaae
Renamed PCBuild9 directory to PCBuild
2007-12-31 15:18:55 +00:00
Christian Heimes
cdaa2cbfd5
Added wininst-9.0.exe executable for VS 2008
...
Integrated bdist_wininst into PCBuild9 directory
2007-12-31 14:47:07 +00:00
Martin v. Löwis
cb78de6d25
Bug #1699 : Define _BSD_SOURCE only on OpenBSD.
2007-12-29 18:49:21 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Christian Heimes
0a8143f646
Applied patch #1635 : Float patch for inf and nan on Windows (and other platforms).
...
The patch unifies float("inf") and repr(float("inf")) on all platforms.
2007-12-18 23:22:54 +00:00
Raymond Hettinger
fd7ed407d7
Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary.
...
Allows dictionaries to be pre-sized (upto 255 elements) saving time lost
to re-sizes with their attendant mallocs and re-insertions.
Has zero effect on small dictionaries (5 elements or fewer), a slight
benefit for dicts upto 22 elements (because they had to resize once
anyway), and more benefit for dicts upto 255 elements (saving multiple
resizes during the build-up and reducing the number of collisions on
the first insertions). Beyond 255 elements, there is no addional benefit.
2007-12-18 21:24:09 +00:00
Thomas Heller
153038efa4
Issue #1642 : Fix segfault in ctypes when trying to delete attributes.
2007-12-18 19:00:34 +00:00
Christian Heimes
db3d6cbce0
Fixed #1638 : %zd configure test fails on Linux
2007-12-16 21:39:43 +00:00
Christian Heimes
90e10e79ea
Fixed bug #1620 : New @spam.getter property syntax modifies the property in place.
...
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
2007-12-14 02:35:23 +00:00
Guido van Rossum
7c862f8077
Patch #1608 . Someone with access to autoconf 2.61 or higher needs to
...
run it and check in the resulting configure file.
2007-12-13 20:50:10 +00:00
Raymond Hettinger
adf9ffdfbe
Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate.
2007-12-13 00:08:37 +00:00
Christian Heimes
284d927625
Backport of r59456:59458 from py3k to trunk
...
Issue #1580 : New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
2007-12-10 22:28:56 +00:00
Christian Heimes
7c7f6afa92
Added wide char api variants of getch and putch to msvcrt module. The wide char methods are required to fix #1578 in py3k. I figured out that they might be useful in 2.6, too.
2007-12-10 15:12:41 +00:00
Skip Montanaro
26015494f2
When splitting, avoid making a copy of the string if the split doesn't find
...
anything (issue 1538).
2007-12-08 15:33:24 +00:00
Guido van Rossum
901464f131
Be (just a bit :) more specific about release date.
2007-12-08 04:38:23 +00:00
Andrew M. Kuchling
395fe44210
Spelling fix
2007-12-05 13:27:20 +00:00
Christian Heimes
7cc1c6f0af
Added msg to Misc/NEWS
2007-12-05 12:52:34 +00:00
Martin v. Löwis
69233e87c4
Move nt.access change into the right section.
2007-12-04 08:39:16 +00:00
Martin v. Löwis
7b3cc06a9a
Forward-port r59310:
...
os.access now returns True on Windows for any existing directory.
2007-12-03 23:09:04 +00:00
Christian Heimes
44eeaec173
Patch #1537 from Chad Austin
...
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
2007-12-03 20:01:02 +00:00
Martin v. Löwis
6b449f4f2b
Issue #1727780 : Support loading pickles of random.Random objects created
...
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.
2007-12-03 19:20:02 +00:00
Christian Heimes
c654fc2cad
Added comment to Misc/NEWS for r59290
2007-12-03 13:55:16 +00:00
Nick Coghlan
ef01d822aa
Implement PEP 366
2007-12-03 12:55:17 +00:00
Lars Gustäbel
77b2d63b40
Issue #1531 : Read fileobj from the current offset, do not seek to
...
the start.
(will backport to 2.5)
2007-12-01 21:02:12 +00:00
Christian Heimes
dfdfaab1c5
Feature #1534
...
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
2007-12-01 11:20:10 +00:00
Amaury Forgeot d'Arc
dafd32b730
Issue #1521 : on 64bit platforms, str.decode fails on very long strings.
...
The t# and w# formats were not correctly handled.
Will backport.
2007-11-30 20:51:40 +00:00
Amaury Forgeot d'Arc
be49a90eb3
Add a NEWS entry for r59231
2007-11-30 20:37:22 +00:00
Christian Heimes
28104c58d2
Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504
...
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
2007-11-27 23:16:44 +00:00
Skip Montanaro
58a6f446db
back in these go - thanks to Titus Brown for the fix
2007-11-24 14:30:47 +00:00
Amaury Forgeot d'Arc
ce7d10ccc4
Issue #1445 : Fix a SystemError when accessing the ``cell_contents``
...
attribute of an empty cell object. Now a ValueError is raised.
2007-11-24 13:44:17 +00:00
Skip Montanaro
98f4079fa0
revert
2007-11-24 04:31:15 +00:00
Skip Montanaro
90b5bc3a7d
issue 1429818
2007-11-23 17:12:47 +00:00
Amaury Forgeot d'Arc
f57375af28
Add a NEWS entry for r59076.
2007-11-21 01:38:26 +00:00
Christian Heimes
3f065a414a
Added NEWS entry
...
Thanks for the reminder, Brett
2007-11-21 01:17:28 +00:00
Brett Cannon
43e53f85b6
doctest assumed that a package's __loader__.get_data() method used universal
...
newlines; it doesn't. To rectify this the string returned replaces all
instances of os.linesep with '\n' to fake universal newline support.
Backport candidate.
2007-11-21 00:47:36 +00:00
Nick Coghlan
327a39b047
Patch #1739468 : Directories and zipfiles containing __main__.py are now executable
2007-11-18 11:56:28 +00:00
Amaury Forgeot d'Arc
0d75f09177
Merge from py3k branch:
...
Correction for issue1265 (pdb bug with "with" statement).
When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set. This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.
It is necessary to save/restore the exception around the call to the trace
function.
This happens a lot with py3k: isinstance() of an ABCMeta instance runs
def __instancecheck__(cls, instance):
"""Override for isinstance(instance, cls)."""
return any(cls.__subclasscheck__(c)
for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.
Backport candidate, even if the case is less frequent in 2.5.
2007-11-13 21:54:28 +00:00
Martin v. Löwis
63bf149a26
Patch #1418 : Make the AC_REPLACE_FUNCS object files actually work.
2007-11-12 05:14:05 +00:00
Raymond Hettinger
1760c8a017
Add set.isdisjoint()
2007-11-08 02:52:43 +00:00
Nick Coghlan
90b858e1b3
Add missing NEWS entry
2007-11-07 11:57:51 +00:00
Raymond Hettinger
dc1d1ba9cf
Add build option for faster loop execution.
2007-11-07 02:45:46 +00:00
Raymond Hettinger
12e94200c0
Fix marshal's incorrect handling of subclasses of builtin types (backport candidate).
2007-11-07 01:13:09 +00:00
Gregory P. Smith
e1ac4f1930
Fixes Issue 1385: The hmac module now computes the correct hmac when using
...
hashes with a block size other than 64 bytes (such as sha384 and sha512).
2007-11-06 00:19:03 +00:00
Gregory P. Smith
ac11e02143
Add the bsddb.db.DBEnv.lock_id_free method.
...
Improve test_lock's tempdir creation and cleanup.
2007-11-05 02:56:31 +00:00
Gregory P. Smith
ec10a4a402
Fixes bug 477182 on pybsddb.sf.net. DB objects now load the flags and
...
pay attention to them when opening an existing database. This means
that d[] behaves properly even on databases previously created with DB_DUP
or DB_DUPSORT flags to allow duplicate keys.
http://sourceforge.net/tracker/index.php?func=detail&aid=477182&group_id=13900&atid=113900
Do not backport, this bugfix could be considered an API change.
2007-11-05 02:32:26 +00:00
Thomas Heller
486b1b0268
Issue #1292 : On alpha, arm, ppc, and s390 linux systems the
...
--with-system-ffi configure option defaults to "yes" because the
bundled libffi sources are too old.
2007-11-02 19:10:24 +00:00
Gregory P. Smith
f7601ee2c0
false "fix" undone as correct problem was found and fixed.
2007-11-01 21:17:47 +00:00
Hye-Shik Chang
a838a801f2
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
...
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
2007-10-28 11:19:02 +00:00
Georg Brandl
1a94ec2664
Bug #1287 : make os.environ.pop() work as expected.
2007-10-24 21:40:38 +00:00
Matthias Klose
9afb9850f2
- Build using system ffi library on arm*-linux*.
2007-10-24 20:00:44 +00:00
Raymond Hettinger
3f8caa3ba7
Optimize sum() for integer and float inputs.
2007-10-24 01:28:33 +00:00
Raymond Hettinger
cd3c108ca1
Fixup news entry
2007-10-23 21:23:07 +00:00
Raymond Hettinger
01a0957f06
Shorter name for namedtuple()
2007-10-23 20:37:41 +00:00
Thomas Heller
91ac42243c
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
...
See also https://bugs.launchpad.net/bugs/72505 .
Ported from release25-maint branch.
2007-10-19 18:11:41 +00:00
Gregory P. Smith
82eafe6adf
mention bsddb fixes.
2007-10-18 17:17:57 +00:00
Martin v. Löwis
d476a400b4
Bug #1216 : Restore support for Visual Studio 2002.
...
Will backport to 2.5.
2007-10-12 08:56:52 +00:00
Thomas Heller
7fee6dd2a3
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
...
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
2007-10-11 19:51:32 +00:00
Raymond Hettinger
a48a29947a
Eliminate camelcase function name
2007-10-08 21:26:58 +00:00
Neal Norwitz
44f326ef2a
Add a note about fixing some more warnings found by Coverity.
2007-10-05 05:29:17 +00:00
Raymond Hettinger
a7fc4b13e0
Add __asdict__() to NamedTuple and refine the docs.
...
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
2007-10-05 02:47:07 +00:00
Raymond Hettinger
50e90e265f
itertools.count() no longer limited to sys.maxint.
2007-10-04 00:20:27 +00:00
Raymond Hettinger
8f6693701c
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
2007-10-03 21:18:11 +00:00
Brett Cannon
0b14f243c4
tuple.__repr__ did not consider a reference loop as it is not possible from
...
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386 . Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
2007-09-30 19:45:10 +00:00
Georg Brandl
aff85e2d26
Patch #1541463 : optimize performance of cgi.FieldStorage operations.
2007-09-20 16:06:07 +00:00
Facundo Batista
673debfd63
Annotated the correction to urllib.py, issue #1177
2007-09-19 14:02:03 +00:00
Facundo Batista
b67da23718
Decimal is updated, :)
2007-09-17 16:26:50 +00:00
Brett Cannon
0153159e67
Add a bunch of GIL release/acquire points in tp_print implementations and for
...
PyObject_Print().
Closes issue #1164 .
2007-09-17 03:28:34 +00:00
Georg Brandl
8fd3ecf928
Bug #1153 : repr.repr() now doesn't require set and dictionary items
...
to be orderable to properly represent them.
2007-09-12 19:00:07 +00:00
Brett Cannon
4c20bc40d7
Generators had their throw() method allowing string exceptions. That's a
...
no-no.
Fixes issue #1147 . Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
2007-09-11 21:02:28 +00:00
Brett Cannon
a0c05512ec
Fix a possible segfault from recursing too deep to get the repr of a list.
...
Closes issue #1096 .
2007-09-10 21:38:27 +00:00
Thomas Heller
2825b2ea44
Add a 'c_longdouble' type to the ctypes module.
2007-09-07 06:32:17 +00:00
Brett Cannon
1e534b5425
Fix a crasher where Python code managed to infinitely recurse in C code without
...
ever going back out to Python code in PyObject_Call(). Required introducing a
static RuntimeError instance so that normalizing an exception there is no
reliance on a recursive call that would put the exception system over the
recursion check itself.
2007-09-07 04:18:30 +00:00
Martin v. Löwis
d44a4e9719
Patch #786737 : Allow building in a tree of symlinks pointing to
...
a readonly source.
2007-09-05 11:47:34 +00:00
Matthias Klose
38336406eb
- Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.
2007-09-04 20:46:02 +00:00
Matthias Klose
642ac8530a
- Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
...
to include some information about the build environment.
2007-09-04 18:17:36 +00:00
Martin v. Löwis
a5136196bc
Patch #1031213 : Decode source line in SyntaxErrors back to its original
...
source encoding. Will backport to 2.5.
2007-09-04 14:19:28 +00:00
Martin v. Löwis
58bd49f5fe
Patch #1388440 : Add set_completion_display_matches_hook and
...
get_completion_type to readline.
2007-09-04 13:13:14 +00:00
Matthias Klose
691632f14d
- Added support for linking the bsddb module against BerkeleyDB 4.6.x.
2007-09-03 23:33:04 +00:00
Martin v. Löwis
8bc77e4b33
Bug #1737210 : Change Manufacturer of Windows installer to PSF.
...
Will backport to 2.5.
2007-09-01 06:36:03 +00:00
Martin v. Löwis
7dcb83cdc5
Bug #1709599 : Run test_1565150 only if the file system is NTFS.
2007-08-30 19:04:09 +00:00
Martin v. Löwis
75c23bddbe
Bug #1746880 : Correctly install DLLs into system32 folder on Win64.
2007-08-30 18:25:47 +00:00
Bill Janssen
f413fb06b9
added note on new ssl module and deprecation of socket.ssl
2007-08-30 18:08:06 +00:00
Skip Montanaro
3e275363b6
Recent items.
2007-08-29 01:33:45 +00:00
Lars Gustäbel
0f4a14b56f
TarFile.__init__() no longer fails if no name argument is passed and
...
the fileobj argument has no usable name attribute (e.g. StringIO).
(will backport to 2.5)
2007-08-28 12:31:09 +00:00
Guido van Rossum
95f1a1be3d
News about functools.reduce.
2007-08-27 20:52:10 +00:00
Guido van Rossum
4f2c3ddca4
Server-side SSL and certificate validation, by Bill Janssen.
...
While cleaning up Bill's C style, I may have cleaned up some code
he didn't touch as well (in _ssl.c).
2007-08-25 15:08:43 +00:00
Georg Brandl
8ec5754086
uuid creation is now threadsafe, backport from py3k rev. 57375.
2007-08-24 06:10:01 +00:00
Brett Cannon
dbed7a7394
Make test_runpy re-entrant.
2007-08-23 14:53:17 +00:00
Hye-Shik Chang
2390104d81
Add cheot-ga-keut composed make-up sequence support in EUC-KR codec.
2007-08-20 06:49:18 +00:00
Brett Cannon
414f3f90f0
Remove news entry for test.test_support.guard_warnings_filter as it has been
...
removed.
2007-08-17 18:59:58 +00:00
Walter Dörwald
6e39080649
Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.
2007-08-17 16:41:28 +00:00
Georg Brandl
9616444427
Revert the fix for #1548891 , it broke backwards compatibility with arbitrary read buffers.
...
Fixes #1730114 .
2007-08-08 13:03:41 +00:00
Hye-Shik Chang
f3e93a0268
Fix gb18030 codec's bug that doesn't map two-byte characters on
...
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
2007-08-04 04:10:18 +00:00
Neal Norwitz
766d880a2f
Py_ssize_t is defined regardless of HAVE_LONG_LONG. Will backport
2007-08-03 06:46:29 +00:00
Matthias Klose
eb8ff67fd7
- Allow Emacs 22 for building the documentation in info format.
2007-08-02 21:33:13 +00:00
Martin v. Löwis
76760b0e8f
Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
2007-07-31 19:57:56 +00:00
Martin v. Löwis
f1e0b3f630
Bug #1704793 : Return UTF-16 pair if unicodedata.lookup cannot
...
represent the result in a single character.
2007-07-28 07:03:05 +00:00
Martin v. Löwis
f25e35b9ec
Bug #978833 : Close https sockets by releasing the _ssl object.
2007-07-27 18:28:22 +00:00
Martin v. Löwis
254b8f9096
Change location of the package index to pypi.python.org/pypi
2007-07-25 16:24:23 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Thomas Heller
ef4fff3435
Fix for SF# 1649098: avoid zero-sized array declaration in structure.
2007-07-13 17:46:54 +00:00
Thomas Heller
fa704c6ade
Fix for SF# 1701409: segfault in c_char_p of ctypes. The repr output
...
of c_char_p and c_wchar_p has changed as a sideeffect.
2007-07-13 17:12:23 +00:00
Georg Brandl
4b3ab6fcc0
Patch #1675424 : Added tests for uncovered code in the zipfile module.
...
The KeyError raised by Zipfile.getinfo for nonexistent names now has
a descriptive message.
2007-07-12 09:59:22 +00:00
Georg Brandl
9467bc5ad1
Bug #1637365 : add subsection about "__name__ == __main__" to the
...
Python tutorial.
2007-07-12 09:37:49 +00:00
Georg Brandl
7c3b50db66
Patch #1673759 : add a missing overflow check when formatting floats
...
with %G.
2007-07-12 08:38:00 +00:00
Lars Gustäbel
104490e615
Added exclude keyword argument to the TarFile.add() method.
2007-06-18 11:42:11 +00:00
Walter Dörwald
84a3efec37
Add T_PYSSIZET in structmember.h: This can be used for
...
Py_ssize_t members.
Simplify the implementation of UnicodeError objects:
start and end attributes are now stored directly as
Py_ssize_t members, which simplifies various get and
set functions.
2007-06-13 16:57:12 +00:00
Neal Norwitz
db2b1b3389
Reflow long line
2007-06-11 07:36:24 +00:00
Neal Norwitz
c161cb9955
Bug #1734723 : Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
...
Will backport
2007-06-11 07:29:43 +00:00
Martin v. Löwis
6371cd8177
Patch #1733960 : Allow T_LONGLONG to accept ints.
...
Will backport to 2.5.
2007-06-09 07:42:52 +00:00
Neal Norwitz
7dbd2a3720
Prevent expandtabs() on string and unicode objects from causing a segfault when
...
a large width is passed on 32-bit platforms. Found by Google.
It would be good for people to review this especially carefully and verify
I don't have an off by one error and there is no other way to cause overflow.
2007-06-09 03:36:34 +00:00
Martin v. Löwis
da587ab43e
Bug #1733488 : Fix compilation of bufferobject.c on AIX.
...
Will backport to 2.5.
2007-06-08 17:29:20 +00:00
Facundo Batista
10951d51e2
Added an optional timeout parameter to function urllib2.urlopen,
...
with tests in test_urllib2net.py (must have network resource
enabled to execute them). Also modified test_urllib2.py because
testing mock classes must take it into acount. Docs are also
updated.
2007-06-06 17:15:23 +00:00
Facundo Batista
9249312020
FTP.ntransfercmd method now uses create_connection when passive,
...
using the timeout received in connection time.
2007-06-06 15:13:37 +00:00
Hye-Shik Chang
9b5414090b
Bug #1728403 : Fix a bug that CJKCodecs StreamReader hangs when it
...
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
2007-06-05 18:58:51 +00:00
Brett Cannon
f7188cefb3
Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead
...
of ``\s*``. This prevents patterns from "stealing" bits from other patterns in
order to make a match work.
Closes bug #1730389 . Will be backported.
2007-06-03 23:13:41 +00:00
Brett Cannon
19fab761b7
Have configure raise an error when building on AtheOS. Code specific to AtheOS
...
will be removed in Python 2.7.
2007-06-02 03:02:29 +00:00
Georg Brandl
25497a1fa1
Fix wrong issue number.
2007-06-01 19:20:27 +00:00
Georg Brandl
a5ea68905a
Bug #1722484 : remove docstrings again when running with -OO.
2007-06-01 11:33:33 +00:00
Neal Norwitz
4a700bb469
SF 1668596/1720897: distutils now copies data files
...
even if package_dir is empty.
This needs to be backported. I'm too tired tonight. It would be great
if someone backports this if the buildbots are ok with it. Otherwise,
I will try to get to it tomorrow.
2007-06-01 07:29:12 +00:00
Brett Cannon
f0cb1d7ad6
Have cfmfile raise a DeprecationWarning as per PEP 4.
2007-05-31 20:01:11 +00:00
Brett Cannon
791d56f1f7
Cause buildtools to raise a DeprecationWarning.
2007-05-31 19:40:42 +00:00
Brett Cannon
c2aa09ad80
Have the sha module raise a DeprecationWarning as specified in PEP 4.
2007-05-31 19:20:00 +00:00
Brett Cannon
7eec217908
Have md5 raise a DeprecationWarning as per PEP 4.
2007-05-30 22:24:28 +00:00
Brett Cannon
c249bdab92
Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
...
module as deprecated for a while.
2007-05-30 21:48:58 +00:00
Brett Cannon
90134c9a05
Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation.
2007-05-30 20:46:26 +00:00
Lars Gustäbel
a0fcb9384e
Added errors argument to TarFile class that allows the user to
...
specify an error handling scheme for character conversion. Additional
scheme "utf-8" in read mode. Unicode input filenames are now
supported by design. The values of the pax_headers dictionary are now
limited to unicode objects.
Fixed: The prefix field is no longer used in PAX_FORMAT (in
conformance with POSIX).
Fixed: In read mode use a possible pax header size field.
Fixed: Strip trailing slashes from pax header name values.
Fixed: Give values in user-specified pax_headers precedence when
writing.
Added unicode tests. Added pax/regtype4 member to testtar.tar all
possible number fields in a pax header.
Added two chapters to the documentation about the different formats
tarfile.py supports and how unicode issues are handled.
2007-05-27 19:49:30 +00:00
Neal Norwitz
0ac601995c
Add the new function object attribute names from py3k.
2007-05-27 04:08:54 +00:00
Facundo Batista
711a54ebde
Added an optional timeout parameter to urllib.ftpwrapper, with tests
...
(for this and a basic one, because there weren't any). Changed also
NEWS, but didn't find documentation for this function, assumed it
wasn't public...
2007-05-24 17:50:54 +00:00
Georg Brandl
c90bc75994
shlex.split() now has an optional "posix" parameter.
2007-05-24 16:49:29 +00:00
Neal Norwitz
8b2bfbc198
Add -3 option to the interpreter to warn about features that are
...
deprecated and will be changed/removed in Python 3.0.
This patch is mostly from Anthony. I tweaked some format and added
a little doc.
2007-05-23 06:35:32 +00:00
Georg Brandl
2134e754f2
Patch #1686487 : you can now pass any mapping after '**' in function calls.
2007-05-21 20:34:16 +00:00
Facundo Batista
70f996be24
Added timeout support to HTTPSConnection, through the
...
socket.create_connection function. Also added a small
test for this, and updated NEWS file.
2007-05-21 17:32:32 +00:00
Brett Cannon
41bf2fad62
Cause posixfile to raise a DeprecationWarning. Documented as deprecated since
...
Ptyhon 1.5.
2007-05-20 23:57:38 +00:00
Brett Cannon
5e2635103c
Remove the macfs module. This led to the deprecation of macostools.touched();
...
it completely relied on macfs and is a no-op on OS X according to code
comments.
2007-05-20 23:17:38 +00:00
Brett Cannon
dc48b74497
Remove the rgbimg module. It has been deprecated since Python 2.5.
2007-05-20 07:09:50 +00:00
Neal Norwitz
59f58aaeed
Clear data so random memory does not get freed. Will backport.
2007-05-19 03:48:47 +00:00
Collin Winter
6290305e67
Backport PEP 3110's new 'except' syntax to 2.6.
2007-05-18 23:11:24 +00:00
Brett Cannon
d75f043c33
Remove the gopherlib module. It has been raising a DeprecationWarning since
...
Python 2.5.
Also remove gopher support from urllib/urllib2. As both imported gopherlib the
usage of the support would have raised a DeprecationWarning.
2007-05-16 22:42:29 +00:00
Neal Norwitz
b1a9b37aa8
Fix bug in marshal where bad data would cause a segfault due to
...
lack of an infinite recursion check.
Contributed by Damien Miller at Google.
2007-05-16 20:05:11 +00:00
Neal Norwitz
e0e70a42fa
Mention removal of some directories for obsolete platforms
2007-05-16 05:06:33 +00:00
Georg Brandl
a09a96a544
HTML-escape the plain traceback in cgitb's HTML output, to prevent
...
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
2007-05-15 20:19:34 +00:00
Neal Norwitz
42dd86b8e2
Deprecate os.popen* and popen2 module in favor of the subprocess module.
2007-05-11 06:57:33 +00:00
Vinay Sajip
8549ce335f
Updates of recent changes to logging.
2007-05-06 17:53:37 +00:00
Brett Cannon
229cee2d3d
Deprecate BaseException.message as per PEP 352.
2007-05-05 01:34:02 +00:00
Armin Rigo
9790a27065
Fix for #1303614 and #1174712 :
...
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types
Thanks zseil for the patch.
2007-05-02 19:23:31 +00:00
Georg Brandl
3dc6e90a2e
Patch #1698768 : updated the "using Python on the Mac" intro.
2007-04-25 06:24:59 +00:00
Georg Brandl
fb4b3b77c7
Bug #1706381 : Specifying the SWIG option "-c++" in the setup.py file
...
(as opposed to the command line) will now write file names ending in
".cpp" too.
2007-04-24 15:27:13 +00:00
Facundo Batista
d918a65802
Added a comment about last change in urllib2.py (all 2xx responses
...
are ok now).
2007-04-24 13:54:38 +00:00
Neal Norwitz
cbd9ee69ee
When __slots__ are set to a unicode string, make it work the same as
...
setting a plain string, ie don't expand to single letter identifiers.
2007-04-14 05:25:50 +00:00
Walter Dörwald
4234827e99
Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
...
first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
2007-04-12 10:35:00 +00:00
Raymond Hettinger
4db5fe970c
SF 1193128: Let str.translate(None) be an identity transformation
2007-04-12 04:10:00 +00:00
Raymond Hettinger
13936697f6
SF 1191699: Make slices picklable
2007-04-11 18:40:58 +00:00
Brett Cannon
55a1864832
Doc that file.next() has undefined behaviour when called on a file opened with
...
'w'. Closes bug #1569057 .
To be backported once 2.5 branch is unfrozen.
2007-04-08 04:29:32 +00:00
Martin v. Löwis
3bf573f918
Bug #1686475 : Support stat'ing open files on Windows again.
...
Will backport to 2.5.
2007-04-04 18:30:36 +00:00
Walter Dörwald
e6dae6c655
Implement a contextmanager test.test_support.catch_warning that can
...
be used to catch the last warning issued by the warning framework.
Change test_warnings.py and test_structmembers.py to use this
new contextmanager.
2007-04-03 18:33:29 +00:00
Matthias Klose
e19e0c21ae
- Fix an off-by-one bug in locale.strxfrm().
...
patch taken from http://bugs.debian.org/416934 .
2007-04-03 04:35:59 +00:00
Brett Cannon
c69066501b
time.strptime's caching of its locale object was being recreated when the
...
locale changed but not used during the function call it was recreated during.
The test in this checkin is untested (OS X does not have the proper locale
support for me to test), although the fix for the bug this deals with
was tested by the OP (#1290505 ). Once the buildbots verify the test at least
doesn't fail it becomes a backport candidate.
2007-04-01 18:47:27 +00:00
Neal Norwitz
8f35f44af3
SF #1685563 , MSVCCompiler creates redundant and long PATH strings
...
If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated. On Windows, this is a problem because the
path is limited to 4k. There's no benefit in adding a path multiple
times, so prevent that from occuring. We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.
Will backport.
2007-04-01 18:24:22 +00:00
Georg Brandl
db84603760
Bug #1655392 : don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
...
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
2007-03-31 18:56:11 +00:00
Facundo Batista
b6a5c9d605
Added timout parameter to telnetlib.Telnet. Also created
...
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.
2007-03-29 18:22:35 +00:00
Žiga Seilnacht
c64ad484a9
Patch #1489771 : update syntax rules in Python Reference Manual.
...
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output. Will backport.
2007-03-24 14:24:26 +00:00
Guido van Rossum
234b1ff24f
Add note about type.__init__().
2007-03-23 19:39:01 +00:00
Facundo Batista
07c78be0b4
Added a 'create_connect()' function to socket.py, which creates a
...
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
2007-03-23 18:54:07 +00:00
Martin v. Löwis
0af338859b
Bug #978833 : Revert r50844, as it broke _socketobject.dup.
...
Will backport.
2007-03-23 13:27:15 +00:00
Martin v. Löwis
2f401d7186
Patch #1686451 : Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
...
Will backport.
2007-03-23 10:35:49 +00:00
Guido van Rossum
143b564059
- Bug #1683368 : The object.__init__() and object.__new__() methods are
...
now stricter in rejecting excess arguments. The only time when
either allows excess arguments is when it is not overridden and the
other one is. For backwards compatibility, when both are
overridden, it is a deprecation warning (for now; maybe a Py3k
warning later).
When merging this into 3.0, the warnings should become errors.
Note: without the change to string.py, lots of spurious warnings happen.
What's going on there?
2007-03-23 04:58:42 +00:00
Thomas Heller
f493cbd824
Back out "Patch #1643874 : memory leak in ctypes fixed."
...
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
2007-03-22 19:44:31 +00:00
Žiga Seilnacht
7492e4260e
Bug #1675967 : re patterns pickled with older Python versions can
...
now be unpickled. Will backport.
2007-03-21 20:07:56 +00:00
Georg Brandl
cae9f3d916
New test for rev. 54407 which only uses directories under TESTFN.
2007-03-21 09:10:29 +00:00
Georg Brandl
5cb76c19ba
Patch #1682205 : a TypeError while unpacking an iterable is no longer
...
masked by a generic one with the message "unpack non-sequence".
2007-03-21 09:00:39 +00:00
Neal Norwitz
aa754b70b0
Remove unused file spotted by Paul Hankin
2007-03-21 06:39:48 +00:00
Neal Norwitz
c990f6454f
Try backing out 54407 to see if it corrects the problems on the Windows
...
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
2007-03-20 05:23:09 +00:00
Collin Winter
a8785cc26a
Patch #1630118 : add a SpooledTemporaryFile class to tempfile.
2007-03-19 18:52:08 +00:00
Gregory P. Smith
f09c626a42
move note to the correct section
2007-03-17 22:33:35 +00:00
Georg Brandl
2b869943fa
Patch #1675423 : PyComplex_AsCComplex() now tries to convert an object
...
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
(backport)
2007-03-17 16:08:45 +00:00
Collin Winter
6f187743ff
Patch 1339796: add a relpath() function to os.path.
2007-03-16 22:16:08 +00:00
Žiga Seilnacht
6f2d09c949
Patch #1623563 : allow __class__ assignment for classes with __slots__.
...
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
2007-03-16 11:59:38 +00:00
Georg Brandl
8844e438b1
Patch #1273829 : os.walk() now has a "followlinks" parameter. If set to
...
True (which is not the default), it visits symlinks pointing to
directories.
2007-03-16 08:22:40 +00:00
Georg Brandl
8f06d02935
Bug #1681228 : the webbrowser module now correctly uses the default
...
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
(backport)
2007-03-16 07:55:09 +00:00
Collin Winter
77c67bd585
Patch #1642547 : Fix an error/crash when encountering syntax errors in complex if statements.
...
Will backport.
2007-03-16 04:11:30 +00:00
Žiga Seilnacht
20f43d3018
Patch #1462488 : prevent a segfault in object_reduce_ex() by splitting
...
the implementation for __reduce__ and __reduce_ex__ into two separate
functions. Fixes bug #931877 . Will backport.
2007-03-15 11:44:55 +00:00
Georg Brandl
ab1f4674ad
Patch #1681153 : the wave module now closes a file object it opened if
...
initialization failed.
2007-03-15 07:41:30 +00:00
Neal Norwitz
72d9eec1bb
Wrap a long line and fix a typo (is -> if)
2007-03-15 04:41:20 +00:00
Brett Cannon
ea2835a860
Raise ResourceDenied in test_urllib2net when the Net connection goes bad.
2007-03-14 21:44:15 +00:00
Brett Cannon
ed001842cf
Note how test_socket_ssl has various exceptions that deal with a flaky Net
...
connection are silenced.
2007-03-14 21:40:13 +00:00
Martin v. Löwis
cd1210a55f
Patch #1559413 : Fix test_cmd_line if sys.executable contains a space.
...
Will backport.
2007-03-14 20:02:31 +00:00
Žiga Seilnacht
71436f0229
Patch #1680015 : Don't modify __slots__ tuple if it contains an unicode
...
name. Remove a reference leak that happened if the name could not be
converted to string. Will backport.
2007-03-14 12:24:09 +00:00
Georg Brandl
f66b6039c1
Bug #767111 : fix long-standing bug in urllib which caused an
...
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
2007-03-14 08:27:52 +00:00
Georg Brandl
4aef7275cb
Patch #1185447 : binascii.b2a_qp() now correctly quotes binary characters
...
with ASCII value less than 32. Also, it correctly quotes dots only if
they occur on a single line, as opposed to the previous behavior of
quoting dots if they are the second character of any line.
2007-03-13 22:49:43 +00:00
Georg Brandl
03b90d8cfd
Patch #957650 : "%var%" environment variable references are now properly
...
expanded in ntpath.expandvars(), also "~user" home directory references
are recognized and handled on Windows.
2007-03-13 22:07:36 +00:00
Georg Brandl
b6ae6aa8ac
Patch #1429539 : pdb now correctly initializes the __main__ module for
...
the debugged script, which means that imports from __main__ work
correctly now.
2007-03-13 21:58:44 +00:00
Georg Brandl
bad6f1904b
NEWS entry for getstatus() deprecation.
2007-03-13 21:32:56 +00:00
Georg Brandl
8e84c65660
Patch #1393667 : pdb now has a "run" command which restarts the debugged
...
Python program, optionally with different arguments.
2007-03-13 21:08:15 +00:00
Georg Brandl
5240d7416c
Patch #1444529 : the builtin compile() now accepts keyword arguments.
...
(backport)
2007-03-13 20:46:32 +00:00
Thomas Heller
5dc4fe09b7
Patch #1649190 : Adding support for _Bool to ctypes as c_bool, by David Remahl.
2007-03-13 20:42:52 +00:00
Georg Brandl
8441f15626
Patch #1530482 : add pydoc.render_doc() which returns the documentation
...
for a thing instead of paging it to stdout, which pydoc.doc() does.
2007-03-13 20:02:57 +00:00
Georg Brandl
d9bef35e3c
Patch #1533909 : the timeit module now accepts callables in addition to
...
strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its methods.
2007-03-13 19:32:21 +00:00
Georg Brandl
35ef9c19fe
Patch #1537850 : tempfile.NamedTemporaryFile now has a "delete" parameter
...
which can be set to False to prevent the default delete-on-close
behavior.
2007-03-13 18:31:49 +00:00
Georg Brandl
9e6b47002a
Patch #1581073 : add a flag to textwrap that prevents the dropping of
...
whitespace while wrapping.
2007-03-13 18:15:41 +00:00
Georg Brandl
92a6baed7b
Patch #1603688 : ConfigParser.SafeConfigParser now checks values that
...
are set for invalid interpolation sequences that would lead to errors
on reading back those values.
2007-03-13 17:43:32 +00:00
Georg Brandl
a47337fba5
Bug #1622896 : fix a rare corner case where the bz2 module raised an
...
error in spite of a succesful compression.
2007-03-13 12:34:25 +00:00
Lars Gustäbel
c64e40215d
This is the implementation of POSIX.1-2001 (pax) format read/write
...
support.
The TarInfo class now contains all necessary logic to process and
create tar header data which has been moved there from the TarFile
class. The fromtarfile() method was added. The new path and linkpath
properties are aliases for the name and linkname attributes in
correspondence to the pax naming scheme.
The TarFile constructor and classmethods now accept a number of
keyword arguments which could only be set as attributes before (e.g.
dereference, ignore_zeros). The encoding and pax_headers arguments
were added for pax support. There is a new tarinfo keyword argument
that allows using subclassed TarInfo objects in TarFile.
The boolean TarFile.posix attribute is deprecated, because now three
tar formats are supported. Instead, the desired format for writing is
specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT
as the format keyword argument. This change affects TarInfo.tobuf()
as well.
The test suite has been heavily reorganized and partially rewritten.
A new testtar.tar was added that contains sample data in many formats
from 4 different tar programs.
Some bugs and quirks that also have been fixed:
Directory names do no longer have a trailing slash in TarInfo.name or
TarFile.getnames().
Adding the same file twice does not create a hardlink file member.
The TarFile constructor does no longer need a name argument.
The TarFile._mode attribute was renamed to mode and contains either
'r', 'w' or 'a'.
2007-03-13 10:47:19 +00:00
Martin v. Löwis
bdd0f39de5
Patch #1449244 : Support Unicode strings in
...
email.message.Message.{set_charset,get_content_charset}.
Will backport.
2007-03-13 10:24:00 +00:00
Georg Brandl
18c47f6a3b
Patch #1569798 : fix a bug in distutils when building Python from a
...
directory within sys.exec_prefix.
2007-03-13 10:19:22 +00:00
Georg Brandl
b6a87542b3
Patch #1542681 : add entries for "with", "as" and "CONTEXTMANAGERS" to
...
pydoc's help keywords.
2007-03-13 10:06:48 +00:00
Georg Brandl
4ffc8f5107
Patch #1555098 : use str.join() instead of repeated string
...
concatenation in robotparser.
2007-03-13 09:41:31 +00:00
Georg Brandl
94fe3f58d0
Patch #1635454 : the csv.DictWriter class now includes the offending
...
field names in its exception message if you try to write a record with
a dictionary containing fields not in the CSV field names list.
2007-03-13 09:32:11 +00:00
Georg Brandl
ceede5c359
Patch #1668100 : urllib2 now correctly raises URLError instead of
...
OSError if accessing a local file via the file:// protocol fails.
2007-03-13 08:14:27 +00:00
Georg Brandl
0692a2621c
Patch #1679379 : add documentation for fnmatch.translate().
2007-03-13 07:50:57 +00:00
Collin Winter
276887b16d
Bug #742342 : make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167 .
...
Will backport.
2007-03-12 16:11:39 +00:00
Georg Brandl
7b9c555520
Bug #1678647 : write a newline after printing an exception in any
...
case, even when converting the value to a string failed.
2007-03-12 14:30:05 +00:00
Georg Brandl
871f1bc601
Backport from Py3k branch:
...
Patch #1591665 : implement the __dir__() special function lookup in PyObject_Dir.
Had to change a few bits of the patch because classobjs and __methods__ are still
in Py2.6.
2007-03-12 13:17:36 +00:00
Martin v. Löwis
2681beb23e
Patch #1677862 : Require a space or tab after import in .pth files.
2007-03-12 11:01:10 +00:00
Martin v. Löwis
eb62357a2e
Bug #1675511 : Use -Kpic instead of -xcode=pic32 on Solaris/x86.
2007-03-12 10:50:39 +00:00
Collin Winter
2faa9e1466
Patch #1192590 : Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
...
Will backport.
2007-03-11 16:00:20 +00:00
Žiga Seilnacht
8903208776
Patch #1675981 : remove unreachable code from type.__new__() method.
...
__dict__ and __weakref__ are removed from the slots tuple earlier
in the code, in the loop that mangles slot names. Will backport.
2007-03-11 15:54:54 +00:00
Collin Winter
ae04106a0e
Patch #1599845 : Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer.
2007-03-10 14:41:48 +00:00
Collin Winter
faaa204129
Add proper attribution for a bug fix.
2007-03-10 03:35:34 +00:00
Collin Winter
22c42ba88c
Bug #1531963 : Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
...
Will backport.
2007-03-10 02:51:26 +00:00
Thomas Heller
2456a3c02a
Bug #1651235 : When a tuple was passed to a ctypes function call,
...
Python would crash instead of raising an error.
The crash was caused by a section of code that should have been
removed long ago, at that time ctypes had other ways to pass
parameters to function calls.
2007-03-09 20:39:22 +00:00
Collin Winter
e38051db87
Patch #1491866 : change the complex() constructor to allow parthensized forms. This means complex(repr(x)) now works instead of raising a ValueError.
2007-03-09 20:33:07 +00:00
Thomas Heller
c2f7725c86
Fix bug #1646630 : ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
...
returned string up to the first NUL character.
2007-03-09 19:21:28 +00:00
Collin Winter
b7b2b4eecf
Bug #1629566 : clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822.
2007-03-09 18:09:10 +00:00
Martin v. Löwis
1190a38d33
Patch #957003 : Implement smtplib.LMTP.
2007-03-09 15:35:55 +00:00
Collin Winter
fb728de5f4
Add NEWS item for patch #1481079 (r54234).
2007-03-09 03:26:32 +00:00
Brett Cannon
a30fcb4dae
Introduce test.test_support.TransientResource. It's a context manager to
...
surround calls to resources that may or may not be available. Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.
This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches. It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
2007-03-08 23:58:11 +00:00
Georg Brandl
9caadf80a1
Add a NEWS entry for rev. 54207,8.
2007-03-08 18:37:31 +00:00
Martin v. Löwis
05c075d629
Bug #1115886 : os.path.splitext('.cshrc') gives now ('.cshrc', '').
2007-03-07 11:04:33 +00:00
Georg Brandl
d0a962506b
Patch #787789 : allow to pass custom TestRunner instances to unittest's
...
main() function.
2007-03-07 09:21:06 +00:00
Georg Brandl
15c5ce936f
Patches #1550273 , #1550272 : fix a few bugs in unittest and add a
...
comprehensive test suite for the module.
2007-03-07 09:09:40 +00:00
Georg Brandl
71ff646743
Patch #1001604 : glob.glob() now returns unicode filenames if it was
...
given a unicode argument and os.listdir() returns unicode filenames.
2007-03-07 08:31:51 +00:00
Georg Brandl
aa2321b0f8
Patch #703779 : unset __file__ in __main__ after running a file. This
...
makes the filenames the warning module prints much more sensible when
a PYTHONSTARTUP file is used.
2007-03-07 00:40:28 +00:00
Georg Brandl
49aafc9f2c
Variant of patch #697613 : don't exit the interpreter on a SystemExit
...
exception if the -i command line option or PYTHONINSPECT environment
variable is given, but break into the interactive interpreter just like
on other exceptions or normal program exit.
(backport)
2007-03-07 00:34:46 +00:00
Walter Dörwald
8537c303c7
Document change to curses.
2007-03-06 21:15:24 +00:00
Georg Brandl
40c626159d
Patch #1654417 : make operator.{get,set,del}slice use the full range
...
of Py_ssize_t.
2007-03-06 18:59:11 +00:00
Georg Brandl
00cd818dea
Patch #1638879 : don't accept strings with embedded NUL bytes in long().
2007-03-06 18:41:12 +00:00
Guido van Rossum
2054ee9b6f
Patch #1646728 : datetime.fromtimestamp fails with negative
...
fractional times. With unittest.
Somebody please backport to 2.5.
2007-03-06 15:50:01 +00:00
Skip Montanaro
d1287323ca
patch 1673619 - identify extension modules which cannot be built
2007-03-06 15:41:38 +00:00
Martin v. Löwis
ab8a6bba25
Patch #912410 : Replace HTML entity references for attribute values
...
in HTMLParser.
2007-03-06 14:43:00 +00:00
Georg Brandl
ff432e6f4a
Patch #1663234 : you can now run doctest on test files and modules
...
using "python -m doctest [-v] filename ...".
2007-03-06 13:37:45 +00:00
Georg Brandl
098cd69ff9
Bug #1674503 : close the file opened by execfile() in an error condition.
2007-03-06 12:17:50 +00:00
Martin v. Löwis
3eb7648986
Patch #1121142 : Implement ZipFile.open.
2007-03-06 10:41:24 +00:00
Georg Brandl
d28b9fc686
Patch #1671450 : add a section about subclassing builtin types to the
...
"extending and embedding" tutorial.
2007-03-06 10:02:47 +00:00
Georg Brandl
0fca97a5fb
Patch #1674228 : when assigning a slice (old-style), check for the
...
sq_ass_slice instead of the sq_slice slot.
2007-03-05 22:28:08 +00:00
Skip Montanaro
f694b1b741
note MacPorts/BerkDB change in setup.py
2007-03-04 20:54:12 +00:00
Raymond Hettinger
c37e5e04eb
Add collections.NamedTuple
2007-03-01 06:16:43 +00:00
Jeremy Hylton
cca75403c4
Add news about changes to metaclasses and __bases__ error checking.
2007-02-27 18:33:31 +00:00
Neal Norwitz
88516a6039
When printing an unraisable error, don't print exceptions. before the name.
...
This duplicates the behavior whening normally printing exceptions.
2007-02-26 22:41:45 +00:00
Jeremy Hylton
c5ceb251b3
Fix crash in exec when unicode filename can't be decoded.
...
I can't think of an easy way to test this behavior. It only occurs
when the file system default encoding and the interpreter default
encoding are different, such that you can open the file but not decode
its name.
2007-02-25 15:57:45 +00:00
Raymond Hettinger
d36862cf78
Add itertools.izip_longest().
2007-02-21 05:20:38 +00:00
Martin v. Löwis
382abeff0f
Patch #1490190 : posixmodule now includes os.chflags() and os.lchflags()
...
functions on platforms where the underlying system calls are available.
2007-02-19 10:55:19 +00:00
Lars Gustäbel
0713a68dc5
Moved misplaced news item.
2007-02-19 09:54:47 +00:00
Raymond Hettinger
00166c5532
Add merge() function to heapq.
2007-02-19 04:08:43 +00:00
Brett Cannon
971a012ce1
Update the encoding package's search function to use absolute imports when
...
calling __import__. This helps make the expected search locations for encoding
modules be more explicit.
One could use an explicit value for __path__ when making the call to __import__
to force the exact location searched for encodings. This would give the most
strict search path possible if one is worried about malicious code being
imported. The unfortunate side-effect of that is that if __path__ was modified
on 'encodings' on purpose in a safe way it would not be picked up in future
__import__ calls.
2007-02-15 22:54:39 +00:00
Georg Brandl
983d100202
Patch #1494140 : Add documentation for the new struct.Struct object.
2007-02-15 11:29:04 +00:00
Martin v. Löwis
45423a7571
Patch #1432399 : Add HCI sockets.
2007-02-14 10:07:37 +00:00
Lars Gustäbel
5b1a785702
Patch #1647484 : Renamed GzipFile's filename attribute to name. The
...
filename attribute is still accessible as a property that emits a
DeprecationWarning.
2007-02-13 16:09:24 +00:00
Martin v. Löwis
b1cc1d407b
Patch #1657276 : Make NETLINK_DNRTMSG conditional.
...
Will backport.
2007-02-13 12:14:19 +00:00
Martin v. Löwis
84f6de9d7e
Patch #1517891 : Make 'a' create the file if it doesn't exist.
...
Fixes #1514451 .
2007-02-13 10:10:39 +00:00
Martin v. Löwis
c6d626ed9f
Patch #698833 : Support file decryption in zipfile.
2007-02-13 09:49:38 +00:00
Martin v. Löwis
07aa3ed372
Patch #685268 : Consider a package's __path__ in imputil.
...
Will backport.
2007-02-13 08:34:45 +00:00
Martin v. Löwis
2bad58f5a4
Patch 1463026: Support default namespace in XMLGenerator.
...
Fixes #847665 . Will backport.
2007-02-12 12:21:10 +00:00
Skip Montanaro
691acf2879
fix trace.py --ignore-dir
2007-02-11 18:24:37 +00:00
Martin v. Löwis
0a2032673c
Bug #1600860 : Search for shared python library in LIBDIR, not
...
lib/python/config, on "linux" and "gnu" systems.
Will backport.
2007-02-09 12:36:48 +00:00
Martin v. Löwis
fd963265e2
Bug #1653736 : Properly discard third argument to slot_nb_inplace_power.
...
Will backport.
2007-02-09 12:19:32 +00:00
Martin v. Löwis
4c11a92625
Bug #1653736 : Complain about keyword arguments to time.isoformat.
...
Will backport to 2.5.
2007-02-08 09:13:36 +00:00
Lars Gustäbel
3f8aca1164
Patch #1652681 : create nonexistent files in append mode and
...
allow appending to empty files.
2007-02-06 18:38:13 +00:00
Peter Astrand
5f9c6ae545
Applied patch 1124861.3.patch to solve bug #1124861 : Automatically create pipes on Windows, if GetStdHandle fails. Will backport.
2007-02-06 15:37:50 +00:00
Brett Cannon
129bd52146
No more raising of string exceptions!
...
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError. Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
2007-01-30 21:34:36 +00:00
Brett Cannon
e05e6b0032
Add a test for slicing an exception.
2007-01-29 04:41:44 +00:00
Georg Brandl
4ba9e5bdc7
Patch #1634778 : add missing encoding aliases for iso8859_15 and
...
iso8859_16.
2007-01-27 17:59:42 +00:00
Georg Brandl
ab49684f55
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.
2007-01-27 17:43:02 +00:00
Brett Cannon
07e1db317d
Fix time.strptime's %U support. Basically rewrote the algorithm to be more
...
generic so that one only has to shift certain values based on whether the week
was specified to start on Monday or Sunday. Cut out a lot of edge case code
compared to the previous version. Also broke algorithm out into its own
function (that is private to the module).
Fixes bug #1643943 (thanks Biran Nahas for the report).
2007-01-25 20:22:02 +00:00
Thomas Heller
4378215474
Fix for #1643874 : When calling SysAllocString, create a PyCObject
...
which will eventually call SysFreeString to free the BSTR resource.
2007-01-25 18:34:14 +00:00
Brett Cannon
f5bee30e30
Fix crasher for when an object's __del__ creates a new weakref to itself.
...
Patch only fixes new-style classes; classic classes still buggy.
Closes bug #1377858 . Already backported.
2007-01-23 23:21:22 +00:00
Martin v. Löwis
6c5c502b91
Make PyTraceBack_Here use the current thread, not the
...
frame's thread state. Fixes #1579370 .
Will backport.
2007-01-23 21:11:47 +00:00
Thomas Wouters
6ed1965308
Add news entry about last checkin (oops.)
2007-01-23 13:50:49 +00:00
Lars Gustäbel
d2e22903d3
Patch #1507247 : tarfile.py: use current umask for intermediate
...
directories.
2007-01-23 11:17:33 +00:00
Georg Brandl
dd7b0525e9
Patch #1627441 : close sockets properly in urllib2.
2007-01-21 10:35:10 +00:00
Georg Brandl
b84c13792d
Bug #1486663 : don't reject keyword arguments for subclasses of builtin
...
types.
2007-01-21 10:28:43 +00:00
Martin v. Löwis
aef4c6bc00
Patch #1610575 : Add support for _Bool to struct.
2007-01-21 09:33:07 +00:00
Martin v. Löwis
4885e7d098
Prefix AST symbols with _Py_. Fixes #1637022 .
...
Will backport.
2007-01-19 06:42:22 +00:00
Georg Brandl
b26b1c6d6b
Bug #1629125 : fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
2007-01-17 21:19:58 +00:00
Sjoerd Mullender
33a0a06d31
Fixed ntpath.expandvars to not replace references to non-existing
...
variables with nothing. Also added tests.
This fixes bug #494589 .
2007-01-16 16:42:38 +00:00
Marc-André Lemburg
fa3d08b4a9
Add news items for the recent pybench and platform changes.
2007-01-16 13:03:06 +00:00
Guido van Rossum
bb2cc698c1
Patch #1635058 by Mark Roberts: ensure that htonl and friends never accept or
...
return negative numbers, per the underlying C implementation.
2007-01-14 17:03:32 +00:00
Brett Cannon
093b67061a
Deprecate the sets module.
2007-01-13 00:29:49 +00:00
Thomas Heller
6fd4549bc6
patch #1610795 : BSD version of ctypes.util.find_library, by Martin
...
Kammerhofer.
2007-01-12 20:21:53 +00:00
Thomas Heller
8138c26a83
Fixes for 64-bit Windows: In ctypes.wintypes, correct the definitions
...
of HANDLE, WPARAM, LPARAM data types. Make parameterless foreign
function calls work.
2007-01-11 21:18:56 +00:00
Matthias Klose
a398e2d059
- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092 ).
2007-01-11 11:44:04 +00:00
Thomas Heller
fb9d78733e
Change the ctypes version number to "1.1.0".
2007-01-10 20:12:13 +00:00
Vinay Sajip
ab41c109fa
Added entry about addition of _open() method to logging.FileHandler.
2007-01-09 14:51:36 +00:00
Vinay Sajip
c9137263d5
Added entries about removal of some bare except clauses from logging.
2007-01-08 18:52:36 +00:00
Neal Norwitz
72cd02c041
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__).
Will backport.
2007-01-05 05:25:22 +00:00
Gregory P. Smith
8b96a35d14
Support linking of the bsddb module against BerkeleyDB 4.5.x
...
(will backport to 2.5)
2007-01-05 01:59:42 +00:00
Martin v. Löwis
7b7c9d4208
Bug #1566280 : Explicitly invoke threading._shutdown from Py_Main,
...
to avoid relying on atexit.
Will backport to 2.5.
2007-01-04 21:06:12 +00:00
Brett Cannon
92d54d5e9c
Add EnvironmentVarGuard to test.test_support. Provides a context manager to
...
temporarily set or unset environment variables.
2007-01-04 00:23:49 +00:00
Lars Gustäbel
a7ba6fc548
Patch #1504073 : Fix tarfile.open() for mode "r" with a fileobj argument.
...
Will backport to 2.5.
2006-12-27 10:30:46 +00:00
Andrew M. Kuchling
7166232399
[Rest of patch #1182394 ] Add ._current() method so that we can use the written-in-C .hexdigest() method
2006-12-27 03:31:24 +00:00
Lars Gustäbel
a4b2381b20
Patch #1262036 : Prevent TarFiles from being added to themselves under
...
certain conditions.
Will backport to 2.5.
2006-12-23 17:57:23 +00:00
Lars Gustäbel
6baa502769
Patch #1230446 : tarfile.py: fix ExFileObject so that read() and tell()
...
work correctly together with readline().
Will backport to 2.5.
2006-12-23 16:40:13 +00:00
Raymond Hettinger
94547f7646
Bug #1590891 : random.randrange don't return correct value for big number
...
Needs to be backported.
2006-12-20 06:42:06 +00:00
Georg Brandl
ebbeed781d
Patch #1484695 : The tarfile module now raises a HeaderError exception
...
if a buffer given to frombuf() is invalid.
2006-12-19 22:06:46 +00:00
Vinay Sajip
76fdb8c050
Added news on recent changes to logging
2006-12-14 08:53:55 +00:00
Brett Cannon
6d9520c4f0
Add test.test_support.guard_warnings_filter . This function returns a context
...
manager that protects warnings.filter from being modified once the context is
exited.
2006-12-13 23:09:53 +00:00
Matthias Klose
ebde1498e7
- Fix the build of the library reference in info format.
2006-12-09 12:15:27 +00:00
Georg Brandl
b130743e97
Patch #1608267 : fix a race condition in os.makedirs() is the directory
...
to be created is already there.
2006-12-09 09:08:29 +00:00
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
046c4d13be
Patch #1544279 : Improve thread-safety of the socket module by moving
...
the sock_addr_t storage out of the socket object.
Will backport to 2.5.
2006-12-03 11:23:45 +00:00
Martin v. Löwis
8609da9b17
Move IDLE news into NEWS.txt.
2006-12-03 09:54:46 +00:00
Thomas Heller
ef583a4992
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.
Will backport.
2006-11-28 20:21:54 +00:00
Martin v. Löwis
4d542ec13c
Disable _XOPEN_SOURCE on NetBSD 1.x.
...
Will backport to 2.5
2006-11-25 15:39:19 +00:00
Thomas Heller
25d208bd46
Fix bug #1598620 : A ctypes structure cannot contain itself.
2006-11-24 18:45:39 +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
Martin v. Löwis
2607e6c021
Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
...
and _CRT_NONSTDC_NO_DEPRECATE.
Will backport.
2006-11-21 18:20:25 +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
Neal Norwitz
45e230a8e1
Speed up function calls into the math module by using METH_O.
...
There should be no functional changes. However, the error msgs are
slightly different. Also verified that the module dict is not NULL on init.
2006-11-19 21:26:53 +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
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