]> granicus.if.org Git - python/commitdiff
#23144: merge with 3.4.
authorEzio Melotti <ezio.melotti@gmail.com>
Sun, 6 Sep 2015 18:44:45 +0000 (21:44 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Sun, 6 Sep 2015 18:44:45 +0000 (21:44 +0300)
1  2 
Lib/html/parser.py
Lib/test/test_htmlparser.py
Misc/NEWS

Simple merge
index de8f3e80d4b7bfba2b3c922ca3c6678d10408351,144f820af29c2262d1b883a25f9deec2a9b40615..11420b2c8460cdd3764f0217290ec4a9aab943d2
@@@ -633,8 -682,24 +630,20 @@@ tex
          ]
          self._run_check(html, expected)
  
+     def test_convert_charrefs_dropped_text(self):
+         # #23144: make sure that all the events are triggered when
+         # convert_charrefs is True, even if we don't call .close()
+         parser = EventCollector(convert_charrefs=True)
+         # before the fix, bar & baz was missing
+         parser.feed("foo <a>link</a> bar &amp; baz")
+         self.assertEqual(
+             parser.get_events(),
+             [('data', 'foo '), ('starttag', 'a', []), ('data', 'link'),
+              ('endtag', 'a'), ('data', ' bar & baz')]
+         )
  
 -class AttributesStrictTestCase(TestCaseBase):
 -
 -    def get_collector(self):
 -        with support.check_warnings(("", DeprecationWarning), quite=False):
 -            return EventCollector(strict=True, convert_charrefs=False)
 +class AttributesTestCase(TestCaseBase):
  
      def test_attr_syntax(self):
          output = [
diff --cc Misc/NEWS
index 5f23605b23be53d41172266007a111e25bcd9698,7a3c22c4832f01b86fddff47b0d47b6370c0df29..64c9af75bcba73916ffb03ebdf3cdb6628f39ddb
+++ b/Misc/NEWS
@@@ -95,68 -81,29 +95,72 @@@ Core and Builtin
  Library
  -------
  
 -- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
 -  in an infinite loop.  Patch by Xavier de Gaye.
+ - Issue #23144: Make sure that HTMLParser.feed() returns all the data, even
+   when convert_charrefs is True.
 +- Issue #24635: Fixed a bug in typing.py where isinstance([], typing.Iterable)
 +  would return True once, then False on subsequent calls.
  
 -- Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
 -  Patch from Berker Peksag.
 -- Issue #24931: Instances of subclasses of namedtuples have their own __dict__
 -  which breaks the inherited __dict__ property and breaks the _asdict() method.
 -  Removed the __dict__ property to prevent the conflict and fixed _asdict().
 +- Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
 +  set beyond size.  Based on patch by John Leitch.
  
 -- Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
 -  header in part headers. Patch written by Peter Landry and reviewed by Pierre
 -  Quentel.
 +- Issue #24913: Fix overrun error in deque.index().
 +  Found by John Leitch and Bryce Darling.
  
 -- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
  
 -- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
 -  Patch from Ćukasz Langa.
 +What's New in Python 3.5.0 release candidate 2?
 +===============================================
  
 -- Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
 +Release date: 2015-08-25
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #24769: Interpreter now starts properly when dynamic loading
 +  is disabled.  Patch by Petr Viktorin.
 +
 +- Issue #21167: NAN operations are now handled correctly when python is
 +  compiled with ICC even if -fp-model strict is not specified.
 +
 +- Issue #24492: A "package" lacking a __name__ attribute when trying to perform
 +  a ``from .. import ...`` statement will trigger an ImportError instead of an
 +  AttributeError.
 +
 +Library
 +-------
 +
 +- Issue #24847: Removes vcruntime140.dll dependency from Tcl/Tk.
 +
 +- Issue #24839: platform._syscmd_ver raises DeprecationWarning
 +
 +- Issue #24867: Fix Task.get_stack() for 'async def' coroutines
 +
 +
 +What's New in Python 3.5.0 release candidate 1?
 +===============================================
 +
 +Release date: 2015-08-09
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #24667: Resize odict in all cases that the underlying dict resizes.
 +
 +Library
 +-------
 +
 +- Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
 +  compatible with pydoc.
 +
 +- Issue #24634: Importing uuid should not try to load libc on Windows
 +
 +- Issue #24798: _msvccompiler.py doesn't properly support manifests
 +
 +- Issue #4395: Better testing and documentation of binary operators.
 +  Patch by Martin Panter.
 +
 +- Issue #23973: Update typing.py from GitHub repo.
  
  - Issue #23004: mock_open() now reads binary data correctly when the type of
    read_data is bytes.  Initial patch by Aaron Hill.