Commit Graph

1810 Commits

Author SHA1 Message Date
Ronald Oussoren 26cad08748 This fixes bug #1527397: PythonLauncher runs scripts with the wrong working
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
2006-08-01 21:00:57 +00:00
Georg Brandl 07fec3aa5a os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
2006-08-01 18:49:24 +00:00
Martin v. Löwis 0907f4dc5b Drop usage of test -e in configure as it is not portable.
Fixes #1439538
Will backport to 2.4
Also regenerate pyconfig.h.in.
2006-07-30 14:09:47 +00:00
Martin v. Löwis 77621585e4 Mention Cygwin in distutils error message about a missing VS 2003.
Fixes #1257728.
2006-07-30 13:27:31 +00:00
Martin v. Löwis 1f30c3777c Base __version__ on sys.version_info, as distutils is
no longer maintained separatedly.
2006-07-30 13:14:05 +00:00
Martin v. Löwis 4e67838d6c Don't copy directory stat times in shutil.copytree on Windows
Fixes #1525866.
2006-07-30 13:00:31 +00:00
Georg Brandl e34ac7ce7a Bug #1002398: The documentation for os.path.sameopenfile now correctly
refers to file descriptors, not file objects.
2006-07-30 11:07:23 +00:00
Neal Norwitz f71ec5a0ac Bug #1515471: string.replace() accepts character buffers again.
Pass the char* and size around rather than PyObject's.
2006-07-30 06:57:04 +00:00
Neal Norwitz 07aadb14f3 Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
2006-07-30 06:55:48 +00:00
Neal Norwitz 0d62a06206 Patch #1531113: Fix augmented assignment with yield expressions.
Also fix a SystemError when trying to assign to yield expressions.
2006-07-30 06:53:31 +00:00
Fred Drake fbdeaad069 expunge the xmlcore changes:
41667, 41668 - initial switch to xmlcore
  47044        - mention of xmlcore in What's New
  50687        - mention of xmlcore in the library reference

re-apply xmlcore changes to xml:
  41674        - line ending changes (re-applied manually), directory props
  41677        - add cElementTree wrapper
  41678        - PSF licensing for etree
  41812        - whitespace normalization
  42724        - fix svn:eol-style settings
  43681, 43682 - remove Python version-compatibility cruft from minidom
  46773        - fix encoding of \r\n\t in attr values in saxutils
  47269        - added XMLParser alias for cElementTree compatibility

additional tests were added in Lib/test/test_sax.py that failed with
the xmlcore changes; these relate to SF bugs #1511497, #1513611
2006-07-29 16:56:15 +00:00
Fred Drake 5391216050 update target version number 2006-07-29 13:22:49 +00:00
Georg Brandl edd9b0dfb3 Bug #1441397: The compiler module now recognizes module and function
docstrings correctly as it did in Python 2.4.
2006-07-29 09:33:26 +00:00
Thomas Heller 1393d6a4ca Patch #1529514: More openbsd platforms for ctypes.
Regenerated Modules/_ctypes/libffi/configure with autoconf 2.59.

Approved by Neal.
2006-07-28 21:43:20 +00:00
Phillip J. Eby 84b7d3a932 Fix svn merge spew. 2006-07-28 21:31:54 +00:00
Phillip J. Eby f7575d0cb7 Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
with PEP 302.  This was fixed by adding an ``imp.NullImporter`` type that is
used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
excessive filesystem operations during imports.
2006-07-28 21:12:07 +00:00
Georg Brandl 4793aa39a9 Patch #1529686: also run test_email_codecs with regrtest.py. 2006-07-28 18:31:39 +00:00
Matt Fleming ec9265094a Allow socketmodule to compile on NetBSD -current, whose bluetooth API
differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
2006-07-28 11:27:27 +00:00
Gregory P. Smith 641cddf0fa - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
methods now allow their database parameter to be None as the
  sleepycat API allows.

Also adds an appropriate test case for DBEnv.dbrename and dbremove.
2006-07-28 01:35:25 +00:00
Tim Peters 9cab593c0e News about the repaired memory leak in defaultdict. 2006-07-28 00:30:00 +00:00
Tim Peters 6f6814706e Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run.  ``DocTestFinder``
has been changed to sort the list of tests it returns.
2006-07-27 23:44:37 +00:00
Barry Warsaw 00decd7835 Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py.  Specifically, this allows for querying the type of
an object against these built-in C types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.

This patch includes a new built-in module called _types which provides
definitions of getset and member descriptors for use by the types.py module.
These types are exposed as types.GetSetDescriptorType and
types.MemberDescriptorType.  Query functions are provided as
inspect.isgetsetdescriptor() and inspect.ismemberdescriptor().  The
implementations of these are robust enough to work with Python implementations
other than CPython, which may not have these fundamental types.

The patch also includes documentation and test suite updates.

I commit these changes now under these guiding principles:

1. Silence is assent.  The release manager has not said "no", and of the few
   people that cared enough to respond to the thread, the worst vote was "0".

2. It's easier to ask for forgiveness than permission.

3. It's so dang easy to revert stuff in svn, that you could view this as a
   forcing function. :)

Windows build patches will follow.
2006-07-27 23:43:15 +00:00
Georg Brandl 6cea7d74ad Amend news entry. 2006-07-27 15:38:33 +00:00
Tim Peters 3e246a811d News for patch #1529686. 2006-07-27 15:09:20 +00:00
Martin v. Löwis 997ceffe07 Bump distutils version to 2.5, as several new features
have been introduced since 2.4.
2006-07-27 06:38:16 +00:00
Tim Peters bc24eee333 Bug #1521947: possible bug in mystrtol.c with recent gcc.
In general, C doesn't define anything about what happens when
an operation on a signed integral type overflows, and PyOS_strtol()
did several formally undefined things of that nature on signed
longs.  Some version of gcc apparently tries to exploit that now,
and PyOS_strtol() could fail to detect overflow then.

Tried to repair all that, although it seems at least as likely to me
that we'll get screwed by bad platform definitions for LONG_MIN
and/or LONG_MAX now.  For that reason, I don't recommend backporting
this.

Note that I have no box on which this makes a lick of difference --
can't really test it, except to note that it didn't break anything
on my boxes.

Silent change:  PyOS_strtol() used to return the hard-coded 0x7fffffff
in case of overflow.  Now it returns LONG_MAX.  They're the same only on
32-bit boxes (although C doesn't guarantee that either ...).
2006-07-27 01:14:53 +00:00
Andrew M. Kuchling 10c2b55057 Put news item in right section 2006-07-26 17:22:21 +00:00
Andrew M. Kuchling 93c928ebca Minor grammar fix 2006-07-26 17:19:39 +00:00
Andrew M. Kuchling 55b0a0eb0d [Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment. 2006-07-26 17:16:52 +00:00
Martin v. Löwis 9298eff5f9 Bug #978833: Really close underlying socket in _socketobject.close.
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
2006-07-26 12:12:56 +00:00
Georg Brandl 0619a329e8 Bug #1459963: properly capitalize HTTP header names. 2006-07-26 07:40:17 +00:00
Georg Brandl cf0c1729dc NEWS entry for #1525766. 2006-07-26 07:23:32 +00:00
Ronald Oussoren 3075e16c51 Fix bug #1517990: IDLE keybindings on OSX
This adds a new key definition for OSX, which is slightly different from the
classic mac definition.

Also add NEWS item for a couple of bugfixes I added recently.
2006-07-25 20:28:55 +00:00
Brett Cannon f23ad3d65e Add comment for changes to test_ossaudiodev. 2006-07-25 17:32:20 +00:00
Martin v. Löwis 2b2d2974e7 Revert incomplete checkin. 2006-07-25 10:11:14 +00:00
Martin v. Löwis e093a3ada9 Bug #978833: Really close underlying socket in _socketobject.close.
Will backport to 2.4.
2006-07-25 10:05:47 +00:00
Martin v. Löwis 0b48303f28 Bug #1525817: Don't truncate short lines in IDLE's tool tips. 2006-07-25 09:53:12 +00:00
Georg Brandl c13c34c39d Patch #1515343: Fix printing of deprecated string exceptions with a
value in the traceback module.
2006-07-24 14:09:56 +00:00
Martin v. Löwis 982e9fea0a Bug #1524310: Properly report errors from FindNextFile in os.listdir.
Will backport to 2.4.
2006-07-24 12:54:17 +00:00
Martin v. Löwis d22968af17 Patch #1232023: Don't include empty path component from registry,
so that the current directory does not get added to sys.path.
Also fixes #1526785.
2006-07-24 11:54:53 +00:00
Martin v. Löwis bda0dde1c4 Patch #1448199: Release GIL around ConnectRegistry. 2006-07-24 10:26:33 +00:00
Greg Ward 48fae7acd2 Resync optparse with Optik 1.5.3: minor tweaks for/to tests. 2006-07-23 16:05:51 +00:00
Barry Warsaw b110bad2d9 More RFC 2231 improvements for the email 4.0 package. As Mark Sapiro rightly
points out there are really two types of continued headers defined in this
RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded
parameters with the form "name*0="), but we were were handling them both the
same way and that isn't correct.

This patch should be much more RFC compliant in that only encoded params are
%-decoded and the charset/language information is only extract if there are
any encoded params in the segments.  If there are no encoded params then the
RFC says that there will be no charset/language parts.

Note however that this will change the return value for Message.get_param() in
some cases.  For example, whereas before if you had all unencoded param
continuations you would have still gotten a 3-tuple back from this method
(with charset and language == None), you will now get just a string.  I don't
believe this is a backward incompatible change though because the
documentation for this method already indicates that either return value is
possible and that you must do an isinstance(val, tuple) check to discriminate
between the two.  (Yeah that API kind of sucks but we can't change /that/
without breaking code.)

Test cases, some documentation updates, and a NEWS item accompany this patch.
2006-07-21 14:51:07 +00:00
Neal Norwitz e1fdb32ff2 Handle allocation failures gracefully. Found with failmalloc.
Many (all?) of these could be backported.
2006-07-21 05:32:28 +00:00
Tim Peters 112aad3630 SF bug 1524317: configure --without-threads fails to build
Moved the code for _PyThread_CurrentFrames() up, so it's no longer
in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in
one).

Changed test_sys's test_current_frames() so it passes with or without
thread supported compiled in.

Note that test_sys fails when Python is compiled without threads,
but for an unrelated reason (the old test_exit() fails with an
indirect ImportError on the `thread` module).  There are also
other unrelated compilation failures without threads, in extension
modules (like ctypes); at least the core compiles again.

Do we really support --without-threads?  If so, there are several
problems remaining.
2006-07-19 00:03:19 +00:00
Martin v. Löwis 426f4a1c65 Patch #1524429: Use repr instead of backticks again. 2006-07-18 17:46:31 +00:00
Brett Cannon caebe22038 Fix bug #1520914. Starting in 2.4, time.strftime() began to check the bounds
of values in the time tuple passed in.  Unfortunately people came to rely on
undocumented behaviour of setting unneeded values to 0, regardless of if it was
within the valid range.  Now those values force the value internally to the
minimum value when 0 is passed in.
2006-07-18 04:41:36 +00:00
Georg Brandl c5e3d8a8d6 Add missing NEWS item (#1522771) 2006-07-17 13:26:33 +00:00
Neal Norwitz e756310848 Add NEWS entry for a bunch of fixes due to warnings produced by Klocworks static analysis tool. 2006-07-17 01:00:16 +00:00
Neal Norwitz 84be93b2db Bug #1512814, Fix incorrect lineno's when code within a function
had more than 255 blank lines.  Byte codes need to go first, line #s second.
2006-07-16 01:50:38 +00:00