Skip to content

Commit

Permalink
Merge pull request #7380 from pymedusa/release/release-0.3.7
Browse files Browse the repository at this point in the history
Release 0.3.7
  • Loading branch information
medariox authored Nov 18, 2019
2 parents 80b323e + 28a47fb commit fcb5a19
Show file tree
Hide file tree
Showing 53 changed files with 3,661 additions and 1,622 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.3.7 (2019-11-18)

#### Fixes
- Fixed broken TheTVDB caused by API v3 changes ([#7355](https://github.com/pymedusa/Medusa/pull/7355))
- DisplayShow: Fixed Xem and Medusa season exceptions not shown anymore ([#7360](https://github.com/pymedusa/Medusa/pull/7360))

-----

## 0.3.6 (2019-11-11)

#### New Features
Expand Down
6 changes: 3 additions & 3 deletions ext/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ ext | `adba` | pymedusa/[6efeff3](https://github.com/pymedusa/adba/tree/6efeff3a
ext | <code><b>appdirs</b>.py</code> | [1.4.3](https://pypi.org/project/appdirs/1.4.3/) | `simpleanidb`, `subliminal` (cli only) | -
ext | `attrs` | [18.2.0](https://pypi.org/project/attrs/18.2.0/) | `imdbpie` | Module: `attr`
ext | `babelfish` | [f403000](https://github.com/Diaoul/babelfish/tree/f403000dd63092cfaaae80be9f309fd85c7f20c9) | **`medusa`**, `guessit`, `knowit`, `subliminal` | -
**ext2** | <code><b>backports.functools_lru_cache</b>.py</code> | [1.5](https://pypi.org/project/backports.functools_lru_cache/1.5/) | `soupsieve` | -
**ext2** | <code><b>backports.functools_lru_cache</b>.py</code> | [1.6.1](https://pypi.org/project/backports.functools_lru_cache/1.6.1/) | `soupsieve` | -
**ext2** | <code><b>backports_abc</b>.py</code> | [0.5](https://pypi.org/project/backports_abc/0.5/) | `tornado` | -
**ext2 ext3** | `beautifulsoup4` | [4.7.1](https://pypi.org/project/beautifulsoup4/4.7.1/) | **`medusa`**, `subliminal` | Module: `bs4`
**ext2 ext3** | `beautifulsoup4` | [4.8.1](https://pypi.org/project/beautifulsoup4/4.8.1/) | **`medusa`**, `subliminal` | Module: `bs4`
ext | `bencode.py` | [2.1.0](https://pypi.org/project/bencode.py/2.1.0/) | **`medusa`** | Module: `bencode`
ext | `boto` | [2.48.0](https://pypi.org/project/boto/2.48.0/) | `imdbpie` | -
ext | `CacheControl` | [0.12.5](https://pypi.org/project/CacheControl/0.12.5/) | **`medusa`** | Module: `cachecontrol`
Expand Down Expand Up @@ -60,7 +60,7 @@ ext | `requests-oauthlib` | [1.2.0](https://pypi.org/project/requests-oauthlib/1
**ext3** | `sgmllib3k` | [1.0.0](https://pypi.org/project/sgmllib3k/1.0.0/) | `feedparser` | File: `sgmllib.py`
**ext2** | <code><b>singledispatch</b>.py</code><br>`singledispatch_helpers.py` | [3.4.0.3](https://pypi.org/project/singledispatch/3.4.0.3/) | `tornado` | -
ext | <code><b>six</b>.py</code> | [1.12.0](https://pypi.org/project/six/1.12.0/) | **`medusa`**, `adba`, `configobj`, `guessit`, `html5lib`, `imdbpie`, `Js2Py`, `knowit`, `python-dateutil`, `rebulk`, `subliminal`, `tvdbapiv2`, `validators` | -
ext | `soupsieve` | [1.7](https://pypi.org/project/soupsieve/1.7/) | `beautifulsoup4` | -
ext | `soupsieve` | [1.9.5](https://pypi.org/project/soupsieve/1.9.5/) | `beautifulsoup4` | -
ext | `stevedore` | [1.30.1](https://pypi.org/project/stevedore/1.30.1/) | `subliminal` | -
ext | `subliminal` | [develop@6ac2fa2](https://github.com/Diaoul/subliminal/tree/6ac2fa23ee5baa7d8452552edaa7c4a8a00d237a) | **`medusa`** | -
ext | `tornado` | [5.1.1](https://pypi.org/project/tornado/5.1.1/) | **`medusa`**, `tornroutes` | -
Expand Down
72 changes: 42 additions & 30 deletions ext/soupsieve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,37 @@
from . import css_parser as cp
from . import css_match as cm
from . import css_types as ct
from .util import DEBUG
from .util import DEBUG, deprecated, SelectorSyntaxError # noqa: F401

__all__ = (
'SoupSieve', 'compile', 'purge', 'DEBUG',
'comments', 'icomments', 'closest', 'select', 'select_one',
'iselect', 'match', 'filter'
'DEBUG', 'SelectorSyntaxError', 'SoupSieve',
'closest', 'comments', 'compile', 'filter', 'icomments',
'iselect', 'match', 'select', 'select_one'
)

SoupSieve = cm.SoupSieve


def compile(pattern, namespaces=None, flags=0): # noqa: A001
def compile(pattern, namespaces=None, flags=0, **kwargs): # noqa: A001
"""Compile CSS pattern."""

if namespaces is None:
namespaces = ct.Namespaces()
if not isinstance(namespaces, ct.Namespaces):
namespaces = ct.Namespaces(**(namespaces))
if namespaces is not None:
namespaces = ct.Namespaces(**namespaces)

custom = kwargs.get('custom')
if custom is not None:
custom = ct.CustomSelectors(**custom)

if isinstance(pattern, SoupSieve):
if flags != pattern.flags:
raise ValueError("Cannot change flags of a pattern")
elif namespaces != pattern.namespaces:
raise ValueError("Cannot change namespaces of a pattern")
if flags:
raise ValueError("Cannot process 'flags' argument on a compiled selector list")
elif namespaces is not None:
raise ValueError("Cannot process 'namespaces' argument on a compiled selector list")
elif custom is not None:
raise ValueError("Cannot process 'custom' argument on a compiled selector list")
return pattern

return cp._cached_css_compile(pattern, namespaces, flags)
return cp._cached_css_compile(pattern, namespaces, custom, flags)


def purge():
Expand All @@ -65,51 +69,59 @@ def purge():
cp._purge_cache()


def closest(select, tag, namespaces=None, flags=0):
def closest(select, tag, namespaces=None, flags=0, **kwargs):
"""Match closest ancestor."""

return compile(select, namespaces, flags).closest(tag)
return compile(select, namespaces, flags, **kwargs).closest(tag)


def match(select, tag, namespaces=None, flags=0):
def match(select, tag, namespaces=None, flags=0, **kwargs):
"""Match node."""

return compile(select, namespaces, flags).match(tag)
return compile(select, namespaces, flags, **kwargs).match(tag)


def filter(select, iterable, namespaces=None, flags=0): # noqa: A001
def filter(select, iterable, namespaces=None, flags=0, **kwargs): # noqa: A001
"""Filter list of nodes."""

return compile(select, namespaces, flags).filter(iterable)
return compile(select, namespaces, flags, **kwargs).filter(iterable)


def comments(tag, limit=0, flags=0):
@deprecated("'comments' is not related to CSS selectors and will be removed in the future.")
def comments(tag, limit=0, flags=0, **kwargs):
"""Get comments only."""

return list(icomments(tag, limit, flags))
return [comment for comment in cm.CommentsMatch(tag).get_comments(limit)]


def icomments(tag, limit=0, flags=0):
@deprecated("'icomments' is not related to CSS selectors and will be removed in the future.")
def icomments(tag, limit=0, flags=0, **kwargs):
"""Iterate comments only."""

for comment in cm.get_comments(tag, limit):
for comment in cm.CommentsMatch(tag).get_comments(limit):
yield comment


def select_one(select, tag, namespaces=None, flags=0):
def select_one(select, tag, namespaces=None, flags=0, **kwargs):
"""Select a single tag."""

return compile(select, namespaces, flags).select_one(tag)
return compile(select, namespaces, flags, **kwargs).select_one(tag)


def select(select, tag, namespaces=None, limit=0, flags=0):
def select(select, tag, namespaces=None, limit=0, flags=0, **kwargs):
"""Select the specified tags."""

return compile(select, namespaces, flags).select(tag, limit)
return compile(select, namespaces, flags, **kwargs).select(tag, limit)


def iselect(select, tag, namespaces=None, limit=0, flags=0):
def iselect(select, tag, namespaces=None, limit=0, flags=0, **kwargs):
"""Iterate the specified tags."""

for el in compile(select, namespaces, flags).iselect(tag, limit):
for el in compile(select, namespaces, flags, **kwargs).iselect(tag, limit):
yield el


def escape(ident):
"""Escape identifier."""

return cp.escape(ident)
2 changes: 1 addition & 1 deletion ext/soupsieve/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ def parse_version(ver, pre=False):
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(1, 7, 0, "final")
__version_info__ = Version(1, 9, 5, "final")
__version__ = __version_info__._get_canonical()
Loading

0 comments on commit fcb5a19

Please sign in to comment.