diff options
author | Jakub Wilk <jwilk@jwilk.net> | 2017-03-17 20:39:38 +0100 |
---|---|---|
committer | Jakub Wilk <jwilk@jwilk.net> | 2017-03-17 21:53:41 +0100 |
commit | 728127054d2ff8937b64b1479b26bb4a113c0091 (patch) | |
tree | 91a519ddb41eca8eec6f3d6e4ec00f471505e0c3 | |
parent | decc2f0ee4dbf3223f1005f97de110d2ed0d1b44 (diff) | |
download | python-lxml-728127054d2ff8937b64b1479b26bb4a113c0091.tar.gz |
remove conditional imports of the set module
These were needed for Python 2.3, which is no longer supported.
-rw-r--r-- | doc/mklatex.py | 6 | ||||
-rw-r--r-- | src/lxml/ElementInclude.py | 6 | ||||
-rw-r--r-- | src/lxml/html/defs.py | 6 | ||||
-rw-r--r-- | test.py | 5 |
4 files changed, 0 insertions, 23 deletions
diff --git a/doc/mklatex.py b/doc/mklatex.py index e8b77012..f650b16a 100644 --- a/doc/mklatex.py +++ b/doc/mklatex.py @@ -5,12 +5,6 @@ from docstructure import SITE_STRUCTURE, BASENAME_MAP import os, shutil, re, sys, datetime -try: - set -except NameError: - # Python 2.3 - from sets import Set as set - TARGET_FILE = "lxmldoc.tex" RST2LATEX_OPTIONS = " ".join([ diff --git a/src/lxml/ElementInclude.py b/src/lxml/ElementInclude.py index f7806709..ab2ee879 100644 --- a/src/lxml/ElementInclude.py +++ b/src/lxml/ElementInclude.py @@ -60,12 +60,6 @@ except ImportError: from urllib.parse import urljoin from urllib.request import urlopen -try: - set -except NameError: - # Python 2.3 - from sets import Set as set - XINCLUDE = "{http://www.w3.org/2001/XInclude}" XINCLUDE_INCLUDE = XINCLUDE + "include" diff --git a/src/lxml/html/defs.py b/src/lxml/html/defs.py index e6ca5882..caf6b21b 100644 --- a/src/lxml/html/defs.py +++ b/src/lxml/html/defs.py @@ -6,12 +6,6 @@ # and http://www.w3.org/community/webed/wiki/HTML/New_HTML5_Elements # for html5_tags. -try: - frozenset -except NameError: - from sets import Set as frozenset - - empty_tags = frozenset([ 'area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param']) @@ -73,11 +73,6 @@ import unittest import traceback try: - set -except NameError: - from sets import Set as set - -try: # Python >=2.7 and >=3.2 from unittest.runner import _TextTestResult except ImportError: |