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