Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) | Sebastian Pipping | 2024-03-26 | 1 | -4/+4 |
| | | | | | | | | | | | This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix. When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing. * sax|etree: Simplify Expat version guard where simplifiable Idea by Matěj Cepl * sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0 This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix. (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package) | ||||
* | gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) ↵ | Sebastian Pipping | 2024-02-29 | 1 | -0/+51 |
| | | | | | | | | | | | | | | | | | | | | | (GH-115623) Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods: - `xml.etree.ElementTree.XMLParser.flush` - `xml.etree.ElementTree.XMLPullParser.flush` - `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled` - `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` - `xml.sax.expatreader.ExpatParser.flush` Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 . ### Notes - Please treat as a security fix related to CVE-2023-52425. Includes code suggested-by: Snild Dolkow <snild@sony.com> and by core dev Serhiy Storchaka. | ||||
* | bpo-45229: Remove test_main in many tests (GH-28405) | Serhiy Storchaka | 2021-09-19 | 1 | -19/+2 |
| | | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests. | ||||
* | bpo-35018: Sax parser should provide user access to lexical handlers (GH-20958) | Zackery Spytz | 2020-08-09 | 1 | -2/+155 |
| | | | Co-Authored-By: Jonathan Gossage <jgossage@gmail.com> | ||||
* | bpo-40275: Use new test.support helper submodules in tests (GH-21451) | Hai Shi | 2020-08-03 | 1 | -14/+16 |
| | |||||
* | bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482) | Hai Shi | 2020-05-28 | 1 | -1/+2 |
| | | | Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding(). | ||||
* | bpo-37421: urllib.request tests call urlcleanup() (GH-14529) | Victor Stinner | 2019-07-02 | 1 | -0/+4 |
| | | | | | | | | urllib.request tests now call urlcleanup() to remove temporary files created by urlretrieve() tests and to clear the _opener global variable set by urlopen() and functions calling indirectly urlopen(). regrtest now checks if urllib.request._url_tempfiles and urllib.request._opener are changed by tests. | ||||
* | bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564) | Mickaël Schoentgen | 2019-04-14 | 1 | -1/+12 |
| | |||||
* | bpo-35202: Remove unused imports in tests. (GH-10561) | Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) | 2018-11-16 | 1 | -1/+0 |
| | |||||
* | bpo-34789: make xml.sax.make_parser accept iterables of all types (GH-9576) | Andrés Delfino | 2018-10-26 | 1 | -0/+28 |
| | |||||
* | bpo-17239: Disable external entities in SAX parser (GH-9217) | Christian Heimes | 2018-09-23 | 1 | -2/+58 |
| | | | | | | | | | | | | The SAX parser no longer processes general external entities by default to increase security. Before, the parser created network connections to fetch remote files or loaded local files from the file system for DTD and entities. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue17239 | ||||
* | bpo-30264: ExpatParser closes the source on error (#1451) | Victor Stinner | 2017-05-05 | 1 | -6/+18 |
| | | | | | | | | ExpatParser.parse() of xml.sax.xmlreader now always closes the source: close the file object or the urllib object if source is a string (not an open file-like object). The change fixes a ResourceWarning on parsing error. Add test_parse_close_source() unit test. | ||||
* | Issue #24125: Saved error's line and column numbers when an error is occured | Serhiy Storchaka | 2015-05-06 | 1 | -0/+2 |
|\ | | | | | | | during closing expatreader. Fixed a regression introduced in issue #23865. | ||||
| * | Issue #24125: Saved error's line and column numbers when an error is occured | Serhiy Storchaka | 2015-05-06 | 1 | -0/+2 |
| | | | | | | | | during closing expatreader. Fixed a regression introduced in issue #23865. | ||||
* | | Issue #10590: xml.sax.parseString() now supports string argument. | Serhiy Storchaka | 2015-04-04 | 1 | -0/+7 |
| | | |||||
* | | Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString(). | Serhiy Storchaka | 2015-04-02 | 1 | -1/+123 |
|\ \ | |/ | |||||
| * | Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString(). | Serhiy Storchaka | 2015-04-02 | 1 | -1/+123 |
| | | |||||
* | | Issue #2175: SAX parsers now support a character stream of InputSource object. | Serhiy Storchaka | 2015-04-02 | 1 | -0/+33 |
|/ | |||||
* | Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source(). | Serhiy Storchaka | 2015-04-02 | 1 | -5/+71 |
| | | | | Made test XML files non-ASCII. | ||||
* | Issue #22915: SAX parser now supports files opened with file descriptor or | Serhiy Storchaka | 2014-11-27 | 1 | -0/+24 |
| | | | | bytes path. | ||||
* | Close file before reopening to keep Windows happy in test_sax. | Richard Oudkerk | 2013-05-18 | 1 | -5/+6 |
| | |||||
* | Fix ResourceWarnings in test_sax | Antoine Pitrou | 2013-05-13 | 1 | -1/+4 |
| | |||||
* | Issue #17606: Fixed support of encoded byte strings in the XMLGenerator | Serhiy Storchaka | 2013-05-12 | 1 | -0/+18 |
| | | | | | characters() and ignorableWhitespace() methods. Original patch by Sebastian Ortiz Vasquez. | ||||
* | merge with 3.2 | Georg Brandl | 2013-05-12 | 1 | -0/+31 |
|\ | |||||
| * | Issue #17915: Fix interoperability of xml.sax with file objects returned by | Georg Brandl | 2013-05-12 | 1 | -0/+31 |
| | | | | | | | | codecs.open(). | ||||
* | | Merge #17448: Make test_sax skip if there are no xml parsers. | R David Murray | 2013-03-18 | 1 | -2/+2 |
|\ \ | |/ | | | | | Patch by Rafael Santos. | ||||
| * | #17448: Make test_sax skip if there are no xml parsers. | R David Murray | 2013-03-18 | 1 | -2/+2 |
| | | | | | | | | Patch by Rafael Santos. | ||||
* | | Issue #1470548: Add test for fragment producing with XMLGenerator. | Serhiy Storchaka | 2013-02-25 | 1 | -0/+15 |
|\ \ | |/ | |||||
| * | Issue #1470548: Add test for fragment producing with XMLGenerator. | Serhiy Storchaka | 2013-02-25 | 1 | -0/+15 |
| | | |||||
* | | Issue #1470548: XMLGenerator now works with binary output streams. | Serhiy Storchaka | 2013-02-10 | 1 | -71/+144 |
|\ \ | |/ | |||||
| * | Issue #1470548: XMLGenerator now works with binary output streams. | Serhiy Storchaka | 2013-02-10 | 1 | -71/+144 |
| | | |||||
* | | Fix tests for issue #11159. | Serhiy Storchaka | 2013-02-02 | 1 | -0/+16 |
|\ \ | |/ | |||||
| * | Fix tests for issue #11159. | Serhiy Storchaka | 2013-02-02 | 1 | -0/+16 |
| | | |||||
* | | Issue #11159: Add tests for testing SAX parser support of non-ascii file names. | Serhiy Storchaka | 2013-02-02 | 1 | -0/+44 |
|\ \ | |/ | |||||
| * | Issue #11159: Add tests for testing SAX parser support of non-ascii file names. | Serhiy Storchaka | 2013-02-02 | 1 | -0/+44 |
| | | |||||
* | | Issue #16714: use 'raise' exceptions, don't 'throw'. | Andrew Svetlov | 2012-12-18 | 1 | -2/+2 |
|\ \ | |/ | | | | | Patch by Serhiy Storchaka. | ||||
| * | Issue #16714: use 'raise' exceptions, don't 'throw'. | Andrew Svetlov | 2012-12-18 | 1 | -2/+2 |
| | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | merge 11164 | Martin v. Löwis | 2011-05-09 | 1 | -45/+0 |
|\ \ | |/ | |||||
| * | merge 11164 | Martin v. Löwis | 2011-05-09 | 1 | -45/+0 |
| |\ | |||||
| | * | Stop trying to use _xmlplus in the xml module. Closes #11164. | Martin v. Löwis | 2011-05-09 | 1 | -45/+0 |
| | | | | | | | | | | | | Patch by Arfrever Frehtes Taifersar Arahesis. | ||||
| | * | Merged revisions 86596 via svnmerge from | Ezio Melotti | 2010-11-21 | 1 | -111/+111 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........ | ||||
| | * | Merged revisions 85861 via svnmerge from | Antoine Pitrou | 2010-10-27 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85861 | antoine.pitrou | 2010-10-27 20:52:48 +0200 (mer., 27 oct. 2010) | 3 lines Recode modules from latin-1 to utf-8 ........ | ||||
| | * | Merged revisions 85858 via svnmerge from | Antoine Pitrou | 2010-10-27 | 1 | -0/+55 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85858 | antoine.pitrou | 2010-10-27 20:33:30 +0200 (mer., 27 oct. 2010) | 5 lines Issue #5027: The standard `xml` namespace is now understood by xml.sax.saxutils.XMLGenerator as being bound to http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. ........ | ||||
* | | | Normalize the encoding names for Latin-1 and UTF-8 to | Marc-André Lemburg | 2011-02-25 | 1 | -2/+2 |
|/ / | | | | | | | | | | | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303. | ||||
* | | #9424: Replace deprecated assert* methods in the Python test suite. | Ezio Melotti | 2010-11-20 | 1 | -119/+119 |
| | | |||||
* | | fix resource warnings in test_sax #10269 | Benjamin Peterson | 2010-10-31 | 1 | -4/+7 |
| | | |||||
* | | Recode modules from latin-1 to utf-8 | Antoine Pitrou | 2010-10-27 | 1 | -3/+3 |
| | | |||||
* | | Issue #5027: The standard `xml` namespace is now understood by | Antoine Pitrou | 2010-10-27 | 1 | -0/+55 |
| | | | | | | | | | | xml.sax.saxutils.XMLGenerator as being bound to http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. | ||||
* | | #1343: Add short_empty_elements option to XMLGenerator. | R. David Murray | 2010-10-17 | 1 | -0/+90 |
| | | | | | | | | Patch and tests by Neil Muller. | ||||
* | | Issue #9425: skip tests if a filename is not encodable | Victor Stinner | 2010-08-07 | 1 | -0/+5 |
| | |