Commit Graph

38986 Commits

Author SHA1 Message Date
Thomas Heller d3ed492164 Performance improvements. 2008-04-11 14:20:26 +00:00
Thomas Heller 12c4e6478a Move backwards compatibility macro to the correct place;
PyIndex_Check() was introduced in Python 2.5.
2008-04-11 13:05:38 +00:00
Andrew M. Kuchling 17f8429bd2 Use issue directive 2008-04-10 21:29:01 +00:00
Andrew M. Kuchling 19baaadf51 Add punctuation 2008-04-10 21:28:51 +00:00
Andrew M. Kuchling 3351e4142c Remove forward-looking statement 2008-04-10 21:27:10 +00:00
Gregory P. Smith 2ea2968064 get rid of assert (size >= 0) now that an explicit if (size < 0) is in the code. 2008-04-10 19:50:36 +00:00
Neal Norwitz 36a59b4a08 Remove the test file before writing it in case there is no write permission.
This might help fix some of the failures on Windows box(es).  It doesn't hurt
either way and ensure the tests are a little more self contained (ie have
less assumptions).
2008-04-10 05:46:39 +00:00
Martin v. Löwis 60a819d681 Merged revisions 62080-62262 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r62092 | collin.winter | 2008-04-01 18:27:10 +0200 (Di, 01 Apr 2008) | 1 line

  Add get_prev_sibling() to complement pytree's get_next_sibling().
........
  r62226 | collin.winter | 2008-04-08 21:07:56 +0200 (Di, 08 Apr 2008) | 1 line

  Add min() and max() to the list of special contexts that don't require adding list() calls around dict methods.
........
  r62232 | collin.winter | 2008-04-09 00:12:38 +0200 (Mi, 09 Apr 2008) | 4 lines

  Fix for http://bugs.python.org/issue2596

  This extends fix_xrange to know about the (mostly) same special contexts as fix_dict (where a special context is something that is guaranteed to fully consume the iterable), adding list() calls where appropriate. It also special-cases "x in range(y)".
........
2008-04-10 02:48:01 +00:00
Gregory P. Smith c00eb73a30 Raise SystemError when size < 0 is passed into PyString_FromStringAndSize,
PyBytes_FromStringAndSize or PyUnicode_FromStringAndSize.  [issue2587]
2008-04-09 23:16:37 +00:00
Gregory P. Smith f108320055 better diagnostics 2008-04-09 23:11:56 +00:00
Andrew M. Kuchling c157c9c277 Try out the new issue role. Thanks, Georg! 2008-04-09 22:28:43 +00:00
Martin v. Löwis 023b9f952a Package wininst*.exe from distutils/command. 2008-04-09 18:56:20 +00:00
Gregory P. Smith 671c5d9fb5 Add a note about the zlib.decompressobj().flush() fix. 2008-04-09 18:18:43 +00:00
Georg Brandl c305192196 Add :issue: directive for easy linking to bugs.python.org. 2008-04-09 17:58:56 +00:00
Georg Brandl 99bb5f3fef #2585: initialize code attribute of HTTPError. 2008-04-09 17:57:38 +00:00
Jerry Seutter 8f80a6a5f9 Changed test so it no longer runs as a side effect of importing. 2008-04-09 05:07:58 +00:00
Andrew M. Kuchling f68b55327c Add items 2008-04-09 01:08:32 +00:00
Trent Nelson 6c4a7c6821 Fix typo with regards to self.PORT shadowing class variables with the same name. 2008-04-09 00:34:53 +00:00
Gregory P. Smith 79e42a0e08 Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive.
It tried to allocate negative or zero memory.  That fails.
2008-04-09 00:25:17 +00:00
Trent Nelson e41b0061dd - Issue #2550: The approach used by client/server code for obtaining ports
to listen on in network-oriented tests has been refined in an effort to
  facilitate running multiple instances of the entire regression test suite
  in parallel without issue.  test_support.bind_port() has been fixed such
  that it will always return a unique port -- which wasn't always the case
  with the previous implementation, especially if socket options had been
  set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT).  The
  new implementation of bind_port() will actually raise an exception if it
  is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or
  SO_REUSEPORT socket option set.  Furthermore, if available, bind_port()
  will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed.
  This currently only applies to Windows.  This option prevents any other
  sockets from binding to the host/port we've bound to, thus removing the
  possibility of the 'non-deterministic' behaviour, as Microsoft puts it,
  that occurs when a second SOCK_STREAM socket binds and accepts to a
  host/port that's already been bound by another socket.  The optional
  preferred port parameter to bind_port() has been removed.  Under no
  circumstances should tests be hard coding ports!

  test_support.find_unused_port() has also been introduced, which will pass
  a temporary socket object to bind_port() in order to obtain an unused port.
  The temporary socket object is then closed and deleted, and the port is
  returned.  This method should only be used for obtaining an unused port
  in order to pass to an external program (i.e. the -accept [port] argument
  to openssl's s_server mode) or as a parameter to a server-oriented class
  that doesn't give you direct access to the underlying socket used.

  Finally, test_support.HOST has been introduced, which should be used for
  the host argument of any relevant socket calls (i.e. bind and connect).

  The following tests were updated to following the new conventions:
    test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib,
    test_poplib, test_ftplib, test_telnetlib, test_socketserver,
    test_asynchat and test_socket_ssl.

  It is now possible for multiple instances of the regression test suite to
  run in parallel without issue.
2008-04-08 23:47:30 +00:00
Amaury Forgeot d'Arc 02f33b43dc Add a NEWS entry for previous checkin 2008-04-08 23:10:07 +00:00
Amaury Forgeot d'Arc 7adc776ea6 Issue 2408: remove the _types module
It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType),
when they can easily be obtained with python code.
These expressions even work with Jython.

I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 )
at least this change makes it simpler.
2008-04-08 22:07:05 +00:00
Amaury Forgeot d'Arc 24f3c5c646 Prevent an error when inspect.isabstract() is called with something else than a new-style class. 2008-04-08 21:51:57 +00:00
Amaury Forgeot d'Arc 4b798bdf8a Issue2564: Prevent a hang in "import test.autotest", which runs the entire test
suite as a side-effect of importing the module.

- in test_capi, a thread tried to import other modules
- re.compile() imported sre_parse again on every call.
2008-04-08 21:27:42 +00:00
Andrew M. Kuchling abf8e015c2 Add items 2008-04-08 21:22:53 +00:00
Martin v. Löwis 775e10d9e6 Suppress compilation of py3_ files upon installation. 2008-04-08 16:48:35 +00:00
Andrew M. Kuchling eba0004198 Typographical fix: 32bit -> 32-bit, 64bit -> 64-bit 2008-04-08 01:33:10 +00:00
Andrew M. Kuchling 5b1070a32b Typo fix 2008-04-07 23:57:21 +00:00
Andrew M. Kuchling 34be7cec31 Write PEP 3127 section; add items 2008-04-07 23:57:07 +00:00
Georg Brandl 4a1672368d #2525: update timezone info examples in the docs. 2008-04-07 18:51:59 +00:00
Martin v. Löwis 1e72feced3 Make the "private CRT" case work, by editing the
manifest in DLLs to refer to the root copy of the CRT.
2008-04-07 16:34:04 +00:00
Martin v. Löwis 46a8be7a35 Drop support for 7.1 CRT. 2008-04-07 14:55:53 +00:00
Martin v. Löwis e411f8955f Make private_crt feature object a global variable. 2008-04-07 14:54:16 +00:00
Martin v. Löwis 54d489a97f Delete ALLUSERS property merged from CRT merge module, so that per-user installations become possible again. 2008-04-07 14:53:34 +00:00
Mark Summerfield 528576031d changed "2500 components" to "several thousand" since the number keeps
growning:-)
2008-04-07 07:39:23 +00:00
Gregory P. Smith c20adf8ef2 Use the new PyFile_IncUseCount & PyFile_DecUseCount calls appropriatly
within the standard library.  These modules use PyFile_AsFile and later
release the GIL while operating on the previously returned FILE*.
2008-04-07 06:33:21 +00:00
Martin v. Löwis d918e4e068 Bug #2388: Fix gcc warnings when compiling with --enable-unicode=ucs4. 2008-04-07 03:08:28 +00:00
Mark Hammond 295814e463 correct heading underline for new "Cross-compiling on Windows" section 2008-04-07 01:59:40 +00:00
Mark Hammond 495cf99aaf Issue #2513: enable 64bit cross compilation on windows. 2008-04-07 01:53:39 +00:00
Gregory P. Smith aa63d0d4af Make file objects as thread safe as the underlying libc FILE* implementation.
close() will now raise an IOError if any operations on the file object
are currently in progress in other threads.

Most code was written by Antoine Pitrou (pitrou).  Additional testing,
documentation and test suite cleanup done by me (gregory.p.smith).

Fixes issue 815646 and 595601 (as well as many other bugs and
references to this problem dating back to the dawn of Python).
2008-04-06 23:11:17 +00:00
Jeffrey Yasskin ee76777846 Add enough debugging information to diagnose failures where the
HandlerBException is ignored, and fix one such problem, where it was thrown
during the __del__ method of the previous Popen object.

We may want to find a better way of printing verbose information so it's not
spammy when the test passes.
2008-04-06 23:04:28 +00:00
Trent Nelson 5a4d66824a Don't run kill_python as part of the build process. Change the buildbots so they have to call it explicitly instead. 2008-04-06 20:51:23 +00:00
Skip Montanaro 28112d0cb6 type 2008-04-06 17:05:57 +00:00
Mark Hammond 8a3c8716e8 From issue 1753245 - better _winreg support for x64.
Adds _winreg.DisableReflectionKey, EnableReflectionKey, QueryReflectionKey,
KEY_WOW64_64KEY and KEY_WOW64_32KEY.
2008-04-06 01:42:06 +00:00
Thomas Wouters 2fab8f1abb Fix test_distutils to not fail when running 'make test' from a Python build
directory that is not the source directory (ie, one created using
'/path/to/source/configure'.) Leaves this test very slightly degraded in
that particular case, compared to the build-in-sourcedir case, but that case
isn't a particularly strong test either: neither test the actual path that
will be used after installing. There isn't a particularly good way to test
this, and a poor test beats a failing test.
2008-04-05 23:39:15 +00:00
Skip Montanaro 9e0fa7a13e Declare inittimezone static. 2008-04-05 19:47:47 +00:00
Andrew M. Kuchling 2185241a63 Write PEP 3119 section 2008-04-05 18:15:30 +00:00
Georg Brandl 3b1202dfe8 Mention that the tuple returned by __reduce__ is pickled as normal. 2008-04-05 17:45:58 +00:00
Andrew M. Kuchling 217057f098 Markup fixes; write PEP 3118 section 2008-04-05 15:57:46 +00:00
Martin v. Löwis db508be07e Add script to merge msvcr90. 2008-04-05 15:50:58 +00:00