Commit Graph

2201 Commits

Author SHA1 Message Date
Amaury Forgeot d'Arc 8432d86b9f Fix a reference leak found by Georg, when compiling a class nested in another class.
Test is run with "regrtest.py -R:: test_compile"

Backport of r62015
2008-03-28 20:45:42 +00:00
Amaury Forgeot d'Arc 198e353735 Issue2495: tokenize.untokenize did not insert space between two consecutive string literals:
"" "" becomes """", which is invalid code.

Backport of r61979.
2008-03-27 23:41:59 +00:00
Mark Dickinson bfdbfd4d91 Issue #2482: Make sure that the coefficient of a Decimal instance
is stored as a str instance rather than a unicode instance.
Backported from Python 2.6 (see r61904).
2008-03-25 18:58:13 +00:00
Mark Dickinson 26c25d9f64 Decimal.sqrt(0) failed when the context was not
explicitly supplied.
2008-03-25 14:35:25 +00:00
Amaury Forgeot d'Arc a79e05097b #1477: ur'\U0010FFFF' used to raise in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, like the unicode-escape codec does.

Backport of r61793 and r61853
2008-03-24 21:16:28 +00:00
Georg Brandl d9b9d680d5 Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
 (backport from r61712)
2008-03-21 20:01:55 +00:00
Sean Reifscheider 4af861cb4e Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args
and **kwargs expressions could give bogus error messages.
2008-03-20 17:39:31 +00:00
Gregory P. Smith eff5a4e901 The missing NEWS entry for r61542.. 2008-03-18 19:24:40 +00:00
Neal Norwitz b3635f99a2 Backport r61458:
Issue 2321: reduce memory usage (increase the memory that is returned
to the system) by using pymalloc for the data of unicode objects.
2008-03-18 04:17:36 +00:00
Georg Brandl ab61dce0e1 Bug #2220: handle rlcompleter attribute match failure more gracefully.
(backport from r61275)
2008-03-06 07:46:26 +00:00
Martin v. Löwis 0e30555748 Backport of r61263:
#1725737: ignore other VC directories other than CVS and SVN's too.
2008-03-06 07:14:26 +00:00
Martin v. Löwis bc89897e5f Patch #2232: os.tmpfile might fail on Windows if the user has no
permission to create files in the root directory.
2008-03-06 06:57:02 +00:00
Andrew M. Kuchling 664553a778 #1389051, #1092502: fix excessively large allocations when using read() on a socket 2008-02-23 19:30:59 +00:00
Andrew M. Kuchling 37d4f7bc0c #1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh. 2008-02-23 19:06:54 +00:00
Andrew M. Kuchling 05a19a507d #1433694: minidom's .normalize() failed to set .nextSibling for last element.
Fix by Malte Helmert
2008-02-23 17:21:44 +00:00
Andrew M. Kuchling be0adfcfa8 Update NEWS for a future 2.5.3 release 2008-02-23 17:18:19 +00:00
Andrew M. Kuchling b66dc46ee0 Add old NEWS item 2008-02-23 17:14:23 +00:00
Martin v. Löwis bcffd10596 Prepare for 2.5.2. 2008-02-21 10:04:55 +00:00
Martin v. Löwis 328c643bcb Bug #2137: Remove test_struct.test_crasher, which was meaningful
only on 32-bit systems.
2008-02-18 17:46:27 +00:00
Martin v. Löwis 42e4124304 Revert 60793 for test_array; on a 64-bit system,
MemoryError was not guaranteed.
2008-02-15 19:52:38 +00:00
Martin v. Löwis 9c04257bf9 Fix deallocation of array objects when allocation ran out of memory. 2008-02-15 19:11:46 +00:00
Martin v. Löwis a859e25acb Preparing for 2.5.2c1. 2008-02-14 12:33:15 +00:00
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