Commit Graph

3513 Commits

Author SHA1 Message Date
Gregory P. Smith 41e3018336 If sys.stdin is not a tty, fall back to default_getpass after printing
a warning instead of failing with a termios.error.
2008-04-21 21:31:08 +00:00
Christian Heimes e74c8f2879 Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
2008-04-19 02:23:57 +00:00
Christian Heimes 6f34109384 I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
2008-04-18 23:13:07 +00:00
Skip Montanaro b131f0468f resolve issue 2014 2008-04-18 20:35:46 +00:00
Nick Coghlan 106fc48336 Issue 2439: add pkgutils.get_data() as a convenience wrapper for the PEP 302 get_data() API (contributed by Paul Moore) 2008-04-15 10:25:31 +00:00
Thomas Heller 046e6a43ff Issue #2616: Implement ctypes.pointer() and ctypes.POINTER() in C for
better performance.
2008-04-14 16:10:07 +00:00
Brett Cannon e974689038 Re-implement the 'warnings' module in C. This allows for usage of the
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.

Closes issue #1631171.
2008-04-12 23:44:07 +00:00
Georg Brandl a93eaa5772 Add Jeroen. 2008-04-12 19:00:20 +00:00
Christian Heimes 7a98d2730c Applied patch #2617 from Frank Wierzbicki wit some extras from me
-J and -X are now reserved for Jython and non-standard arguments (e.g. IronPython). I've added some extra comments to make sure the reservation don't get missed in the future.
2008-04-12 13:03:03 +00:00
Gregory P. Smith 671c5d9fb5 Add a note about the zlib.decompressobj().flush() fix. 2008-04-09 18:18:43 +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
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
Thomas Heller f790648c8c News entry for: Sync with files from the just released libffi 3.0.5 version. 2008-04-04 19:43:25 +00:00
Thomas Heller dc96a77c3a Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when gcc
is used as compiler.
2008-04-04 10:07:55 +00:00
Fred Drake 46c58c17f1 - Issue #2385: distutils.core.run_script() makes __file__ available, so the
controlled environment will more closely mirror the typical script
  environment.  This supports setup.py scripts that refer to data files.
2008-04-04 05:41:30 +00:00
Barry Warsaw ba43774d1c post release updates 2008-04-04 01:34:41 +00:00
Amaury Forgeot d'Arc d7a265129c #1733757: the interpreter would hang on shutdown, if the function set by sys.settrace
calls threading.currentThread.

The correction somewhat improves the code, but it was close.
Many thanks to the "with" construct, which turns python code into C calls.

I wonder if it is not better to sys.settrace(None) just after
running the __main__ module and before finalization.
2008-04-03 23:07:55 +00:00
Barry Warsaw 9649cdd5d4 Updating for 2.6a2 2008-04-03 04:10:02 +00:00
Vinay Sajip b7edfc4e17 Added updates with respect to recent changes to TimedRotatingFileHandler. 2008-04-02 21:10:23 +00:00
Georg Brandl 91e0cdaedc Backport #1442: report exception when startup file cannot be run. 2008-03-29 01:50:06 +00:00
Amaury Forgeot d'Arc 69b747b735 Fix a reference leak found by Georg, when compiling a class nested in another class.
Now "regrtest.py -R:: test_compile" is satisfied.

Will backport.
2008-03-28 20:30:50 +00:00
Georg Brandl fc8eef3c78 Patch #1810 by Thomas Lee, reviewed by myself:
allow compiling Python AST objects into code objects
in compile().
2008-03-28 12:11:56 +00:00
Gregory P. Smith b9803421d2 Accept patch issue2426 by Paul Kippes (kippesp).
Adds sqlite3.Connection.iterdump to allow dumping of databases.
2008-03-28 08:32:09 +00:00
Amaury Forgeot d'Arc da0c025a43 Issue2495: tokenize.untokenize did not insert space between two consecutive string literals:
"" "" => """", which is invalid code.

Will backport
2008-03-27 23:23:54 +00:00
Georg Brandl deaf2cafbd #2248: return result of QUIT from quit(). 2008-03-27 13:27:31 +00:00
Benjamin Peterson 8113586723 add commas for introductory clauses 2008-03-27 00:25:33 +00:00
Christian Heimes 3c60833e1e Patch #2477: Added from __future__ import unicode_literals
The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
2008-03-26 22:01:37 +00:00
Christian Heimes 8c78cc3b6c Updated Misc/NEWS 2008-03-26 12:53:58 +00:00
Georg Brandl 7ddd10dff9 Add Josiah. 2008-03-26 09:04:36 +00:00
Benjamin Peterson da868d6cf1 Opps! I merged the revisions, but forgot to add
the header to ACKS
2008-03-25 21:55:50 +00:00
Benjamin Peterson 6f7e71dc32 Merged the ACKS from py3k 2008-03-25 21:14:42 +00:00
Mark Dickinson 8e85ffa4b2 Issue #2482: Make sure that the coefficient of a Decimal
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
2008-03-25 18:47:59 +00:00
Georg Brandl cdde579fb9 Add Benjamin. 2008-03-25 17:36:43 +00:00
Mark Dickinson 3b24ccbe7e Issue #2478: Decimal(sqrt(0)) failed when the decimal context
was not explicitly supplied.
2008-03-25 14:33:23 +00:00
Georg Brandl 1e7c37514d #2359: add Py3k warning for array.read/array.write. 2008-03-25 08:37:23 +00:00
Georg Brandl 80055f6295 #2355: py3k warning for buffer(). 2008-03-25 07:56:27 +00:00
Martin v. Löwis aef18b1c67 Patch #2240: Implement signal.setitimer and signal.getitimer. 2008-03-24 13:31:16 +00:00
Martin v. Löwis cdbc977c03 Install 2to3 script. 2008-03-24 12:57:53 +00:00
Raymond Hettinger b72233ce63 Issue 2460: Make Ellipsis objects copyable. 2008-03-24 08:17:39 +00:00
Raymond Hettinger bbc50eafe5 Issue 1681432: Add triangular distribution the random module. 2008-03-23 13:32:32 +00:00
Amaury Forgeot d'Arc 9a0d3462fc #1477: ur'\U0010FFFF' raised in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, just like the unicode-escape codec.
2008-03-23 09:55:29 +00:00
Christian Heimes 0e9ab5f2f0 Applied patch #1657 epoll and kqueue wrappers for the select module
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue syscalls. Thanks to Thomas Herve and the Twisted people for their support and help.
TODO: Finish documentation documentation
2008-03-21 23:49:44 +00:00
Georg Brandl 65bb42dc1b #2348: add py3k warning for file.softspace. 2008-03-21 20:38:24 +00:00
Georg Brandl 07e5681fd3 #2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich. 2008-03-21 20:21:46 +00:00
Georg Brandl 5a44424c5e #2358: add py3k warning to sys.exc_clear(). 2008-03-21 20:11:46 +00:00
Georg Brandl 77354cf5ef Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
2008-03-21 20:01:51 +00:00
Georg Brandl 331243270d #2136: allow single quotes in realm spec. 2008-03-21 19:54:00 +00:00
Marc-André Lemburg a1867750f6 Add news items for platform module changes. 2008-03-20 18:08:00 +00:00