From 409a6eea4a44b34d331ef89287569734b105e2ca Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 9 Jul 2017 17:16:29 +0300 Subject: [PATCH 1/3] bpo-30876: Relative import from unloaded package now reimports the package instead of failing with SystemError. Relative import from non-package now fails with ImportError rather than SystemError. --- Lib/importlib/_bootstrap.py | 4 - Lib/test/test_import/__init__.py | 25 +- .../test_import/data/package2/submodule1.py | 3 + .../test_import/data/package2/submodule2.py | 0 .../import_/test___package__.py | 2 +- Misc/NEWS | 4 + Python/import.c | 7 - Python/importlib.h | 738 +++++++++--------- 8 files changed, 396 insertions(+), 387 deletions(-) create mode 100644 Lib/test/test_import/data/package2/submodule1.py create mode 100644 Lib/test/test_import/data/package2/submodule2.py diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index f7c89caca8060e..e8e6ec22442065 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -917,10 +917,6 @@ def _sanity_check(name, package, level): elif not package: raise ImportError('attempted relative import with no known parent ' 'package') - elif package not in sys.modules: - msg = ('Parent module {!r} not loaded, cannot perform relative ' - 'import') - raise SystemError(msg.format(package)) if not name and level == 0: raise ValueError('Empty module name') diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 8424ed7aa3aa6d..a144090377147e 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -670,11 +670,11 @@ def check_relative(): # Check relative import fails with only __package__ wrong ns = dict(__package__='foo', __name__='test.notarealmodule') - self.assertRaises(SystemError, check_relative) + self.assertRaises(ModuleNotFoundError, check_relative) # Check relative import fails with __package__ and __name__ wrong ns = dict(__package__='foo', __name__='notarealpkg.notarealmodule') - self.assertRaises(SystemError, check_relative) + self.assertRaises(ModuleNotFoundError, check_relative) # Check relative import fails with package set to a non-string ns = dict(__package__=object()) @@ -689,6 +689,27 @@ def test_absolute_import_without_future(self): self.fail("explicit relative import triggered an " "implicit absolute import") + def test_import_from_non_package(self): + sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data', 'package2')) + try: + with self.assertRaises(ImportError): + import submodule1 + self.assertNotIn('submodule1', sys.modules) + self.assertNotIn('submodule2', sys.modules) + finally: + del sys.path[0] + + def test_import_from_unloaded_package(self): + sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data')) + try: + import package2.submodule1 + package2.submodule1.submodule2 + finally: + del sys.path[0] + del sys.modules['package2.submodule1'] + del sys.modules['package2.submodule2'] + del sys.modules['package2'] + class OverridingImportBuiltinTests(unittest.TestCase): def test_override_builtin(self): diff --git a/Lib/test/test_import/data/package2/submodule1.py b/Lib/test/test_import/data/package2/submodule1.py new file mode 100644 index 00000000000000..0698ed6de2a1db --- /dev/null +++ b/Lib/test/test_import/data/package2/submodule1.py @@ -0,0 +1,3 @@ +import sys +sys.modules.pop(__package__, None) +from . import submodule2 diff --git a/Lib/test/test_import/data/package2/submodule2.py b/Lib/test/test_import/data/package2/submodule2.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/Lib/test/test_importlib/import_/test___package__.py b/Lib/test/test_importlib/import_/test___package__.py index 7f64548748eec3..b26634ea4537a1 100644 --- a/Lib/test/test_importlib/import_/test___package__.py +++ b/Lib/test/test_importlib/import_/test___package__.py @@ -81,7 +81,7 @@ def test_warn_when_package_and_spec_disagree(self): def test_bad__package__(self): globals = {'__package__': ''} - with self.assertRaises(SystemError): + with self.assertRaises(ModuleNotFoundError): self.__import__('', globals, {}, ['relimport'], 1) def test_bunk__package__(self): diff --git a/Misc/NEWS b/Misc/NEWS index 2f2fafff5ee910..589b2398268097 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,10 @@ What's New in Python 3.7.0 alpha 1? Core and Builtins ----------------- +- bpo-30876: Relative import from unloaded package now reimports the package + instead of failing with SystemError. Relative import from non-package + now fails with ImportError rather than SystemError. + - bpo-30814: Fixed a race condition when import a submodule from a package. - bpo-30736: The internal unicodedata database has been upgraded to Unicode diff --git a/Python/import.c b/Python/import.c index 6cdb3661744434..93032c5f510e26 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1344,7 +1344,6 @@ resolve_name(PyObject *name, PyObject *globals, int level) PyObject *abs_name; PyObject *package = NULL; PyObject *spec; - PyInterpreterState *interp = PyThreadState_GET()->interp; Py_ssize_t last_dot; PyObject *base; int level_up; @@ -1448,12 +1447,6 @@ resolve_name(PyObject *name, PyObject *globals, int level) "attempted relative import with no known parent package"); goto error; } - else if (PyDict_GetItem(interp->modules, package) == NULL) { - PyErr_Format(PyExc_SystemError, - "Parent module %R not loaded, cannot perform relative " - "import", package); - goto error; - } for (level_up = 1; level_up < level; level_up += 1) { last_dot = PyUnicode_FindChar(package, '.', 0, last_dot, -1); diff --git a/Python/importlib.h b/Python/importlib.h index f5303f76c484c1..f5cf9871aab106 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -1449,382 +1449,374 @@ const unsigned char _Py_M__importlib[] = { 10,1,14,1,12,1,8,1,8,2,22,1,8,2,14,1, 10,1,2,1,10,1,14,4,6,2,8,1,4,2,6,2, 8,2,114,170,0,0,0,99,3,0,0,0,0,0,0,0, - 4,0,0,0,5,0,0,0,67,0,0,0,115,138,0,0, + 3,0,0,0,5,0,0,0,67,0,0,0,115,108,0,0, 0,116,0,124,0,116,1,131,2,115,28,116,2,100,1,160, 3,116,4,124,0,131,1,161,1,131,1,130,1,124,2,100, 2,107,0,114,44,116,5,100,3,131,1,130,1,124,2,100, - 2,107,4,114,114,116,0,124,1,116,1,131,2,115,72,116, - 2,100,4,131,1,130,1,110,42,124,1,115,86,116,6,100, - 5,131,1,130,1,110,28,124,1,116,7,106,8,107,7,114, - 114,100,6,125,3,116,9,124,3,160,3,124,1,161,1,131, - 1,130,1,124,0,115,134,124,2,100,2,107,2,114,134,116, - 5,100,7,131,1,130,1,100,8,83,0,41,9,122,28,86, - 101,114,105,102,121,32,97,114,103,117,109,101,110,116,115,32, - 97,114,101,32,34,115,97,110,101,34,46,122,31,109,111,100, - 117,108,101,32,110,97,109,101,32,109,117,115,116,32,98,101, - 32,115,116,114,44,32,110,111,116,32,123,125,114,19,0,0, - 0,122,18,108,101,118,101,108,32,109,117,115,116,32,98,101, - 32,62,61,32,48,122,31,95,95,112,97,99,107,97,103,101, - 95,95,32,110,111,116,32,115,101,116,32,116,111,32,97,32, - 115,116,114,105,110,103,122,54,97,116,116,101,109,112,116,101, - 100,32,114,101,108,97,116,105,118,101,32,105,109,112,111,114, - 116,32,119,105,116,104,32,110,111,32,107,110,111,119,110,32, - 112,97,114,101,110,116,32,112,97,99,107,97,103,101,122,61, - 80,97,114,101,110,116,32,109,111,100,117,108,101,32,123,33, - 114,125,32,110,111,116,32,108,111,97,100,101,100,44,32,99, - 97,110,110,111,116,32,112,101,114,102,111,114,109,32,114,101, - 108,97,116,105,118,101,32,105,109,112,111,114,116,122,17,69, - 109,112,116,121,32,109,111,100,117,108,101,32,110,97,109,101, - 78,41,10,218,10,105,115,105,110,115,116,97,110,99,101,218, - 3,115,116,114,218,9,84,121,112,101,69,114,114,111,114,114, - 38,0,0,0,114,13,0,0,0,114,160,0,0,0,114,70, - 0,0,0,114,14,0,0,0,114,79,0,0,0,218,11,83, - 121,115,116,101,109,69,114,114,111,114,41,4,114,15,0,0, - 0,114,161,0,0,0,114,162,0,0,0,114,139,0,0,0, + 2,107,4,114,84,116,0,124,1,116,1,131,2,115,72,116, + 2,100,4,131,1,130,1,110,12,124,1,115,84,116,6,100, + 5,131,1,130,1,124,0,115,104,124,2,100,2,107,2,114, + 104,116,5,100,6,131,1,130,1,100,7,83,0,41,8,122, + 28,86,101,114,105,102,121,32,97,114,103,117,109,101,110,116, + 115,32,97,114,101,32,34,115,97,110,101,34,46,122,31,109, + 111,100,117,108,101,32,110,97,109,101,32,109,117,115,116,32, + 98,101,32,115,116,114,44,32,110,111,116,32,123,125,114,19, + 0,0,0,122,18,108,101,118,101,108,32,109,117,115,116,32, + 98,101,32,62,61,32,48,122,31,95,95,112,97,99,107,97, + 103,101,95,95,32,110,111,116,32,115,101,116,32,116,111,32, + 97,32,115,116,114,105,110,103,122,54,97,116,116,101,109,112, + 116,101,100,32,114,101,108,97,116,105,118,101,32,105,109,112, + 111,114,116,32,119,105,116,104,32,110,111,32,107,110,111,119, + 110,32,112,97,114,101,110,116,32,112,97,99,107,97,103,101, + 122,17,69,109,112,116,121,32,109,111,100,117,108,101,32,110, + 97,109,101,78,41,7,218,10,105,115,105,110,115,116,97,110, + 99,101,218,3,115,116,114,218,9,84,121,112,101,69,114,114, + 111,114,114,38,0,0,0,114,13,0,0,0,114,160,0,0, + 0,114,70,0,0,0,41,3,114,15,0,0,0,114,161,0, + 0,0,114,162,0,0,0,114,10,0,0,0,114,10,0,0, + 0,114,11,0,0,0,218,13,95,115,97,110,105,116,121,95, + 99,104,101,99,107,140,3,0,0,115,22,0,0,0,0,2, + 10,1,18,1,8,1,8,1,8,1,10,1,10,1,4,1, + 8,2,12,1,114,174,0,0,0,122,16,78,111,32,109,111, + 100,117,108,101,32,110,97,109,101,100,32,122,4,123,33,114, + 125,99,2,0,0,0,0,0,0,0,8,0,0,0,13,0, + 0,0,67,0,0,0,115,220,0,0,0,100,0,125,2,124, + 0,160,0,100,1,161,1,100,2,25,0,125,3,124,3,114, + 134,124,3,116,1,106,2,107,7,114,42,116,3,124,1,124, + 3,131,2,1,0,124,0,116,1,106,2,107,6,114,62,116, + 1,106,2,124,0,25,0,83,0,116,1,106,2,124,3,25, + 0,125,4,121,10,124,4,106,4,125,2,87,0,110,50,4, + 0,116,5,107,10,114,132,1,0,1,0,1,0,116,6,100, + 3,23,0,160,7,124,0,124,3,161,2,125,5,116,8,124, + 5,124,0,100,4,141,2,100,0,130,2,89,0,110,2,88, + 0,116,9,124,0,124,2,131,2,125,6,124,6,100,0,107, + 8,114,172,116,8,116,6,160,7,124,0,161,1,124,0,100, + 4,141,2,130,1,110,8,116,10,124,6,131,1,125,7,124, + 3,114,216,116,1,106,2,124,3,25,0,125,4,116,11,124, + 4,124,0,160,0,100,1,161,1,100,5,25,0,124,7,131, + 3,1,0,124,7,83,0,41,6,78,114,117,0,0,0,114, + 19,0,0,0,122,23,59,32,123,33,114,125,32,105,115,32, + 110,111,116,32,97,32,112,97,99,107,97,103,101,41,1,114, + 15,0,0,0,233,2,0,0,0,41,12,114,118,0,0,0, + 114,14,0,0,0,114,79,0,0,0,114,58,0,0,0,114, + 127,0,0,0,114,90,0,0,0,218,8,95,69,82,82,95, + 77,83,71,114,38,0,0,0,218,19,77,111,100,117,108,101, + 78,111,116,70,111,117,110,100,69,114,114,111,114,114,170,0, + 0,0,114,141,0,0,0,114,5,0,0,0,41,8,114,15, + 0,0,0,218,7,105,109,112,111,114,116,95,114,144,0,0, + 0,114,119,0,0,0,90,13,112,97,114,101,110,116,95,109, + 111,100,117,108,101,114,139,0,0,0,114,82,0,0,0,114, + 83,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11, + 0,0,0,218,23,95,102,105,110,100,95,97,110,100,95,108, + 111,97,100,95,117,110,108,111,99,107,101,100,159,3,0,0, + 115,42,0,0,0,0,1,4,1,14,1,4,1,10,1,10, + 2,10,1,10,1,10,1,2,1,10,1,14,1,16,1,20, + 1,10,1,8,1,20,2,8,1,4,2,10,1,22,1,114, + 179,0,0,0,99,2,0,0,0,0,0,0,0,4,0,0, + 0,11,0,0,0,67,0,0,0,115,104,0,0,0,116,0, + 160,1,161,0,1,0,124,0,116,2,106,3,107,7,114,44, + 116,4,124,0,131,1,143,12,1,0,116,5,124,0,124,1, + 131,2,83,0,81,0,82,0,88,0,116,2,106,3,124,0, + 25,0,125,2,124,2,100,1,107,8,114,92,116,0,160,6, + 161,0,1,0,100,2,160,7,124,0,161,1,125,3,116,8, + 124,3,124,0,100,3,141,2,130,1,116,9,124,0,131,1, + 1,0,124,2,83,0,41,4,122,25,70,105,110,100,32,97, + 110,100,32,108,111,97,100,32,116,104,101,32,109,111,100,117, + 108,101,46,78,122,40,105,109,112,111,114,116,32,111,102,32, + 123,125,32,104,97,108,116,101,100,59,32,78,111,110,101,32, + 105,110,32,115,121,115,46,109,111,100,117,108,101,115,41,1, + 114,15,0,0,0,41,10,114,46,0,0,0,114,137,0,0, + 0,114,14,0,0,0,114,79,0,0,0,114,42,0,0,0, + 114,179,0,0,0,114,47,0,0,0,114,38,0,0,0,114, + 177,0,0,0,114,56,0,0,0,41,4,114,15,0,0,0, + 114,178,0,0,0,114,83,0,0,0,114,67,0,0,0,114, + 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,14, + 95,102,105,110,100,95,97,110,100,95,108,111,97,100,186,3, + 0,0,115,24,0,0,0,0,2,8,1,10,1,10,1,16, + 1,10,1,8,1,8,1,4,1,6,1,12,1,8,1,114, + 180,0,0,0,114,19,0,0,0,99,3,0,0,0,0,0, + 0,0,3,0,0,0,4,0,0,0,67,0,0,0,115,42, + 0,0,0,116,0,124,0,124,1,124,2,131,3,1,0,124, + 2,100,1,107,4,114,32,116,1,124,0,124,1,124,2,131, + 3,125,0,116,2,124,0,116,3,131,2,83,0,41,2,97, + 50,1,0,0,73,109,112,111,114,116,32,97,110,100,32,114, + 101,116,117,114,110,32,116,104,101,32,109,111,100,117,108,101, + 32,98,97,115,101,100,32,111,110,32,105,116,115,32,110,97, + 109,101,44,32,116,104,101,32,112,97,99,107,97,103,101,32, + 116,104,101,32,99,97,108,108,32,105,115,10,32,32,32,32, + 98,101,105,110,103,32,109,97,100,101,32,102,114,111,109,44, + 32,97,110,100,32,116,104,101,32,108,101,118,101,108,32,97, + 100,106,117,115,116,109,101,110,116,46,10,10,32,32,32,32, + 84,104,105,115,32,102,117,110,99,116,105,111,110,32,114,101, + 112,114,101,115,101,110,116,115,32,116,104,101,32,103,114,101, + 97,116,101,115,116,32,99,111,109,109,111,110,32,100,101,110, + 111,109,105,110,97,116,111,114,32,111,102,32,102,117,110,99, + 116,105,111,110,97,108,105,116,121,10,32,32,32,32,98,101, + 116,119,101,101,110,32,105,109,112,111,114,116,95,109,111,100, + 117,108,101,32,97,110,100,32,95,95,105,109,112,111,114,116, + 95,95,46,32,84,104,105,115,32,105,110,99,108,117,100,101, + 115,32,115,101,116,116,105,110,103,32,95,95,112,97,99,107, + 97,103,101,95,95,32,105,102,10,32,32,32,32,116,104,101, + 32,108,111,97,100,101,114,32,100,105,100,32,110,111,116,46, + 10,10,32,32,32,32,114,19,0,0,0,41,4,114,174,0, + 0,0,114,163,0,0,0,114,180,0,0,0,218,11,95,103, + 99,100,95,105,109,112,111,114,116,41,3,114,15,0,0,0, + 114,161,0,0,0,114,162,0,0,0,114,10,0,0,0,114, + 10,0,0,0,114,11,0,0,0,114,181,0,0,0,202,3, + 0,0,115,8,0,0,0,0,9,12,1,8,1,12,1,114, + 181,0,0,0,99,3,0,0,0,0,0,0,0,6,0,0, + 0,17,0,0,0,67,0,0,0,115,164,0,0,0,116,0, + 124,0,100,1,131,2,114,160,100,2,124,1,107,6,114,58, + 116,1,124,1,131,1,125,1,124,1,160,2,100,2,161,1, + 1,0,116,0,124,0,100,3,131,2,114,58,124,1,160,3, + 124,0,106,4,161,1,1,0,120,100,124,1,68,0,93,92, + 125,3,116,0,124,0,124,3,131,2,115,64,100,4,160,5, + 124,0,106,6,124,3,161,2,125,4,121,14,116,7,124,2, + 124,4,131,2,1,0,87,0,113,64,4,0,116,8,107,10, + 114,154,1,0,125,5,1,0,122,20,124,5,106,9,124,4, + 107,2,114,136,119,64,130,0,87,0,89,0,100,5,100,5, + 125,5,126,5,88,0,113,64,88,0,113,64,87,0,124,0, + 83,0,41,6,122,238,70,105,103,117,114,101,32,111,117,116, + 32,119,104,97,116,32,95,95,105,109,112,111,114,116,95,95, + 32,115,104,111,117,108,100,32,114,101,116,117,114,110,46,10, + 10,32,32,32,32,84,104,101,32,105,109,112,111,114,116,95, + 32,112,97,114,97,109,101,116,101,114,32,105,115,32,97,32, + 99,97,108,108,97,98,108,101,32,119,104,105,99,104,32,116, + 97,107,101,115,32,116,104,101,32,110,97,109,101,32,111,102, + 32,109,111,100,117,108,101,32,116,111,10,32,32,32,32,105, + 109,112,111,114,116,46,32,73,116,32,105,115,32,114,101,113, + 117,105,114,101,100,32,116,111,32,100,101,99,111,117,112,108, + 101,32,116,104,101,32,102,117,110,99,116,105,111,110,32,102, + 114,111,109,32,97,115,115,117,109,105,110,103,32,105,109,112, + 111,114,116,108,105,98,39,115,10,32,32,32,32,105,109,112, + 111,114,116,32,105,109,112,108,101,109,101,110,116,97,116,105, + 111,110,32,105,115,32,100,101,115,105,114,101,100,46,10,10, + 32,32,32,32,114,127,0,0,0,250,1,42,218,7,95,95, + 97,108,108,95,95,122,5,123,125,46,123,125,78,41,10,114, + 4,0,0,0,114,126,0,0,0,218,6,114,101,109,111,118, + 101,218,6,101,120,116,101,110,100,114,183,0,0,0,114,38, + 0,0,0,114,1,0,0,0,114,58,0,0,0,114,177,0, + 0,0,114,15,0,0,0,41,6,114,83,0,0,0,218,8, + 102,114,111,109,108,105,115,116,114,178,0,0,0,218,1,120, + 90,9,102,114,111,109,95,110,97,109,101,90,3,101,120,99, 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218, - 13,95,115,97,110,105,116,121,95,99,104,101,99,107,140,3, - 0,0,115,28,0,0,0,0,2,10,1,18,1,8,1,8, - 1,8,1,10,1,10,1,4,1,10,2,10,1,4,2,14, - 1,12,1,114,175,0,0,0,122,16,78,111,32,109,111,100, - 117,108,101,32,110,97,109,101,100,32,122,4,123,33,114,125, - 99,2,0,0,0,0,0,0,0,8,0,0,0,13,0,0, - 0,67,0,0,0,115,220,0,0,0,100,0,125,2,124,0, - 160,0,100,1,161,1,100,2,25,0,125,3,124,3,114,134, - 124,3,116,1,106,2,107,7,114,42,116,3,124,1,124,3, - 131,2,1,0,124,0,116,1,106,2,107,6,114,62,116,1, - 106,2,124,0,25,0,83,0,116,1,106,2,124,3,25,0, - 125,4,121,10,124,4,106,4,125,2,87,0,110,50,4,0, - 116,5,107,10,114,132,1,0,1,0,1,0,116,6,100,3, - 23,0,160,7,124,0,124,3,161,2,125,5,116,8,124,5, - 124,0,100,4,141,2,100,0,130,2,89,0,110,2,88,0, - 116,9,124,0,124,2,131,2,125,6,124,6,100,0,107,8, - 114,172,116,8,116,6,160,7,124,0,161,1,124,0,100,4, - 141,2,130,1,110,8,116,10,124,6,131,1,125,7,124,3, - 114,216,116,1,106,2,124,3,25,0,125,4,116,11,124,4, - 124,0,160,0,100,1,161,1,100,5,25,0,124,7,131,3, - 1,0,124,7,83,0,41,6,78,114,117,0,0,0,114,19, - 0,0,0,122,23,59,32,123,33,114,125,32,105,115,32,110, - 111,116,32,97,32,112,97,99,107,97,103,101,41,1,114,15, - 0,0,0,233,2,0,0,0,41,12,114,118,0,0,0,114, - 14,0,0,0,114,79,0,0,0,114,58,0,0,0,114,127, - 0,0,0,114,90,0,0,0,218,8,95,69,82,82,95,77, - 83,71,114,38,0,0,0,218,19,77,111,100,117,108,101,78, - 111,116,70,111,117,110,100,69,114,114,111,114,114,170,0,0, - 0,114,141,0,0,0,114,5,0,0,0,41,8,114,15,0, - 0,0,218,7,105,109,112,111,114,116,95,114,144,0,0,0, - 114,119,0,0,0,90,13,112,97,114,101,110,116,95,109,111, - 100,117,108,101,114,139,0,0,0,114,82,0,0,0,114,83, + 16,95,104,97,110,100,108,101,95,102,114,111,109,108,105,115, + 116,217,3,0,0,115,32,0,0,0,0,10,10,1,8,1, + 8,1,10,1,10,1,12,1,10,1,10,1,14,1,2,1, + 14,1,16,4,10,1,2,1,24,1,114,188,0,0,0,99, + 1,0,0,0,0,0,0,0,3,0,0,0,6,0,0,0, + 67,0,0,0,115,146,0,0,0,124,0,160,0,100,1,161, + 1,125,1,124,0,160,0,100,2,161,1,125,2,124,1,100, + 3,107,9,114,82,124,2,100,3,107,9,114,78,124,1,124, + 2,106,1,107,3,114,78,116,2,106,3,100,4,124,1,155, + 2,100,5,124,2,106,1,155,2,100,6,157,5,116,4,100, + 7,100,8,141,3,1,0,124,1,83,0,124,2,100,3,107, + 9,114,96,124,2,106,1,83,0,116,2,106,3,100,9,116, + 4,100,7,100,8,141,3,1,0,124,0,100,10,25,0,125, + 1,100,11,124,0,107,7,114,142,124,1,160,5,100,12,161, + 1,100,13,25,0,125,1,124,1,83,0,41,14,122,167,67, + 97,108,99,117,108,97,116,101,32,119,104,97,116,32,95,95, + 112,97,99,107,97,103,101,95,95,32,115,104,111,117,108,100, + 32,98,101,46,10,10,32,32,32,32,95,95,112,97,99,107, + 97,103,101,95,95,32,105,115,32,110,111,116,32,103,117,97, + 114,97,110,116,101,101,100,32,116,111,32,98,101,32,100,101, + 102,105,110,101,100,32,111,114,32,99,111,117,108,100,32,98, + 101,32,115,101,116,32,116,111,32,78,111,110,101,10,32,32, + 32,32,116,111,32,114,101,112,114,101,115,101,110,116,32,116, + 104,97,116,32,105,116,115,32,112,114,111,112,101,114,32,118, + 97,108,117,101,32,105,115,32,117,110,107,110,111,119,110,46, + 10,10,32,32,32,32,114,130,0,0,0,114,89,0,0,0, + 78,122,32,95,95,112,97,99,107,97,103,101,95,95,32,33, + 61,32,95,95,115,112,101,99,95,95,46,112,97,114,101,110, + 116,32,40,122,4,32,33,61,32,250,1,41,233,3,0,0, + 0,41,1,90,10,115,116,97,99,107,108,101,118,101,108,122, + 89,99,97,110,39,116,32,114,101,115,111,108,118,101,32,112, + 97,99,107,97,103,101,32,102,114,111,109,32,95,95,115,112, + 101,99,95,95,32,111,114,32,95,95,112,97,99,107,97,103, + 101,95,95,44,32,102,97,108,108,105,110,103,32,98,97,99, + 107,32,111,110,32,95,95,110,97,109,101,95,95,32,97,110, + 100,32,95,95,112,97,116,104,95,95,114,1,0,0,0,114, + 127,0,0,0,114,117,0,0,0,114,19,0,0,0,41,6, + 114,30,0,0,0,114,119,0,0,0,114,167,0,0,0,114, + 168,0,0,0,114,169,0,0,0,114,118,0,0,0,41,3, + 218,7,103,108,111,98,97,108,115,114,161,0,0,0,114,82, 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0, - 0,0,218,23,95,102,105,110,100,95,97,110,100,95,108,111, - 97,100,95,117,110,108,111,99,107,101,100,163,3,0,0,115, - 42,0,0,0,0,1,4,1,14,1,4,1,10,1,10,2, - 10,1,10,1,10,1,2,1,10,1,14,1,16,1,20,1, - 10,1,8,1,20,2,8,1,4,2,10,1,22,1,114,180, - 0,0,0,99,2,0,0,0,0,0,0,0,4,0,0,0, - 11,0,0,0,67,0,0,0,115,104,0,0,0,116,0,160, - 1,161,0,1,0,124,0,116,2,106,3,107,7,114,44,116, - 4,124,0,131,1,143,12,1,0,116,5,124,0,124,1,131, - 2,83,0,81,0,82,0,88,0,116,2,106,3,124,0,25, - 0,125,2,124,2,100,1,107,8,114,92,116,0,160,6,161, - 0,1,0,100,2,160,7,124,0,161,1,125,3,116,8,124, - 3,124,0,100,3,141,2,130,1,116,9,124,0,131,1,1, - 0,124,2,83,0,41,4,122,25,70,105,110,100,32,97,110, - 100,32,108,111,97,100,32,116,104,101,32,109,111,100,117,108, - 101,46,78,122,40,105,109,112,111,114,116,32,111,102,32,123, - 125,32,104,97,108,116,101,100,59,32,78,111,110,101,32,105, - 110,32,115,121,115,46,109,111,100,117,108,101,115,41,1,114, - 15,0,0,0,41,10,114,46,0,0,0,114,137,0,0,0, - 114,14,0,0,0,114,79,0,0,0,114,42,0,0,0,114, - 180,0,0,0,114,47,0,0,0,114,38,0,0,0,114,178, - 0,0,0,114,56,0,0,0,41,4,114,15,0,0,0,114, - 179,0,0,0,114,83,0,0,0,114,67,0,0,0,114,10, - 0,0,0,114,10,0,0,0,114,11,0,0,0,218,14,95, - 102,105,110,100,95,97,110,100,95,108,111,97,100,190,3,0, - 0,115,24,0,0,0,0,2,8,1,10,1,10,1,16,1, - 10,1,8,1,8,1,4,1,6,1,12,1,8,1,114,181, - 0,0,0,114,19,0,0,0,99,3,0,0,0,0,0,0, - 0,3,0,0,0,4,0,0,0,67,0,0,0,115,42,0, - 0,0,116,0,124,0,124,1,124,2,131,3,1,0,124,2, - 100,1,107,4,114,32,116,1,124,0,124,1,124,2,131,3, - 125,0,116,2,124,0,116,3,131,2,83,0,41,2,97,50, - 1,0,0,73,109,112,111,114,116,32,97,110,100,32,114,101, - 116,117,114,110,32,116,104,101,32,109,111,100,117,108,101,32, - 98,97,115,101,100,32,111,110,32,105,116,115,32,110,97,109, - 101,44,32,116,104,101,32,112,97,99,107,97,103,101,32,116, - 104,101,32,99,97,108,108,32,105,115,10,32,32,32,32,98, - 101,105,110,103,32,109,97,100,101,32,102,114,111,109,44,32, - 97,110,100,32,116,104,101,32,108,101,118,101,108,32,97,100, - 106,117,115,116,109,101,110,116,46,10,10,32,32,32,32,84, - 104,105,115,32,102,117,110,99,116,105,111,110,32,114,101,112, - 114,101,115,101,110,116,115,32,116,104,101,32,103,114,101,97, - 116,101,115,116,32,99,111,109,109,111,110,32,100,101,110,111, - 109,105,110,97,116,111,114,32,111,102,32,102,117,110,99,116, - 105,111,110,97,108,105,116,121,10,32,32,32,32,98,101,116, - 119,101,101,110,32,105,109,112,111,114,116,95,109,111,100,117, - 108,101,32,97,110,100,32,95,95,105,109,112,111,114,116,95, - 95,46,32,84,104,105,115,32,105,110,99,108,117,100,101,115, - 32,115,101,116,116,105,110,103,32,95,95,112,97,99,107,97, - 103,101,95,95,32,105,102,10,32,32,32,32,116,104,101,32, - 108,111,97,100,101,114,32,100,105,100,32,110,111,116,46,10, - 10,32,32,32,32,114,19,0,0,0,41,4,114,175,0,0, - 0,114,163,0,0,0,114,181,0,0,0,218,11,95,103,99, - 100,95,105,109,112,111,114,116,41,3,114,15,0,0,0,114, - 161,0,0,0,114,162,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,11,0,0,0,114,182,0,0,0,206,3,0, - 0,115,8,0,0,0,0,9,12,1,8,1,12,1,114,182, - 0,0,0,99,3,0,0,0,0,0,0,0,6,0,0,0, - 17,0,0,0,67,0,0,0,115,164,0,0,0,116,0,124, - 0,100,1,131,2,114,160,100,2,124,1,107,6,114,58,116, - 1,124,1,131,1,125,1,124,1,160,2,100,2,161,1,1, - 0,116,0,124,0,100,3,131,2,114,58,124,1,160,3,124, - 0,106,4,161,1,1,0,120,100,124,1,68,0,93,92,125, - 3,116,0,124,0,124,3,131,2,115,64,100,4,160,5,124, - 0,106,6,124,3,161,2,125,4,121,14,116,7,124,2,124, - 4,131,2,1,0,87,0,113,64,4,0,116,8,107,10,114, - 154,1,0,125,5,1,0,122,20,124,5,106,9,124,4,107, - 2,114,136,119,64,130,0,87,0,89,0,100,5,100,5,125, - 5,126,5,88,0,113,64,88,0,113,64,87,0,124,0,83, - 0,41,6,122,238,70,105,103,117,114,101,32,111,117,116,32, - 119,104,97,116,32,95,95,105,109,112,111,114,116,95,95,32, - 115,104,111,117,108,100,32,114,101,116,117,114,110,46,10,10, - 32,32,32,32,84,104,101,32,105,109,112,111,114,116,95,32, - 112,97,114,97,109,101,116,101,114,32,105,115,32,97,32,99, - 97,108,108,97,98,108,101,32,119,104,105,99,104,32,116,97, - 107,101,115,32,116,104,101,32,110,97,109,101,32,111,102,32, - 109,111,100,117,108,101,32,116,111,10,32,32,32,32,105,109, - 112,111,114,116,46,32,73,116,32,105,115,32,114,101,113,117, - 105,114,101,100,32,116,111,32,100,101,99,111,117,112,108,101, - 32,116,104,101,32,102,117,110,99,116,105,111,110,32,102,114, - 111,109,32,97,115,115,117,109,105,110,103,32,105,109,112,111, - 114,116,108,105,98,39,115,10,32,32,32,32,105,109,112,111, - 114,116,32,105,109,112,108,101,109,101,110,116,97,116,105,111, - 110,32,105,115,32,100,101,115,105,114,101,100,46,10,10,32, - 32,32,32,114,127,0,0,0,250,1,42,218,7,95,95,97, - 108,108,95,95,122,5,123,125,46,123,125,78,41,10,114,4, - 0,0,0,114,126,0,0,0,218,6,114,101,109,111,118,101, - 218,6,101,120,116,101,110,100,114,184,0,0,0,114,38,0, - 0,0,114,1,0,0,0,114,58,0,0,0,114,178,0,0, - 0,114,15,0,0,0,41,6,114,83,0,0,0,218,8,102, - 114,111,109,108,105,115,116,114,179,0,0,0,218,1,120,90, - 9,102,114,111,109,95,110,97,109,101,90,3,101,120,99,114, - 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,16, - 95,104,97,110,100,108,101,95,102,114,111,109,108,105,115,116, - 221,3,0,0,115,32,0,0,0,0,10,10,1,8,1,8, - 1,10,1,10,1,12,1,10,1,10,1,14,1,2,1,14, - 1,16,4,10,1,2,1,24,1,114,189,0,0,0,99,1, - 0,0,0,0,0,0,0,3,0,0,0,6,0,0,0,67, - 0,0,0,115,146,0,0,0,124,0,160,0,100,1,161,1, - 125,1,124,0,160,0,100,2,161,1,125,2,124,1,100,3, - 107,9,114,82,124,2,100,3,107,9,114,78,124,1,124,2, - 106,1,107,3,114,78,116,2,106,3,100,4,124,1,155,2, - 100,5,124,2,106,1,155,2,100,6,157,5,116,4,100,7, - 100,8,141,3,1,0,124,1,83,0,124,2,100,3,107,9, - 114,96,124,2,106,1,83,0,116,2,106,3,100,9,116,4, - 100,7,100,8,141,3,1,0,124,0,100,10,25,0,125,1, - 100,11,124,0,107,7,114,142,124,1,160,5,100,12,161,1, - 100,13,25,0,125,1,124,1,83,0,41,14,122,167,67,97, - 108,99,117,108,97,116,101,32,119,104,97,116,32,95,95,112, - 97,99,107,97,103,101,95,95,32,115,104,111,117,108,100,32, - 98,101,46,10,10,32,32,32,32,95,95,112,97,99,107,97, - 103,101,95,95,32,105,115,32,110,111,116,32,103,117,97,114, - 97,110,116,101,101,100,32,116,111,32,98,101,32,100,101,102, - 105,110,101,100,32,111,114,32,99,111,117,108,100,32,98,101, - 32,115,101,116,32,116,111,32,78,111,110,101,10,32,32,32, - 32,116,111,32,114,101,112,114,101,115,101,110,116,32,116,104, - 97,116,32,105,116,115,32,112,114,111,112,101,114,32,118,97, - 108,117,101,32,105,115,32,117,110,107,110,111,119,110,46,10, - 10,32,32,32,32,114,130,0,0,0,114,89,0,0,0,78, - 122,32,95,95,112,97,99,107,97,103,101,95,95,32,33,61, - 32,95,95,115,112,101,99,95,95,46,112,97,114,101,110,116, - 32,40,122,4,32,33,61,32,250,1,41,233,3,0,0,0, - 41,1,90,10,115,116,97,99,107,108,101,118,101,108,122,89, - 99,97,110,39,116,32,114,101,115,111,108,118,101,32,112,97, - 99,107,97,103,101,32,102,114,111,109,32,95,95,115,112,101, - 99,95,95,32,111,114,32,95,95,112,97,99,107,97,103,101, - 95,95,44,32,102,97,108,108,105,110,103,32,98,97,99,107, - 32,111,110,32,95,95,110,97,109,101,95,95,32,97,110,100, - 32,95,95,112,97,116,104,95,95,114,1,0,0,0,114,127, - 0,0,0,114,117,0,0,0,114,19,0,0,0,41,6,114, - 30,0,0,0,114,119,0,0,0,114,167,0,0,0,114,168, - 0,0,0,114,169,0,0,0,114,118,0,0,0,41,3,218, - 7,103,108,111,98,97,108,115,114,161,0,0,0,114,82,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0, - 0,218,17,95,99,97,108,99,95,95,95,112,97,99,107,97, - 103,101,95,95,252,3,0,0,115,30,0,0,0,0,7,10, - 1,10,1,8,1,18,1,22,2,10,1,4,1,8,1,6, - 2,6,2,10,1,8,1,8,1,14,1,114,193,0,0,0, - 99,5,0,0,0,0,0,0,0,9,0,0,0,5,0,0, - 0,67,0,0,0,115,166,0,0,0,124,4,100,1,107,2, - 114,18,116,0,124,0,131,1,125,5,110,36,124,1,100,2, - 107,9,114,30,124,1,110,2,105,0,125,6,116,1,124,6, - 131,1,125,7,116,0,124,0,124,7,124,4,131,3,125,5, - 124,3,115,150,124,4,100,1,107,2,114,84,116,0,124,0, - 160,2,100,3,161,1,100,1,25,0,131,1,83,0,124,0, - 115,92,124,5,83,0,116,3,124,0,131,1,116,3,124,0, - 160,2,100,3,161,1,100,1,25,0,131,1,24,0,125,8, - 116,4,106,5,124,5,106,6,100,2,116,3,124,5,106,6, - 131,1,124,8,24,0,133,2,25,0,25,0,83,0,110,12, - 116,7,124,5,124,3,116,0,131,3,83,0,100,2,83,0, - 41,4,97,215,1,0,0,73,109,112,111,114,116,32,97,32, - 109,111,100,117,108,101,46,10,10,32,32,32,32,84,104,101, - 32,39,103,108,111,98,97,108,115,39,32,97,114,103,117,109, - 101,110,116,32,105,115,32,117,115,101,100,32,116,111,32,105, - 110,102,101,114,32,119,104,101,114,101,32,116,104,101,32,105, - 109,112,111,114,116,32,105,115,32,111,99,99,117,114,114,105, - 110,103,32,102,114,111,109,10,32,32,32,32,116,111,32,104, - 97,110,100,108,101,32,114,101,108,97,116,105,118,101,32,105, - 109,112,111,114,116,115,46,32,84,104,101,32,39,108,111,99, - 97,108,115,39,32,97,114,103,117,109,101,110,116,32,105,115, - 32,105,103,110,111,114,101,100,46,32,84,104,101,10,32,32, - 32,32,39,102,114,111,109,108,105,115,116,39,32,97,114,103, - 117,109,101,110,116,32,115,112,101,99,105,102,105,101,115,32, - 119,104,97,116,32,115,104,111,117,108,100,32,101,120,105,115, - 116,32,97,115,32,97,116,116,114,105,98,117,116,101,115,32, - 111,110,32,116,104,101,32,109,111,100,117,108,101,10,32,32, - 32,32,98,101,105,110,103,32,105,109,112,111,114,116,101,100, - 32,40,101,46,103,46,32,96,96,102,114,111,109,32,109,111, - 100,117,108,101,32,105,109,112,111,114,116,32,60,102,114,111, - 109,108,105,115,116,62,96,96,41,46,32,32,84,104,101,32, - 39,108,101,118,101,108,39,10,32,32,32,32,97,114,103,117, - 109,101,110,116,32,114,101,112,114,101,115,101,110,116,115,32, - 116,104,101,32,112,97,99,107,97,103,101,32,108,111,99,97, - 116,105,111,110,32,116,111,32,105,109,112,111,114,116,32,102, - 114,111,109,32,105,110,32,97,32,114,101,108,97,116,105,118, - 101,10,32,32,32,32,105,109,112,111,114,116,32,40,101,46, - 103,46,32,96,96,102,114,111,109,32,46,46,112,107,103,32, - 105,109,112,111,114,116,32,109,111,100,96,96,32,119,111,117, - 108,100,32,104,97,118,101,32,97,32,39,108,101,118,101,108, - 39,32,111,102,32,50,41,46,10,10,32,32,32,32,114,19, - 0,0,0,78,114,117,0,0,0,41,8,114,182,0,0,0, - 114,193,0,0,0,218,9,112,97,114,116,105,116,105,111,110, - 114,159,0,0,0,114,14,0,0,0,114,79,0,0,0,114, - 1,0,0,0,114,189,0,0,0,41,9,114,15,0,0,0, - 114,192,0,0,0,218,6,108,111,99,97,108,115,114,187,0, - 0,0,114,162,0,0,0,114,83,0,0,0,90,8,103,108, - 111,98,97,108,115,95,114,161,0,0,0,90,7,99,117,116, - 95,111,102,102,114,10,0,0,0,114,10,0,0,0,114,11, - 0,0,0,218,10,95,95,105,109,112,111,114,116,95,95,23, - 4,0,0,115,26,0,0,0,0,11,8,1,10,2,16,1, - 8,1,12,1,4,3,8,1,18,1,4,1,4,4,26,3, - 32,2,114,196,0,0,0,99,1,0,0,0,0,0,0,0, - 2,0,0,0,3,0,0,0,67,0,0,0,115,38,0,0, - 0,116,0,160,1,124,0,161,1,125,1,124,1,100,0,107, - 8,114,30,116,2,100,1,124,0,23,0,131,1,130,1,116, - 3,124,1,131,1,83,0,41,2,78,122,25,110,111,32,98, - 117,105,108,116,45,105,110,32,109,111,100,117,108,101,32,110, - 97,109,101,100,32,41,4,114,142,0,0,0,114,146,0,0, - 0,114,70,0,0,0,114,141,0,0,0,41,2,114,15,0, - 0,0,114,82,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,218,18,95,98,117,105,108,116,105,110, - 95,102,114,111,109,95,110,97,109,101,58,4,0,0,115,8, - 0,0,0,0,1,10,1,8,1,12,1,114,197,0,0,0, - 99,2,0,0,0,0,0,0,0,12,0,0,0,12,0,0, - 0,67,0,0,0,115,244,0,0,0,124,1,97,0,124,0, - 97,1,116,2,116,1,131,1,125,2,120,86,116,1,106,3, - 160,4,161,0,68,0,93,72,92,2,125,3,125,4,116,5, - 124,4,124,2,131,2,114,28,124,3,116,1,106,6,107,6, - 114,62,116,7,125,5,110,18,116,0,160,8,124,3,161,1, - 114,28,116,9,125,5,110,2,113,28,116,10,124,4,124,5, - 131,2,125,6,116,11,124,6,124,4,131,2,1,0,113,28, - 87,0,116,1,106,3,116,12,25,0,125,7,120,54,100,5, - 68,0,93,46,125,8,124,8,116,1,106,3,107,7,114,144, - 116,13,124,8,131,1,125,9,110,10,116,1,106,3,124,8, - 25,0,125,9,116,14,124,7,124,8,124,9,131,3,1,0, - 113,120,87,0,121,12,116,13,100,2,131,1,125,10,87,0, - 110,24,4,0,116,15,107,10,114,206,1,0,1,0,1,0, - 100,3,125,10,89,0,110,2,88,0,116,14,124,7,100,2, - 124,10,131,3,1,0,116,13,100,4,131,1,125,11,116,14, - 124,7,100,4,124,11,131,3,1,0,100,3,83,0,41,6, - 122,250,83,101,116,117,112,32,105,109,112,111,114,116,108,105, - 98,32,98,121,32,105,109,112,111,114,116,105,110,103,32,110, - 101,101,100,101,100,32,98,117,105,108,116,45,105,110,32,109, - 111,100,117,108,101,115,32,97,110,100,32,105,110,106,101,99, - 116,105,110,103,32,116,104,101,109,10,32,32,32,32,105,110, - 116,111,32,116,104,101,32,103,108,111,98,97,108,32,110,97, - 109,101,115,112,97,99,101,46,10,10,32,32,32,32,65,115, - 32,115,121,115,32,105,115,32,110,101,101,100,101,100,32,102, - 111,114,32,115,121,115,46,109,111,100,117,108,101,115,32,97, - 99,99,101,115,115,32,97,110,100,32,95,105,109,112,32,105, - 115,32,110,101,101,100,101,100,32,116,111,32,108,111,97,100, - 32,98,117,105,108,116,45,105,110,10,32,32,32,32,109,111, - 100,117,108,101,115,44,32,116,104,111,115,101,32,116,119,111, - 32,109,111,100,117,108,101,115,32,109,117,115,116,32,98,101, - 32,101,120,112,108,105,99,105,116,108,121,32,112,97,115,115, - 101,100,32,105,110,46,10,10,32,32,32,32,114,167,0,0, - 0,114,20,0,0,0,78,114,55,0,0,0,41,1,114,167, - 0,0,0,41,16,114,46,0,0,0,114,14,0,0,0,114, - 13,0,0,0,114,79,0,0,0,218,5,105,116,101,109,115, - 114,171,0,0,0,114,69,0,0,0,114,142,0,0,0,114, - 75,0,0,0,114,152,0,0,0,114,128,0,0,0,114,133, - 0,0,0,114,1,0,0,0,114,197,0,0,0,114,5,0, - 0,0,114,70,0,0,0,41,12,218,10,115,121,115,95,109, - 111,100,117,108,101,218,11,95,105,109,112,95,109,111,100,117, - 108,101,90,11,109,111,100,117,108,101,95,116,121,112,101,114, - 15,0,0,0,114,83,0,0,0,114,93,0,0,0,114,82, - 0,0,0,90,11,115,101,108,102,95,109,111,100,117,108,101, - 90,12,98,117,105,108,116,105,110,95,110,97,109,101,90,14, - 98,117,105,108,116,105,110,95,109,111,100,117,108,101,90,13, - 116,104,114,101,97,100,95,109,111,100,117,108,101,90,14,119, - 101,97,107,114,101,102,95,109,111,100,117,108,101,114,10,0, - 0,0,114,10,0,0,0,114,11,0,0,0,218,6,95,115, - 101,116,117,112,65,4,0,0,115,50,0,0,0,0,9,4, - 1,4,3,8,1,20,1,10,1,10,1,6,1,10,1,6, - 2,2,1,10,1,14,3,10,1,10,1,10,1,10,2,10, - 1,16,3,2,1,12,1,14,2,10,1,12,3,8,1,114, - 201,0,0,0,99,2,0,0,0,0,0,0,0,2,0,0, - 0,3,0,0,0,67,0,0,0,115,38,0,0,0,116,0, - 124,0,124,1,131,2,1,0,116,1,106,2,160,3,116,4, - 161,1,1,0,116,1,106,2,160,3,116,5,161,1,1,0, - 100,1,83,0,41,2,122,48,73,110,115,116,97,108,108,32, - 105,109,112,111,114,116,101,114,115,32,102,111,114,32,98,117, - 105,108,116,105,110,32,97,110,100,32,102,114,111,122,101,110, - 32,109,111,100,117,108,101,115,78,41,6,114,201,0,0,0, - 114,14,0,0,0,114,166,0,0,0,114,109,0,0,0,114, - 142,0,0,0,114,152,0,0,0,41,2,114,199,0,0,0, - 114,200,0,0,0,114,10,0,0,0,114,10,0,0,0,114, - 11,0,0,0,218,8,95,105,110,115,116,97,108,108,112,4, - 0,0,115,6,0,0,0,0,2,10,2,12,1,114,202,0, - 0,0,99,0,0,0,0,0,0,0,0,1,0,0,0,4, - 0,0,0,67,0,0,0,115,32,0,0,0,100,1,100,2, - 108,0,125,0,124,0,97,1,124,0,160,2,116,3,106,4, - 116,5,25,0,161,1,1,0,100,2,83,0,41,3,122,57, - 73,110,115,116,97,108,108,32,105,109,112,111,114,116,101,114, - 115,32,116,104,97,116,32,114,101,113,117,105,114,101,32,101, - 120,116,101,114,110,97,108,32,102,105,108,101,115,121,115,116, - 101,109,32,97,99,99,101,115,115,114,19,0,0,0,78,41, - 6,218,26,95,102,114,111,122,101,110,95,105,109,112,111,114, - 116,108,105,98,95,101,120,116,101,114,110,97,108,114,115,0, - 0,0,114,202,0,0,0,114,14,0,0,0,114,79,0,0, - 0,114,1,0,0,0,41,1,114,203,0,0,0,114,10,0, - 0,0,114,10,0,0,0,114,11,0,0,0,218,27,95,105, - 110,115,116,97,108,108,95,101,120,116,101,114,110,97,108,95, - 105,109,112,111,114,116,101,114,115,120,4,0,0,115,6,0, - 0,0,0,3,8,1,4,1,114,204,0,0,0,41,2,78, - 78,41,1,78,41,2,78,114,19,0,0,0,41,51,114,3, - 0,0,0,114,115,0,0,0,114,12,0,0,0,114,16,0, - 0,0,114,51,0,0,0,114,29,0,0,0,114,36,0,0, - 0,114,17,0,0,0,114,18,0,0,0,114,41,0,0,0, - 114,42,0,0,0,114,45,0,0,0,114,56,0,0,0,114, - 58,0,0,0,114,68,0,0,0,114,74,0,0,0,114,77, - 0,0,0,114,84,0,0,0,114,95,0,0,0,114,96,0, - 0,0,114,102,0,0,0,114,78,0,0,0,218,6,111,98, - 106,101,99,116,90,9,95,80,79,80,85,76,65,84,69,114, - 128,0,0,0,114,133,0,0,0,114,136,0,0,0,114,91, - 0,0,0,114,80,0,0,0,114,140,0,0,0,114,141,0, - 0,0,114,81,0,0,0,114,142,0,0,0,114,152,0,0, - 0,114,157,0,0,0,114,163,0,0,0,114,165,0,0,0, - 114,170,0,0,0,114,175,0,0,0,90,15,95,69,82,82, - 95,77,83,71,95,80,82,69,70,73,88,114,177,0,0,0, - 114,180,0,0,0,114,181,0,0,0,114,182,0,0,0,114, - 189,0,0,0,114,193,0,0,0,114,196,0,0,0,114,197, - 0,0,0,114,201,0,0,0,114,202,0,0,0,114,204,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,218,8,60,109,111,100,117,108,101,62, - 25,0,0,0,115,96,0,0,0,4,0,4,2,8,8,8, - 7,4,2,4,3,16,4,14,68,14,21,14,19,8,19,8, - 19,8,11,14,8,8,11,8,12,8,16,8,36,14,27,14, - 101,16,26,6,3,10,45,14,60,8,17,8,17,8,25,8, - 29,8,23,8,16,14,73,14,77,14,13,8,9,8,9,10, - 47,8,20,4,1,8,2,8,27,8,16,10,15,8,31,8, - 27,18,35,8,7,8,47,8,8, + 0,0,218,17,95,99,97,108,99,95,95,95,112,97,99,107, + 97,103,101,95,95,248,3,0,0,115,30,0,0,0,0,7, + 10,1,10,1,8,1,18,1,22,2,10,1,4,1,8,1, + 6,2,6,2,10,1,8,1,8,1,14,1,114,192,0,0, + 0,99,5,0,0,0,0,0,0,0,9,0,0,0,5,0, + 0,0,67,0,0,0,115,166,0,0,0,124,4,100,1,107, + 2,114,18,116,0,124,0,131,1,125,5,110,36,124,1,100, + 2,107,9,114,30,124,1,110,2,105,0,125,6,116,1,124, + 6,131,1,125,7,116,0,124,0,124,7,124,4,131,3,125, + 5,124,3,115,150,124,4,100,1,107,2,114,84,116,0,124, + 0,160,2,100,3,161,1,100,1,25,0,131,1,83,0,124, + 0,115,92,124,5,83,0,116,3,124,0,131,1,116,3,124, + 0,160,2,100,3,161,1,100,1,25,0,131,1,24,0,125, + 8,116,4,106,5,124,5,106,6,100,2,116,3,124,5,106, + 6,131,1,124,8,24,0,133,2,25,0,25,0,83,0,110, + 12,116,7,124,5,124,3,116,0,131,3,83,0,100,2,83, + 0,41,4,97,215,1,0,0,73,109,112,111,114,116,32,97, + 32,109,111,100,117,108,101,46,10,10,32,32,32,32,84,104, + 101,32,39,103,108,111,98,97,108,115,39,32,97,114,103,117, + 109,101,110,116,32,105,115,32,117,115,101,100,32,116,111,32, + 105,110,102,101,114,32,119,104,101,114,101,32,116,104,101,32, + 105,109,112,111,114,116,32,105,115,32,111,99,99,117,114,114, + 105,110,103,32,102,114,111,109,10,32,32,32,32,116,111,32, + 104,97,110,100,108,101,32,114,101,108,97,116,105,118,101,32, + 105,109,112,111,114,116,115,46,32,84,104,101,32,39,108,111, + 99,97,108,115,39,32,97,114,103,117,109,101,110,116,32,105, + 115,32,105,103,110,111,114,101,100,46,32,84,104,101,10,32, + 32,32,32,39,102,114,111,109,108,105,115,116,39,32,97,114, + 103,117,109,101,110,116,32,115,112,101,99,105,102,105,101,115, + 32,119,104,97,116,32,115,104,111,117,108,100,32,101,120,105, + 115,116,32,97,115,32,97,116,116,114,105,98,117,116,101,115, + 32,111,110,32,116,104,101,32,109,111,100,117,108,101,10,32, + 32,32,32,98,101,105,110,103,32,105,109,112,111,114,116,101, + 100,32,40,101,46,103,46,32,96,96,102,114,111,109,32,109, + 111,100,117,108,101,32,105,109,112,111,114,116,32,60,102,114, + 111,109,108,105,115,116,62,96,96,41,46,32,32,84,104,101, + 32,39,108,101,118,101,108,39,10,32,32,32,32,97,114,103, + 117,109,101,110,116,32,114,101,112,114,101,115,101,110,116,115, + 32,116,104,101,32,112,97,99,107,97,103,101,32,108,111,99, + 97,116,105,111,110,32,116,111,32,105,109,112,111,114,116,32, + 102,114,111,109,32,105,110,32,97,32,114,101,108,97,116,105, + 118,101,10,32,32,32,32,105,109,112,111,114,116,32,40,101, + 46,103,46,32,96,96,102,114,111,109,32,46,46,112,107,103, + 32,105,109,112,111,114,116,32,109,111,100,96,96,32,119,111, + 117,108,100,32,104,97,118,101,32,97,32,39,108,101,118,101, + 108,39,32,111,102,32,50,41,46,10,10,32,32,32,32,114, + 19,0,0,0,78,114,117,0,0,0,41,8,114,181,0,0, + 0,114,192,0,0,0,218,9,112,97,114,116,105,116,105,111, + 110,114,159,0,0,0,114,14,0,0,0,114,79,0,0,0, + 114,1,0,0,0,114,188,0,0,0,41,9,114,15,0,0, + 0,114,191,0,0,0,218,6,108,111,99,97,108,115,114,186, + 0,0,0,114,162,0,0,0,114,83,0,0,0,90,8,103, + 108,111,98,97,108,115,95,114,161,0,0,0,90,7,99,117, + 116,95,111,102,102,114,10,0,0,0,114,10,0,0,0,114, + 11,0,0,0,218,10,95,95,105,109,112,111,114,116,95,95, + 19,4,0,0,115,26,0,0,0,0,11,8,1,10,2,16, + 1,8,1,12,1,4,3,8,1,18,1,4,1,4,4,26, + 3,32,2,114,195,0,0,0,99,1,0,0,0,0,0,0, + 0,2,0,0,0,3,0,0,0,67,0,0,0,115,38,0, + 0,0,116,0,160,1,124,0,161,1,125,1,124,1,100,0, + 107,8,114,30,116,2,100,1,124,0,23,0,131,1,130,1, + 116,3,124,1,131,1,83,0,41,2,78,122,25,110,111,32, + 98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,32, + 110,97,109,101,100,32,41,4,114,142,0,0,0,114,146,0, + 0,0,114,70,0,0,0,114,141,0,0,0,41,2,114,15, + 0,0,0,114,82,0,0,0,114,10,0,0,0,114,10,0, + 0,0,114,11,0,0,0,218,18,95,98,117,105,108,116,105, + 110,95,102,114,111,109,95,110,97,109,101,54,4,0,0,115, + 8,0,0,0,0,1,10,1,8,1,12,1,114,196,0,0, + 0,99,2,0,0,0,0,0,0,0,12,0,0,0,12,0, + 0,0,67,0,0,0,115,244,0,0,0,124,1,97,0,124, + 0,97,1,116,2,116,1,131,1,125,2,120,86,116,1,106, + 3,160,4,161,0,68,0,93,72,92,2,125,3,125,4,116, + 5,124,4,124,2,131,2,114,28,124,3,116,1,106,6,107, + 6,114,62,116,7,125,5,110,18,116,0,160,8,124,3,161, + 1,114,28,116,9,125,5,110,2,113,28,116,10,124,4,124, + 5,131,2,125,6,116,11,124,6,124,4,131,2,1,0,113, + 28,87,0,116,1,106,3,116,12,25,0,125,7,120,54,100, + 5,68,0,93,46,125,8,124,8,116,1,106,3,107,7,114, + 144,116,13,124,8,131,1,125,9,110,10,116,1,106,3,124, + 8,25,0,125,9,116,14,124,7,124,8,124,9,131,3,1, + 0,113,120,87,0,121,12,116,13,100,2,131,1,125,10,87, + 0,110,24,4,0,116,15,107,10,114,206,1,0,1,0,1, + 0,100,3,125,10,89,0,110,2,88,0,116,14,124,7,100, + 2,124,10,131,3,1,0,116,13,100,4,131,1,125,11,116, + 14,124,7,100,4,124,11,131,3,1,0,100,3,83,0,41, + 6,122,250,83,101,116,117,112,32,105,109,112,111,114,116,108, + 105,98,32,98,121,32,105,109,112,111,114,116,105,110,103,32, + 110,101,101,100,101,100,32,98,117,105,108,116,45,105,110,32, + 109,111,100,117,108,101,115,32,97,110,100,32,105,110,106,101, + 99,116,105,110,103,32,116,104,101,109,10,32,32,32,32,105, + 110,116,111,32,116,104,101,32,103,108,111,98,97,108,32,110, + 97,109,101,115,112,97,99,101,46,10,10,32,32,32,32,65, + 115,32,115,121,115,32,105,115,32,110,101,101,100,101,100,32, + 102,111,114,32,115,121,115,46,109,111,100,117,108,101,115,32, + 97,99,99,101,115,115,32,97,110,100,32,95,105,109,112,32, + 105,115,32,110,101,101,100,101,100,32,116,111,32,108,111,97, + 100,32,98,117,105,108,116,45,105,110,10,32,32,32,32,109, + 111,100,117,108,101,115,44,32,116,104,111,115,101,32,116,119, + 111,32,109,111,100,117,108,101,115,32,109,117,115,116,32,98, + 101,32,101,120,112,108,105,99,105,116,108,121,32,112,97,115, + 115,101,100,32,105,110,46,10,10,32,32,32,32,114,167,0, + 0,0,114,20,0,0,0,78,114,55,0,0,0,41,1,114, + 167,0,0,0,41,16,114,46,0,0,0,114,14,0,0,0, + 114,13,0,0,0,114,79,0,0,0,218,5,105,116,101,109, + 115,114,171,0,0,0,114,69,0,0,0,114,142,0,0,0, + 114,75,0,0,0,114,152,0,0,0,114,128,0,0,0,114, + 133,0,0,0,114,1,0,0,0,114,196,0,0,0,114,5, + 0,0,0,114,70,0,0,0,41,12,218,10,115,121,115,95, + 109,111,100,117,108,101,218,11,95,105,109,112,95,109,111,100, + 117,108,101,90,11,109,111,100,117,108,101,95,116,121,112,101, + 114,15,0,0,0,114,83,0,0,0,114,93,0,0,0,114, + 82,0,0,0,90,11,115,101,108,102,95,109,111,100,117,108, + 101,90,12,98,117,105,108,116,105,110,95,110,97,109,101,90, + 14,98,117,105,108,116,105,110,95,109,111,100,117,108,101,90, + 13,116,104,114,101,97,100,95,109,111,100,117,108,101,90,14, + 119,101,97,107,114,101,102,95,109,111,100,117,108,101,114,10, + 0,0,0,114,10,0,0,0,114,11,0,0,0,218,6,95, + 115,101,116,117,112,61,4,0,0,115,50,0,0,0,0,9, + 4,1,4,3,8,1,20,1,10,1,10,1,6,1,10,1, + 6,2,2,1,10,1,14,3,10,1,10,1,10,1,10,2, + 10,1,16,3,2,1,12,1,14,2,10,1,12,3,8,1, + 114,200,0,0,0,99,2,0,0,0,0,0,0,0,2,0, + 0,0,3,0,0,0,67,0,0,0,115,38,0,0,0,116, + 0,124,0,124,1,131,2,1,0,116,1,106,2,160,3,116, + 4,161,1,1,0,116,1,106,2,160,3,116,5,161,1,1, + 0,100,1,83,0,41,2,122,48,73,110,115,116,97,108,108, + 32,105,109,112,111,114,116,101,114,115,32,102,111,114,32,98, + 117,105,108,116,105,110,32,97,110,100,32,102,114,111,122,101, + 110,32,109,111,100,117,108,101,115,78,41,6,114,200,0,0, + 0,114,14,0,0,0,114,166,0,0,0,114,109,0,0,0, + 114,142,0,0,0,114,152,0,0,0,41,2,114,198,0,0, + 0,114,199,0,0,0,114,10,0,0,0,114,10,0,0,0, + 114,11,0,0,0,218,8,95,105,110,115,116,97,108,108,108, + 4,0,0,115,6,0,0,0,0,2,10,2,12,1,114,201, + 0,0,0,99,0,0,0,0,0,0,0,0,1,0,0,0, + 4,0,0,0,67,0,0,0,115,32,0,0,0,100,1,100, + 2,108,0,125,0,124,0,97,1,124,0,160,2,116,3,106, + 4,116,5,25,0,161,1,1,0,100,2,83,0,41,3,122, + 57,73,110,115,116,97,108,108,32,105,109,112,111,114,116,101, + 114,115,32,116,104,97,116,32,114,101,113,117,105,114,101,32, + 101,120,116,101,114,110,97,108,32,102,105,108,101,115,121,115, + 116,101,109,32,97,99,99,101,115,115,114,19,0,0,0,78, + 41,6,218,26,95,102,114,111,122,101,110,95,105,109,112,111, + 114,116,108,105,98,95,101,120,116,101,114,110,97,108,114,115, + 0,0,0,114,201,0,0,0,114,14,0,0,0,114,79,0, + 0,0,114,1,0,0,0,41,1,114,202,0,0,0,114,10, + 0,0,0,114,10,0,0,0,114,11,0,0,0,218,27,95, + 105,110,115,116,97,108,108,95,101,120,116,101,114,110,97,108, + 95,105,109,112,111,114,116,101,114,115,116,4,0,0,115,6, + 0,0,0,0,3,8,1,4,1,114,203,0,0,0,41,2, + 78,78,41,1,78,41,2,78,114,19,0,0,0,41,51,114, + 3,0,0,0,114,115,0,0,0,114,12,0,0,0,114,16, + 0,0,0,114,51,0,0,0,114,29,0,0,0,114,36,0, + 0,0,114,17,0,0,0,114,18,0,0,0,114,41,0,0, + 0,114,42,0,0,0,114,45,0,0,0,114,56,0,0,0, + 114,58,0,0,0,114,68,0,0,0,114,74,0,0,0,114, + 77,0,0,0,114,84,0,0,0,114,95,0,0,0,114,96, + 0,0,0,114,102,0,0,0,114,78,0,0,0,218,6,111, + 98,106,101,99,116,90,9,95,80,79,80,85,76,65,84,69, + 114,128,0,0,0,114,133,0,0,0,114,136,0,0,0,114, + 91,0,0,0,114,80,0,0,0,114,140,0,0,0,114,141, + 0,0,0,114,81,0,0,0,114,142,0,0,0,114,152,0, + 0,0,114,157,0,0,0,114,163,0,0,0,114,165,0,0, + 0,114,170,0,0,0,114,174,0,0,0,90,15,95,69,82, + 82,95,77,83,71,95,80,82,69,70,73,88,114,176,0,0, + 0,114,179,0,0,0,114,180,0,0,0,114,181,0,0,0, + 114,188,0,0,0,114,192,0,0,0,114,195,0,0,0,114, + 196,0,0,0,114,200,0,0,0,114,201,0,0,0,114,203, + 0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,0, + 0,0,114,11,0,0,0,218,8,60,109,111,100,117,108,101, + 62,25,0,0,0,115,96,0,0,0,4,0,4,2,8,8, + 8,7,4,2,4,3,16,4,14,68,14,21,14,19,8,19, + 8,19,8,11,14,8,8,11,8,12,8,16,8,36,14,27, + 14,101,16,26,6,3,10,45,14,60,8,17,8,17,8,25, + 8,29,8,23,8,16,14,73,14,77,14,13,8,9,8,9, + 10,47,8,16,4,1,8,2,8,27,8,16,10,15,8,31, + 8,27,18,35,8,7,8,47,8,8, }; From 1fdaf8b5545399221a01a8279e6470257214fcf6 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 11 Jul 2017 06:24:38 +0300 Subject: [PATCH 2/3] Use helpers in tests. --- Lib/test/test_import/__init__.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index a144090377147e..1b04de24dd16e4 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -23,8 +23,9 @@ EnvironmentVarGuard, TESTFN, check_warnings, forget, is_jython, make_legacy_pyc, rmtree, run_unittest, swap_attr, swap_item, temp_umask, unlink, unload, create_empty_file, cpython_only, TESTFN_UNENCODABLE, - temp_dir) + temp_dir, DirsOnSysPath) from test.support import script_helper +from test.test_importlib.util import uncache skip_if_dont_write_bytecode = unittest.skipIf( @@ -690,25 +691,18 @@ def test_absolute_import_without_future(self): "implicit absolute import") def test_import_from_non_package(self): - sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data', 'package2')) - try: + path = os.path.join(os.path.dirname(__file__), 'data', 'package2') + with uncache('submodule1', 'submodule2'), DirsOnSysPath(path): with self.assertRaises(ImportError): import submodule1 self.assertNotIn('submodule1', sys.modules) self.assertNotIn('submodule2', sys.modules) - finally: - del sys.path[0] def test_import_from_unloaded_package(self): - sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data')) - try: + with uncache('package2', 'package2.submodule1', 'package2.submodule2'), \ + DirsOnSysPath(os.path.join(os.path.dirname(__file__), 'data')): import package2.submodule1 package2.submodule1.submodule2 - finally: - del sys.path[0] - del sys.modules['package2.submodule1'] - del sys.modules['package2.submodule2'] - del sys.modules['package2'] class OverridingImportBuiltinTests(unittest.TestCase): From 633759ab8a7d474bd393f65a238658f7f293c951 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 11 Jul 2017 06:34:04 +0300 Subject: [PATCH 3/3] Trying to use blurb. --- Misc/NEWS | 4 ---- .../2017-07-11-06-31-32.bpo-30876.x35jZX.rst | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst diff --git a/Misc/NEWS b/Misc/NEWS index 589b2398268097..2f2fafff5ee910 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,10 +10,6 @@ What's New in Python 3.7.0 alpha 1? Core and Builtins ----------------- -- bpo-30876: Relative import from unloaded package now reimports the package - instead of failing with SystemError. Relative import from non-package - now fails with ImportError rather than SystemError. - - bpo-30814: Fixed a race condition when import a submodule from a package. - bpo-30736: The internal unicodedata database has been upgraded to Unicode diff --git a/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst b/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst new file mode 100644 index 00000000000000..4f3f4d29190728 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst @@ -0,0 +1,3 @@ +Relative import from unloaded package now reimports the package instead of +failing with SystemError. Relative import from non-package now fails with +ImportError rather than SystemError.