Commit Graph

3183 Commits

Author SHA1 Message Date
Martin v. Löwis 73c01d4101 Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-02-14 11:26:18 +00:00
Martin v. Löwis e9c996c14d Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
2008-02-12 18:48:23 +00:00
Martin v. Löwis cab74c8398 Backport of r60743:
Patch #1736: Fix file name handling of _msi.FCICreate.
2008-02-12 13:48:06 +00:00
Lars Gustäbel 08303dbd72 Backport the nts() function from the trunk. This fixes problems with
the xstar format that puts extra fields inside the space that POSIX
has reserved for the prefix field.
2008-02-11 18:36:07 +00:00
Nick Coghlan 5ca1cba252 Backport relevant part of issue 2021 fix (r60695): Support with statement properly in tempfile.NamedTemporaryFile 2008-02-11 12:53:42 +00:00
Amaury Forgeot d'Arc 3e5f8a6975 issue 2045: Infinite recursion when printing a subclass of defaultdict,
if default_factory is set to a bound method.

Backport of r60663.
2008-02-08 01:05:21 +00:00
Thomas Heller 527bf3a826 Fix the way methods are created for the _ctypes.COMError exception
type; this fix is already in the trunk.
2008-02-06 19:58:46 +00:00
Lars Gustäbel 42993fef1c Issue #1507247, #2004: Use mode 0700 for temporary directories and
default permissions for missing directories.

(backport from r53526, r60588)
2008-02-05 12:00:20 +00:00
Amaury Forgeot d'Arc 316f8a8d3c backport of r60575 (issue #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 22:34:57 +00:00
Guido van Rossum d66e94d0e6 Backport r59862 (issue #712900): make long regexp matches interruptable
by signals.
2008-02-04 22:00:35 +00:00
Brett Cannon 912ba54394 Backport r60537: have order of CPPFLAGS and LDFLAGS be honored. 2008-02-03 09:58:02 +00:00
Gregory P. Smith 946de92f9b backport r60544 from trunk:
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:26:23 +00:00
Christian Heimes ab8fe4e01f Bug #1234: Fixed semaphore errors on AIX 5.2 2008-01-30 22:54:27 +00:00
Thomas Heller c9b20734f4 Revert rev. 59926, it breaks comtypes (I need to further examine this). 2008-01-28 08:42:22 +00:00
Georg Brandl ee50e3c734 #1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
 (backport from rev. 60322)
2008-01-26 14:03:51 +00:00
Amaury Forgeot d'Arc f1a7178cd5 #1920: when considering a block starting by "while 0", the compiler optimized the
whole construct away, even when an 'else' clause is present::

    while 0:
        print("no")
    else:
        print("yes")

did not generate any code at all.

Now the compiler emits the 'else' block, like it already does for 'if' statements.

Backport of r60265.
2008-01-24 23:42:08 +00:00
Guido van Rossum d933e0a7d3 News for some crashers I fixed recently.
Also removed three non-ASCII chars at start of file.
2008-01-24 18:28:37 +00:00
Thomas Heller fe528ebf68 Invert the checks in get_[u]long and get_[u]longlong. The intent was
to not accept float types; the result was that integer-like objects
were not accepted.
2008-01-24 13:08:54 +00:00
Christian Heimes d2f4cb8cca 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:41 +00:00
Gregory P. Smith 8f034d9af2 Backport of r60190:
- 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:29:11 +00:00
Mark Dickinson 2bebadfe51 Issue 1678380: fix a bug identifying -0.0 and 0.0 2008-01-21 21:54:47 +00:00
Georg Brandl 78d50ccdf9 Add NEWS entry for #1882.
(backport from rev. 60170)
2008-01-21 18:36:54 +00:00
Gregory P. Smith 1cc98af8a1 backport r60116 - fix zipfile to work with archives having file
headers beyond the signed 2**31 byte boundary.
2008-01-19 23:16:01 +00:00
Gregory P. Smith c223c6cb41 backport r60104 + r60111 from trunk.
- Issue #1336: fix a race condition in subprocess.Popen if the garbage
  collector kicked in at the wrong time that would cause the process
  to hang when the child wrote to stderr.
2008-01-19 22:29:41 +00:00
Georg Brandl 7829d603a8 Backport r59688. 2008-01-19 20:34:19 +00:00
Gregory P. Smith 0f99b71bd0 ** backport r60015 from trunk.
- Issue829951: In the smtplib module, SMTP.starttls() now complies with
  RFC 3207 and forgets any knowledge obtained from the server not obtained
  from the TLS negotiation itself.  Patch contributed by Bill Fenner.
2008-01-17 07:54:47 +00:00
Thomas Heller f43a86b9d7 Backport from trunk:
Fix a potential 'SystemError: NULL result without error'.
  NULL may be a valid return value from PyLong_AsVoidPtr.
Also move an older ctypes NEWS item in the correct category.
2008-01-16 19:24:20 +00:00
Raymond Hettinger 665ddc9bb3 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 23:02:51 +00:00
Thomas Heller b9c741c43c Added NEWS entry, plus:
Merged revisions 59925 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes

........
  r59925 | thomas.heller | 2008-01-11 20:34:06 +0100 (Fr, 11 Jan 2008) | 5 lines

  Raise an error instead of crashing with a segfault when a NULL
  function pointer is called.

  Will backport to release25-maint.
........
2008-01-11 19:48:46 +00:00
Mark Dickinson 4a3c7c78fb Add Decimal backport to Misc/NEWS 2008-01-09 01:02:07 +00:00
Andrew M. Kuchling 7a062c6dca 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:58:52 +00:00
Guido van Rossum 6e3e6e0d77 Forgot to backport the rest of #1637. 2008-01-06 02:40:07 +00:00
Lars Gustäbel e5f9e588c6 Issue #1735: TarFile.extractall() now correctly sets directory
permissions and times.

(backport from r59712)
2008-01-04 14:44:23 +00:00
Christian Heimes 12f03ccece Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint. 2008-01-04 13:22:36 +00:00
Guido van Rossum 3b4a5bd9da Fix bug #1301 -- a bad assert in _tkinter. 2008-01-03 23:52:04 +00:00
Guido van Rossum 6df9a82bd3 Issue #1700, reported by Nguyen Quan Son, fix by Fredruk Lundh:
Regular Expression inline flags not handled correctly for some unicode
characters.
2008-01-03 19:08:15 +00:00
Guido van Rossum 309e241881 Add some news items I missed. Careful inspection of the svn log output
reveals that a lot more are missing.  If you checked anything into the
2.5.2 branch without updating Misc/NEWS, please correct your mistake!
2008-01-03 18:57:40 +00:00
Martin v. Löwis ff36b2ce00 Bug #1699: Define _BSD_SOURCE only on OpenBSD. 2007-12-29 18:48:57 +00:00
Brett Cannon 35b84b4123 Backport of fix for issue 1695. 2007-12-24 20:00:42 +00:00
Christian Heimes c2b0d17b31 Fixed merge glitch, second try 2007-12-18 22:03:10 +00:00
Christian Heimes 3880210545 Fixed merge glitch 2007-12-18 22:00:19 +00:00
Christian Heimes 60d96cd54c Backport of #1638: %zd configure test fails on Linux 2007-12-18 21:14:54 +00:00
Thomas Heller 8e9e4d8f95 Issue #1642: Fix segfault in ctypes when trying to delete attributes. 2007-12-18 19:00:59 +00:00
Guido van Rossum d4029c8fda Bug #1608: use -fwrapv when GCC supports it. This is important, newer
GCC versions may optimize away overflow buffer overflow checks without
this option!  Thanks to Ismail Donmez.  No thanks to the GCC devs.
2007-12-13 20:42:33 +00:00
Guido van Rossum 47485a49f0 Backport patch #1643738. 2007-12-10 23:03:55 +00:00
Christian Heimes 03acd85dbf merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ can make list() raise a SystemError 2007-12-05 12:51:23 +00:00
Martin v. Löwis c8dbc92395 os.access now returns True on Windows for any existing directory. 2007-12-03 22:39:10 +00:00
Lars Gustäbel 7cc9c8bbe1 Issue #1531: Read fileobj from the current offset, do not seek to
the start.

(backport from r59260)
2007-12-01 21:06:06 +00:00
Amaury Forgeot d'Arc 8334a4fc31 Backport of r59241: str.decode fails on very long strings on 64bit platforms.
PyArgs_ParseTuple t# and w# formats truncated the lengths to 32bit.
2007-11-30 21:53:17 +00:00
Skip Montanaro 664ad76a34 back in these go - thanks to Titus Brown for the fix 2007-11-24 14:31:16 +00:00
Amaury Forgeot d'Arc 30f61cbb13 Issue #1445: Fix a SystemError when accessing the ``cell_contents``
attribute of an empty cell object.  Now a ValueError is raised.

Backport of r59170.
2007-11-24 13:53:29 +00:00
Skip Montanaro 9163783881 revert 2007-11-24 04:31:07 +00:00
Skip Montanaro 5a001c0c2c issue 1429818 2007-11-23 17:13:21 +00:00
Martin v. Löwis 3903f50f2e Allow simultaneous installation of 32-bit and 64-bit versions
on 64-bit Windows systems.
2007-11-22 06:47:17 +00:00
Brett Cannon d3a81df178 Backport of r59082 (doctest and using __loader__.get_data()). 2007-11-21 00:58:54 +00:00
Christian Heimes 946a51c187 Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress 2007-11-21 00:44:57 +00:00
Amaury Forgeot d'Arc c572dc3752 Backport 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.

And the problem can be reproduced in 2.5 with pure python code.
2007-11-13 22:43:05 +00:00
Guido van Rossum f5ccd459d7 News about list_repeat() fix. 2007-11-13 05:23:21 +00:00
Nick Coghlan e53fcfd7d3 Fix issue #1705170 (backport from trunk) 2007-11-07 12:26:40 +00:00
Gregory P. Smith a1e5387ec5 Backport r58868:
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:32:04 +00:00
Gregory P. Smith 2c3e0d94b2 Backport r58757, r58758, r58759.
Undoes incorrect dbtables fix and errant strdup introduced as
described below:

r58757 | gregory.p.smith | 2007-11-01 14:08:14 -0700 (Thu, 01 Nov 2007) | 4 lines

Fix bug introduced in revision 58385.  Database keys could no longer
have NULL bytes in them.  Replace the errant strdup with a
malloc+memcpy.  Adds a unit test for the correct behavior.

r58758 | gregory.p.smith | 2007-11-01 14:15:36 -0700 (Thu, 01 Nov 2007) | 3 lines

Undo revision 58533 58534 fixes.  Those were a workaround for
a problem introduced by 58385.

r58759 | gregory.p.smith | 2007-11-01 14:17:47 -0700 (Thu, 01 Nov 2007) | 2 lines

false "fix" undone as correct problem was found and fixed.
2007-11-01 21:22:40 +00:00
Matthias Klose e467dbc3d0 - Build using system ffi library on arm*-linux*. 2007-10-24 20:34:07 +00:00
Neal Norwitz 1046af6f59 Backport 58594:
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
2007-10-23 05:35:11 +00:00
Gregory P. Smith 0dcc3cc949 Backport 58532, 58533, 58534:
- Fix bsddb.dbtables: Don't randomly corrupt newly inserted rows by
   picking a rowid string with null bytes in it.  Such rows could not
   later be deleted, modified or individually selected.  Existing
   bsdTableDb databases created with such rows are out of luck.
 - Use mkdtemp for the test_dbtables test database environment and
   clean it up afterwards using shutil.rmtree.
2007-10-18 17:15:20 +00:00
Gregory P. Smith 137bdfa27a Merge trunk 58434:
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic.  Also adds a test case for RECNO dbs
to test_dbshelve.
2007-10-12 18:49:36 +00:00
Martin v. Löwis d79fa9e504 Bug #1216: Restore support for Visual Studio 2002. 2007-10-12 08:58:48 +00:00
Thomas Heller d6f638188f Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
2007-10-12 06:53:32 +00:00
Thomas Heller 5cf6ef84b9 ctypes.util.find_library uses dump(1) instead of objdump(1) on Solaris.
Fixes issue #1777530; backported from trunk.
2007-09-14 20:05:26 +00:00
Georg Brandl fed6bb7d70 Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
 (backport from rev. 58122)
2007-09-12 19:00:10 +00:00
Brett Cannon 13bfa3a97b Cause passing a string to generator.throw() to raise a deprecation warning. 2007-09-11 21:12:14 +00:00
Martin v. Löwis a326ab2c9f Patch #786737: Allow building in a tree of symlinks pointing to
a readonly source.
2007-09-05 11:47:22 +00:00
Matthias Klose 5cb86a2461 - Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
to include some information about the build environment.
2007-09-05 06:45:57 +00:00
Matthias Klose b084402596 - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*. 2007-09-04 23:47:16 +00:00
Martin v. Löwis fc787d515d Patch #1031213: Decode source line in SyntaxErrors back to its original
source encoding.
2007-09-04 14:20:25 +00:00
Matthias Klose cf754ba39f - Added support for linking the bsddb module against BerkeleyDB 4.6.x. 2007-09-03 22:13:48 +00:00
Martin v. Löwis fe2cb5912e Bug #1737210: Change Manufacturer of Windows installer to PSF. 2007-09-01 06:36:38 +00:00
Martin v. Löwis 39f1f45262 Bug #1709599: Run test_1565150 only if the file system is NTFS. 2007-08-30 18:58:29 +00:00
Martin v. Löwis aa1e005d26 Bug #1746880: Correctly install DLLs into system32 folder on Win64. 2007-08-30 18:37:41 +00:00
Skip Montanaro d4c096900b . 2007-08-29 01:34:15 +00:00
Lars Gustäbel a9bad98e3d TarFile.__init__() no longer fails if no name argument is passed and
the fileobj argument has no usable name attribute (e.g. StringIO).

(backported from r57616)
2007-08-28 12:33:15 +00:00
Georg Brandl eb4b738963 Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
 (backport from rev. 56830)
2007-08-08 13:03:45 +00:00
Hye-Shik Chang 36fe3c0a84 Backport from trunk r56727:
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:15:04 +00:00
Matthias Klose 979f5cd3e0 - Allow Emacs 22 for building the documentation in info format. 2007-08-02 21:28:57 +00:00
Martin v. Löwis 858c80968a Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+. 2007-07-31 19:54:20 +00:00
Martin v. Löwis bd28ca65d6 Bug #1704793: Raise KeyError if unicodedata.lookup cannot
represent the result in a single character.
2007-07-28 07:01:43 +00:00
Martin v. Löwis 088277f290 Change location of the package index to pypi.python.org/pypi. 2007-07-25 16:24:08 +00:00
Andrew M. Kuchling 6ecd4a0535 [Backport of r56382]
Avoid exception if there's a stray directory inside a Maildir folder.

The Maildir specification doesn't seem to say anything about this
situation, and it can happen if you're keeping a Maildir mailbox in
Subversion (.svn directories) or some similar system.  The patch just
ignores directories in the cur/, new/, tmp/ folders.
2007-07-14 22:06:30 +00:00
Thomas Heller 8b6a17bdeb News entry for
Fix for SF# 1649098: avoid zero-sized array declaration in structure.
2007-07-13 17:36:01 +00:00
Thomas Heller 6f4155d1de 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:07:55 +00:00
Georg Brandl 78d59d65c7 Bug #1637365: add subsection about "__name__ == __main__" to the
Python tutorial.
 (backport from rev. 56306)
2007-07-12 09:37:53 +00:00
Georg Brandl c5db923994 Patch #1673759: add a missing overflow check when formatting floats
with %G.
 (backport from rev. 56298)
2007-07-12 08:38:04 +00:00
Ronald Oussoren c0f800dc8b Patch 1673122: be explicit about which libtool to use, to avoid name clashes
when a users install GNU libtool early in his PATH
2007-07-09 08:40:34 +00:00
Neal Norwitz e99cb23e71 Backport 55887:
Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
2007-06-11 07:34:07 +00:00
Martin v. Löwis 2276885acd Patch #1733960: Allow T_LONGLONG to accept ints. 2007-06-09 08:01:33 +00:00
Neal Norwitz 66e64e2b6a 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 04:06:30 +00:00
Thomas Heller 11c58c4c8d Merged revisions 55129-55131 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r55129 | thomas.heller | 2007-05-04 21:54:22 +0200 (Fr, 04 Mai 2007) | 3 lines

  Do not truncate 64-bit pointers to 32-bit integers.

  Fixes SF #1703286, will backport to release25-maint.
........
  r55131 | thomas.heller | 2007-05-04 21:56:32 +0200 (Fr, 04 Mai 2007) | 1 line

  Oops, these tests do not run on Windows CE.
........
2007-06-08 19:39:31 +00:00
Martin v. Löwis 897704d1dd Bug #1733488: Fix compilation of bufferobject.c on AIX. 2007-06-08 17:29:40 +00:00
Hye-Shik Chang 60111e09a9 (Backport from r55770)
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 19:14:33 +00:00
Brett Cannon c9490e2fe9 Backport of r55752: make time.strptime() behave better when whitespace is in
the format arguments.
2007-06-04 00:14:06 +00:00
Neal Norwitz 2413e038c4 Backport 55731:
SF 1668596/1720897: distutils now copies data files
even if package_dir is empty.
2007-06-02 18:53:07 +00:00
Georg Brandl 2e23bb7545 Fix wrong issue number.
(backport from rev. 55735)
2007-06-01 19:20:52 +00:00
Georg Brandl ba871a06fb Bug #1722484: remove docstrings again when running with -OO.
(backport from rev. 55732)
2007-06-01 11:33:45 +00:00
Thomas Heller b40092bf98 Merged revisions 55677 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r55677 | thomas.heller | 2007-05-30 09:01:25 +0200 (Mi, 30 Mai 2007) | 2 lines

  Correct the name of a field in the WIN32_FIND_DATAA and WIN32_FIND_DATAW structures.
  Closes bug #1726026.
........
2007-05-30 07:07:34 +00:00
Neal Norwitz f86ae691d3 Backport rev 55450:
SF bug #1721309: Clear data so random memory does not get freed.
2007-05-19 03:53:33 +00:00
Neal Norwitz dc78cc6f7c 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:09:36 +00:00
Georg Brandl 4c87581c32 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.
 (backport from rev. 55348)
2007-05-15 20:19:39 +00:00
Neal Norwitz 80a42c079f Update with the version that has been running for a while. Most of
the changes are to support multiple versions (ie, trunk and 2.5).
Also check for conflicts in the .tex file when a release is cut.
2007-04-29 23:56:19 +00:00
Brett Cannon daa2e58104 Backport fix for r54646-7: properly clear locale cache in time.strptime when
the locale changes between calls.
2007-04-27 23:17:43 +00:00
Brett Cannon a801b6a1fd Backport r54712: document that calling file.next() on a file open for writing
leads to undefined behaviour.
2007-04-27 22:35:57 +00:00
Georg Brandl d1e3f6df38 Patch #1698768: updated the "using Python on the Mac" intro.
(backport from rev. 54949)
2007-04-25 06:25:07 +00:00
Georg Brandl f784d91215 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.
 (backport from rev. 54941)
2007-04-24 15:27:25 +00:00
Barry Warsaw 2f131d81e2 Recommit r54805:
Add code to read from master_fd in the parent, breaking when we get an OSError
(EIO can occur on Linux) or there's no more data to read.  Without this,
test_pty.py can hang on the waitpid() because the child is blocking on the
stdout write.  This will definitely happen on Mac OS X and could potentially
happen on other platforms.  See the comment for details.
2007-04-23 01:58:33 +00:00
Walter Dörwald 93a3603c67 Backport r54786:
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-21 10:31:43 +00:00
Lars Gustäbel 9319e43c67 Patch #1695229: Fix a regression with tarfile.open() and a missing name
argument.
2007-04-20 20:10:59 +00:00
Lars Gustäbel d220144a84 Fix directory names to have only one trailing slash.
A regression from rev. 52525.
2007-04-20 14:49:02 +00:00
Anthony Baxter ef57abdb60 2.5.1 final 2007-04-18 03:35:45 +00:00
Raymond Hettinger 87b5d9196e Revert 53667 2007-04-18 02:02:15 +00:00
Neal Norwitz e6e383f498 Revert SF #1615701 (rev 53655): dict.update() does *not* call __getitem__() or
keys() if subclassed.  This is to remain consistent with 2.5.

See discussion here:
  http://mail.python.org/pipermail/python-dev/2007-April/072565.html
2007-04-16 06:59:13 +00:00
Anthony Baxter 9515c96cb0 preparing for 2.5.1c1 2007-04-05 04:52:06 +00:00
Raymond Hettinger 3608f0570e Bug #1563759: struct.unpack doens't support buffer protocol objects 2007-04-04 20:32:03 +00:00
Martin v. Löwis 8863544522 Bug #1686475: Support stat'ing open files on Windows again. 2007-04-04 18:30:56 +00:00
Matthias Klose 5d2d2ef1f5 - Fix an off-by-one bug in locale.strxfrm().
Patch taken from http://bugs.debian.org/416934.
2007-04-03 04:39:34 +00:00
Raymond Hettinger d6030acd7f Array module's buffer interface can now handle empty arrays. 2007-04-02 22:39:08 +00:00
Raymond Hettinger 4bbcb64d5d SF #1693079 Array module cannot pickle empty arrays 2007-04-02 17:03:46 +00:00
Neal Norwitz 93e9384402 Backport 54644:
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.
2007-04-01 18:29:47 +00:00
Georg Brandl 48642d4a0a 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.
  (backport from rev. 54634)
2007-03-31 18:58:21 +00:00
Neal Norwitz 65407fb734 Backport 54594:
Fix SF #1688393, sock.recvfrom(-24) crashes

Also fix some method names that were copied incorrectly (trunk fixed).
2007-03-31 18:56:11 +00:00
Žiga Seilnacht 6524573995 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.
 (backport from rev. 54559)
2007-03-24 14:27:21 +00:00
Martin v. Löwis a8ddae6149 Bug #978833: Revert r50844, as it broke _socketobject.dup. 2007-03-23 13:27:29 +00:00
Martin v. Löwis fe048e8ee7 Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}. 2007-03-23 10:35:57 +00:00
Thomas Heller 02b8feea9f 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:43:37 +00:00
Žiga Seilnacht e5df857cc3 Bug #1675967: re patterns pickled with older Python versions can
now be unpickled.
 (backport form rev. 54492)
2007-03-21 20:37:39 +00:00
Andrew M. Kuchling e1b4a7e1f9 Add NEWS entry for old item 2007-03-21 16:52:51 +00:00
Georg Brandl 9225f226a3 Bug #1684254: webbrowser now uses shlex to split any command lines
given to get(). It also detects when you use '&' as the last argument
and creates a BackgroundBrowser then.
 (backport -- this is a regression from 2.4 and therefore backported)
2007-03-21 11:52:38 +00:00
Georg Brandl 8a10ea4613 Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
 (backport from rev. 54480)
2007-03-21 09:00:55 +00:00
Gregory P. Smith 8e92dd0c9c move note to the correct section 2007-03-17 22:32:49 +00:00
Collin Winter 7d9ac78384 Patch #1642547: Fix an error/crash when encountering syntax errors in complex if statements.
Backported from r54404.
2007-03-16 04:12:48 +00:00
Žiga Seilnacht c1b4e8e6e2 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.
 (backport from rev. 54397)
2007-03-15 11:47:59 +00:00
Georg Brandl 385cd40a67 Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
 (backport from rev. 54394)
2007-03-15 07:42:22 +00:00
Martin v. Löwis 7520df439a Patch #1559413: Fix test_cmd_line if sys.executable contains a space. 2007-03-14 20:02:38 +00:00
Barry Warsaw 1a5fe58cd4 Document fixed bugs 2007-03-14 18:19:07 +00:00
Žiga Seilnacht 94c887258c 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.
 (backport from rev. 54378)
2007-03-14 12:34:30 +00:00
Georg Brandl 027ac24650 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.
 (backport from rev. 54376)
2007-03-14 08:27:57 +00:00
Georg Brandl d6e73c1785 Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
 (backport from rev. 54336)
2007-03-13 12:34:35 +00:00
Martin v. Löwis 1300831c48 Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
2007-03-13 10:24:14 +00:00
Georg Brandl 74fb211445 Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
 (backport from rev. 54331)
2007-03-13 10:19:35 +00:00
Georg Brandl 6cdcdbcdaa Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
 (backport from rev. 54329)
2007-03-13 10:07:01 +00:00
Georg Brandl 0a24d10524 Patch #1679379: add documentation for fnmatch.translate().
(backport from rev. 54323)
2007-03-13 07:51:04 +00:00
Collin Winter e19d7a3c0a Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Backported from r54291.
2007-03-12 16:49:23 +00:00
Martin v. Löwis a8cfa2a8cd Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86. 2007-03-12 10:50:51 +00:00