Skip to content

Commit

Permalink
Merge commit 'c81d892'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 11, 2021
2 parents 07d7651 + c81d892 commit 7a46f1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cssutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,28 @@ def createCSSStyleSheet(self, title, media):
"""
import warnings

warnings.warn("Deprecated, reason unknown", DeprecationWarning)
warning = (
"Deprecated, see "
"https://web.archive.org/web/20200701035537/"
"https://bitbucket.org/cthedot/cssutils/issues/69#comment-30669799"
)
warnings.warn(warning, DeprecationWarning)
return css.CSSStyleSheet(title=title, media=media)

def createDocument(self, *args, **kwargs):
# sometimes cssutils is picked automatically for
# xml.dom.getDOMImplementation, so provide an implementation
# see (https://web.archive.org/web/20200701035537/
# https://bitbucket.org/cthedot/cssutils/issues/69)
import xml.dom.minidom as minidom

return minidom.DOMImplementation().createDocument(*args, **kwargs)

def createDocumentType(self, *args, **kwargs):
# sometimes cssutils is picked automatically for
# xml.dom.getDOMImplementation, so provide an implementation
# see (https://web.archive.org/web/20200701035537/
# https://bitbucket.org/cthedot/cssutils/issues/69)
import xml.dom.minidom as minidom

return minidom.DOMImplementation().createDocumentType(*args, **kwargs)
Expand Down
1 change: 1 addition & 0 deletions cssutils/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def _compile_regexes(self, dictionary):
# Compiling them now will slow down the cssutils import time,
# even if cssutils is not needed. Thus, lazily compile them the
# first time they're needed.
# https://web.archive.org/web/20200701035537/https://bitbucket.org/cthedot/cssutils/issues/69)
value = util.LazyRegex('^(?:%s)$' % value, re.I)
dictionary[key] = value

Expand Down

0 comments on commit 7a46f1e

Please sign in to comment.