]> granicus.if.org Git - python/commitdiff
Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
authorChristian Heimes <christian@cheimes.de>
Mon, 24 Sep 2012 11:27:28 +0000 (13:27 +0200)
committerChristian Heimes <christian@cheimes.de>
Mon, 24 Sep 2012 11:27:28 +0000 (13:27 +0200)
method doesn't require an argument again.

1  2 
Misc/NEWS
Modules/pyexpat.c

diff --cc Misc/NEWS
index 9907a481ee6d37798bb8aac8bb2a373d94f1a432,3283117d6199dab07fcbbf8abc8a1140257a9f5e..a67f7c5f423c5dd040641457153b905681def4a5
+++ b/Misc/NEWS
@@@ -28,107 -24,101 +28,110 @@@ Core and Builtin
  - Issue #15801: Make sure mappings passed to '%' formatting are actually
    subscriptable.
  
 -- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
 -  Patch by Robin Schreiber.
 +Library
 +-------
  
 -- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
 -  errors correctly.  Patch by Serhiy Storchaka.
 +- Issue #15421: Fix an OverflowError in Calendar.itermonthdates() after
 +  datetime.MAXYEAR.  Patch by Cédric Krier.
  
 -- Issue #13119: sys.stdout and sys.stderr are now using "\r\n" newline on
 -  Windows, as Python 2.
 +- Issue #15970: xml.etree.ElementTree now serializes correctly the empty HTML
 +  elements 'meta' and 'param'.
  
 -- Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after
 -  error handling.  Patch by Serhiy Storchaka.
 +- Issue #15842: The SocketIO.{readable,writable,seekable} methods now
 +  raise ValueError when the file-like object is closed.  Patch by Alessandro
 +  Moura.
  
 -- Issue #15404: Refleak in PyMethodObject repr.
 +- Issue #15876: Fix a refleak in the curses module: window.encoding.
  
 -- Issue #15394: An issue in PyModule_Create that caused references to
 -  be leaked on some error paths has been fixed.  Patch by Julia Lawall.
 +- Issue #15881: Fixed atexit hook in multiprocessing.  Original patch
 +  by Chris McDonough.
  
 -- Issue #15368: An issue that caused bytecode generation to be
 -  non-deterministic when using randomized hashing (-R) has been fixed.
 +- Issue #15340: Fix importing the random module when /dev/urandom cannot
 +  be opened.  This was a regression caused by the hash randomization patch.
  
 -- Issue #15020: The program name used to search for Python's path is now
 -  "python3" under Unix, not "python".
 +- Issue #15841: The readable(), writable() and seekable() methods of BytesIO
 +  and StringIO objects now raise ValueError when the object has been closed.
 +  Patch by Alessandro Moura.
  
 -- Issue #15033: Fix the exit status bug when modules invoked using -m swith,
 -  return the proper failure return value (1). Patch contributed by Jeff Knupp.
 +- Issue #15447: Use subprocess.DEVNULL in webbrowser, instead of opening
 +  os.devnull explicitly and leaving it open.
  
 -- Issue #12268: File readline, readlines and read() or readall() methods
 -  no longer lose data when an underlying read system call is interrupted.
 -  IOError is no longer raised due to a read system call returning EINTR
 -  from within these methods.
 +- Issue #15509: webbrowser.UnixBrowser no longer passes empty arguments to
 +  Popen when %action substitutions produce empty strings.
  
 -- Issue #15142: Fix reference leak when deallocating instances of types
 -  created using PyType_FromSpec().
 +- Issue #12776,#11839: call argparse type function (specified by add_argument)
 +  only once. Before, the type function was called twice in the case where the
 +  default was specified and the argument was given as well.  This was
 +  especially problematic for the FileType type, as a default file would always
 +  be opened, even if a file argument was specified on the command line.
  
 -- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
 -  the work by Hirokazu Yamamoto.
 +- Issue #15906: Fix a regression in argparse caused by the preceding change,
 +  when action='append', type='str' and default=[].
  
 -- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
 -  collector repeatedly trying to untrack dicts.
 +Extension Modules
 +-----------------
  
 -- Issue #14494: Fix __future__.py and its documentation to note that
 -  absolute imports are the default behavior in 3.0 instead of 2.7.
 -  Patch by Sven Marnach.
++- Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
++  method doesn't require an argument again.
 -- Issue #14761: Fix potential leak on an error case in the import machinery.
 +Tests
 +-----
  
 -- Issue #14699: Fix calling the classmethod descriptor directly.
 +- Issue #15304: Fix warning message when os.chdir() fails inside
 +  test.support.temp_cwd().  Patch by Chris Jerdonek.
  
 -- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin
 -  is closed.
  
 -- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
 -  when repr() or str() is called on such an object.
 +- Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
 +  by Serhiy Storchaka.
  
 -- Issue #14658: Fix binding a special method to a builtin implementation of a
 -  special method with a different name.
 +- Issue #15557: Added a test suite for the webbrowser module, thanks
 +  to Anton Barkovsky.
  
 -- Issue #14630: Fix a memory access bug for instances of a subclass of int
 -  with value 0.
 +Build
 +-----
  
 -- Issue #14612: Fix jumping around with blocks by setting f_lineno.
 +- Issue #15819: Make sure we can build Python out-of-tree from a readonly
 +  source directory.  (Somewhat related to Issue #9860.)
  
 -- Issue #14607: Fix keyword-only arguments which started with ``__``.
 +Documentation
 +-------------
  
 -- Issue #13889: Check and (if necessary) set FPU control word before calling
 -  any of the dtoa.c string <-> float conversion functions, on MSVC builds of
 -  Python.  This fixes issues when embedding Python in a Delphi app.
 +- Issue #11964: Document a change in v3.2 to the behavior of the indent
 +  parameter of json encoding operations.
  
 -- Issue #14474: Save and restore exception state in thread.start_new_thread()
 -  while writing error message if the thread leaves a unhandled exception.
 +Tools/Demos
 +-----------
  
 -- Issue #13019: Fix potential reference leaks in bytearray.extend().  Patch
 -  by Suman Saha.
  
 -- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
 -  the module name that was not interned.
 +What's New in Python 3.3.0?
 +===========================
  
 -- Issue #14331: Use significantly less stack space when importing modules by
 -  allocating path buffers on the heap instead of the stack.
 +*Release date: XX-Sep-2012*
  
 -- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
 -  passed strings.
 +Core and Builtins
 +-----------------
  
 -- Issue #1469629: Allow cycles through an object's __dict__ slot to be
 -  collected. (For example if ``x.__dict__ is x``).
 +Library
 +-------
  
 -- Issue #14172: Fix reference leak when marshalling a buffer-like object
 -  (other than a bytes object).
  
 -- Issue #13521: dict.setdefault() now does only one lookup for the given key,
 -  making it "atomic" for many purposes.  Patch by Filip Gruszczyński.
 +What's New in Python 3.3.0 Release Candidate 3?
 +===============================================
  
 -- Issue #14471: Fix a possible buffer overrun in the winreg module.
 +*Release date: 23-Sep-2012*
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap().
 +
 +- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
 +
 +- Issue #15895: Fix FILE pointer leak in one error branch of
 +  PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file, closeit
 +  is false an and set_main_loader() fails.
 +
 +- Fixes for a few crash and memory leak regressions found by Coverity.
  
  Library
  -------
index bd2726877f43e559d666636c59b462ad5926fba7,4b9687a051ec81a81d225a1335541539b28db9ae..3f59f0fdc15c12cd6c98349a3538e9d77ca6600a
@@@ -1033,10 -1032,16 +1033,10 @@@ getting the advantage of providing docu
  static PyObject *
  xmlparse_UseForeignDTD(xmlparseobject *self, PyObject *args)
  {
 -    PyObject *flagobj = NULL;
      int flag = 1;
      enum XML_Error rc;
-     if (!PyArg_ParseTuple(args, "p:UseForeignDTD", &flag))
 -    if (!PyArg_ParseTuple(args, "|O:UseForeignDTD", &flagobj))
++    if (!PyArg_ParseTuple(args, "|p:UseForeignDTD", &flag))
          return NULL;
 -    if (flagobj != NULL) {
 -        flag = PyObject_IsTrue(flagobj);
 -        if (flag < 0)
 -            return NULL;
 -    }
      rc = XML_UseForeignDTD(self->itself, flag ? XML_TRUE : XML_FALSE);
      if (rc != XML_ERROR_NONE) {
          return set_error(self, rc);