xmlschema
xmlschema copied to clipboard
normalize_url test failures with Python 3.12
Hi,
with Python 3.12, I'm seeing the following test failures:
======================================================================
FAIL: test_normalize_url_slashes (tests.test_locations.TestLocations.test_normalize_url_slashes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/python-xmlschema-3.3.1/tests/test_locations.py", line 314, in test_normalize_url_slashes
self.assertRegex(normalize_url('////root/dir1/schema.xsd'),
AssertionError: Regex didn't match: 'file:////root/dir1/schema.xsd' not found in 'file://////root/dir1/schema.xsd'
======================================================================
FAIL: test_normalize_url_with_base_unc_path (tests.test_locations.TestLocations.test_normalize_url_with_base_unc_path)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/python-xmlschema-3.3.1/tests/test_locations.py", line 283, in test_normalize_url_with_base_unc_path
self.assertEqual(url, 'file:////filer01/MY_HOME/dev/XMLSCHEMA/test.xsd')
AssertionError: 'file://///filer01/MY_HOME/dev/XMLSCHEMA/test.xsd' != 'file:////filer01/MY_HOME/dev/XMLSCHEMA/test.xsd'
- file://///filer01/MY_HOME/dev/XMLSCHEMA/test.xsd
? -
+ file:////filer01/MY_HOME/dev/XMLSCHEMA/test.xsd
Looking at the changelog of 3.12, there were a few changes to urllib
, though it's not immediately obvious to me which one could have affected this (or if these change even were the cause).