Skip to content

Commit

Permalink
Merge 9694beb into 7afd64d
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 9, 2021
2 parents 7afd64d + 9694beb commit 275464c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python-version: 2.7
- os: ubuntu-latest
python-version: 3.6
- os: ubuntu-latest
Expand Down
14 changes: 3 additions & 11 deletions rnc2rng/parser.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
from __future__ import print_function
from codecs import BOM_UTF16_BE, BOM_UTF16_LE
from urllib.request import urlopen
from urllib.parse import urljoin, urlparse

import rply, sys, os
from codecs import BOM_UTF16_BE, BOM_UTF16_LE
if sys.version_info[0] < 3:
from urllib2 import urlopen as _urlopen
from urlparse import urljoin, urlparse
from contextlib import closing
def urlopen(f):
return closing(_urlopen(f))
else:
from urllib.request import urlopen
from urllib.parse import urljoin, urlparse

KEYWORDS = set([
'attribute', 'datatypes', 'default', 'div', 'element', 'empty', 'external',
Expand Down
6 changes: 1 addition & 5 deletions rnc2rng/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
PARAM, PARENT, REF, ROOT, SEQ, SOME, TEXT,
)

import sys
if sys.version_info[0] < 3:
import cgi as html
else:
import html
import sys, html

QUANTS = {SOME: 'oneOrMore', MAYBE: 'optional', ANY: 'zeroOrMore'}
TYPELIB_NS = 'http://www.w3.org/2001/XMLSchema-datatypes'
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
'Operating System :: OS Independent',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing :: Markup :: XML',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
Expand All @@ -32,6 +30,5 @@
'rnc2rng = rnc2rng.__main__:main',
],
},
use_2to3=True,
install_requires=['rply'],
)

0 comments on commit 275464c

Please sign in to comment.