diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2022-12-23 20:17:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 20:17:24 (GMT) |
commit | 745545b5bb847023f90505bf9caa983463413780 (patch) | |
tree | 1b6db7fc6c92542ac9bc56769524ee26ce9eb10e /Lib/xml/sax/__init__.py | |
parent | c5726b727e26b81a267933654cf26b760a90d9aa (diff) | |
download | cpython-745545b5bb847023f90505bf9caa983463413780.zip cpython-745545b5bb847023f90505bf9caa983463413780.tar.gz cpython-745545b5bb847023f90505bf9caa983463413780.tar.bz2 |
gh-99482: remove `jython` compatibility parts from stdlib and tests (#99484)
Diffstat (limited to 'Lib/xml/sax/__init__.py')
-rw-r--r-- | Lib/xml/sax/__init__.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py index 17b7587..b657310 100644 --- a/Lib/xml/sax/__init__.py +++ b/Lib/xml/sax/__init__.py @@ -60,11 +60,7 @@ if _false: import os, sys if not sys.flags.ignore_environment and "PY_SAX_PARSER" in os.environ: default_parser_list = os.environ["PY_SAX_PARSER"].split(",") -del os - -_key = "python.xml.sax.parser" -if sys.platform[:4] == "java" and sys.registry.containsKey(_key): - default_parser_list = sys.registry.getProperty(_key).split(",") +del os, sys def make_parser(parser_list=()): @@ -93,15 +89,6 @@ def make_parser(parser_list=()): # --- Internal utility methods used by make_parser -if sys.platform[ : 4] == "java": - def _create_parser(parser_name): - from org.python.core import imp - drv_module = imp.importName(parser_name, 0, globals()) - return drv_module.create_parser() - -else: - def _create_parser(parser_name): - drv_module = __import__(parser_name,{},{},['create_parser']) - return drv_module.create_parser() - -del sys +def _create_parser(parser_name): + drv_module = __import__(parser_name,{},{},['create_parser']) + return drv_module.create_parser() |