diff --git a/CHANGES.md b/CHANGES.md index 5a6d4ba..dfbacbd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ * Change remind user when testing Notifications config / Discord to update URL * Fix incorrect text for some drop down list items in the apiBuilder view that affected some browsers * Update attr 20.1.0.dev0 (4bd6827) to 20.2.0 (4f74fba) -* Update Beautiful Soup 4.8.2 (r559) to 4.9.1 (r585) +* Update Beautiful Soup 4.8.2 (r559) to 4.9.2 (r590) * Update dateutil 2.8.1 (43b7838) to 2.8.1 (c496b4f) * Change add diskcache_py3 5.0.1 (9670fbb) * Change add diskcache_py2 4.1.0 (b0451e0) @@ -25,6 +25,8 @@ [develop changelog] +* Update Beautiful Soup 4.8.2 (r559) to 4.9.1 (r585) +* Fix update Soupsieve (05086ef) broke MC and TVC browse cards ### 0.22.2 (2020-09-25 09:00:00 UTC) diff --git a/lib/bs4_py2/__init__.py b/lib/bs4_py2/__init__.py index a2c839c..fd33ad1 100644 --- a/lib/bs4_py2/__init__.py +++ b/lib/bs4_py2/__init__.py @@ -15,7 +15,7 @@ documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ """ __author__ = "Leonard Richardson (leonardr@segfault.org)" -__version__ = "4.9.1" +__version__ = "4.9.2" __copyright__ = "Copyright (c) 2004-2020 Leonard Richardson" # Use of this source code is governed by the MIT license. __license__ = "MIT" @@ -253,7 +253,9 @@ class BeautifulSoup(Tag): if not original_builder and not ( original_features == builder.NAME or original_features in builder.ALTERNATE_NAMES - ): + ) and markup: + # The user did not tell us which TreeBuilder to use, + # and we had to guess. Issue a warning. if builder.is_xml: markup_type = "XML" else: @@ -496,13 +498,13 @@ class BeautifulSoup(Tag): container = self.string_container(subclass) return container(s) - def insert_before(self, successor): + def insert_before(self, *args): """This method is part of the PageElement API, but `BeautifulSoup` doesn't implement it because there is nothing before or after it in the parse tree. """ raise NotImplementedError("BeautifulSoup objects don't support insert_before().") - def insert_after(self, successor): + def insert_after(self, *args): """This method is part of the PageElement API, but `BeautifulSoup` doesn't implement it because there is nothing before or after it in the parse tree. """ diff --git a/lib/bs4_py2/element.py b/lib/bs4_py2/element.py index a288cd9..9fae609 100644 --- a/lib/bs4_py2/element.py +++ b/lib/bs4_py2/element.py @@ -457,6 +457,11 @@ class PageElement(object): :param tags: A list of PageElements. """ + if isinstance(tags, Tag): + # Calling self.append() on another tag's contents will change + # the list we're iterating over. Make a list that won't + # change. + tags = list(tags.contents) for tag in tags: self.append(tag) diff --git a/lib/bs4_py3/__init__.py b/lib/bs4_py3/__init__.py index e9386ae..9b99e7e 100644 --- a/lib/bs4_py3/__init__.py +++ b/lib/bs4_py3/__init__.py @@ -15,7 +15,7 @@ documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ """ __author__ = "Leonard Richardson (leonardr@segfault.org)" -__version__ = "4.9.1" +__version__ = "4.9.2" __copyright__ = "Copyright (c) 2004-2020 Leonard Richardson" # Use of this source code is governed by the MIT license. __license__ = "MIT" @@ -253,7 +253,9 @@ class BeautifulSoup(Tag): if not original_builder and not ( original_features == builder.NAME or original_features in builder.ALTERNATE_NAMES - ): + ) and markup: + # The user did not tell us which TreeBuilder to use, + # and we had to guess. Issue a warning. if builder.is_xml: markup_type = "XML" else: @@ -496,13 +498,13 @@ class BeautifulSoup(Tag): container = self.string_container(subclass) return container(s) - def insert_before(self, successor): + def insert_before(self, *args): """This method is part of the PageElement API, but `BeautifulSoup` doesn't implement it because there is nothing before or after it in the parse tree. """ raise NotImplementedError("BeautifulSoup objects don't support insert_before().") - def insert_after(self, successor): + def insert_after(self, *args): """This method is part of the PageElement API, but `BeautifulSoup` doesn't implement it because there is nothing before or after it in the parse tree. """ diff --git a/lib/bs4_py3/element.py b/lib/bs4_py3/element.py index 8db86fb..228ab0a 100644 --- a/lib/bs4_py3/element.py +++ b/lib/bs4_py3/element.py @@ -457,6 +457,11 @@ class PageElement(object): :param tags: A list of PageElements. """ + if isinstance(tags, Tag): + # Calling self.append() on another tag's contents will change + # the list we're iterating over. Make a list that won't + # change. + tags = list(tags.contents) for tag in tags: self.append(tag) diff --git a/lib/rarfile/rarfile.pyi b/lib/rarfile/rarfile.pyi index efdd563..daac08d 100644 --- a/lib/rarfile/rarfile.pyi +++ b/lib/rarfile/rarfile.pyi @@ -1,6 +1,10 @@ from io import RawIOBase from typing import Any, Optional +UNRAR_TOOL : str = "unrar" +PATH_SEP : str = '/' +def custom_check(cmd: Any, ignore_retcode : bool = False): ... + class AES_CBC_Decrypt: decrypt: Any = ... def __init__(self, key: Any, iv: Any) -> None: ... @@ -63,6 +67,13 @@ class RarInfo: class RarFile: comment: Any = ... + _rarfile: Any = ... + _charset: Any = ... + _info_callback: Any = ... + _crc_check: Any = ... + _password: Any = ... + _file_parser: Any = ... + _strict: bool = ... def __init__(self, rarfile: Any, mode: str = ..., charset: Optional[Any] = ..., info_callback: Optional[Any] = ..., crc_check: bool = ..., errors: str = ...) -> None: ... def __enter__(self): ... def __exit__(self, typ: Any, value: Any, traceback: Any) -> None: ... @@ -80,9 +91,27 @@ class RarFile: def extractall(self, path: Optional[Any] = ..., members: Optional[Any] = ..., pwd: Optional[Any] = ...) -> None: ... def testrar(self) -> None: ... def strerror(self): ... + def _parse(self) -> None: ... + def _extract(self, fnlist: Any, path: Optional[Any] = ..., psw: Optional[Any] = ...) -> None: ... class CommonParser: + _main: Any = ... + _hdrenc_main: Any = ... + _needs_password: bool = ... + _fd: Any = ... + _expect_sig: Any = ... + _parse_error: Any = ... + _password: Any = ... comment: Any = ... + _rarfile: Any = ... + _crc_check: Any = ... + _charset: Any = ... + _strict: Any = ... + _info_callback: Any = ... + _info_list: Any = ... + _info_map: Any = ... + _vol_list: Any = ... + _sfx_offset: Any = ... def __init__(self, rarfile: Any, password: Any, crc_check: Any, charset: Any, strict: Any, info_cb: Any, sfx_offset: Any) -> None: ... def has_header_encryption(self): ... def setpassword(self, psw: Any) -> None: ... @@ -92,8 +121,19 @@ class CommonParser: def infolist(self): ... def getinfo(self, member: Any): ... def parse(self) -> None: ... + def _parse_real(self) -> None: ... def process_entry(self, fd: Any, item: Any) -> None: ... + def _decrypt_header(self, fd: Any) -> None: ... + def _parse_block_header(self, fd: Any) -> None: ... + def _open_hack(self, inf: Any, psw: Any) -> None: ... + def _parse_header(self, fd: Any): ... + def _next_volname(self, volfile: Any): ... + def _set_error(self, msg: Any, *args: Any) -> None: ... def open(self, inf: Any, psw: Any): ... + def _open_clear(self, inf: Any): ... + def _open_hack_core(self, inf: Any, psw: Any, prefix: Any, suffix: Any): ... + def _open_unrar_membuf(self, memfile: Any, inf: Any, psw: Any): ... + def _open_unrar(self, rarfile: Any, inf: Any, psw: Optional[Any] = ..., tmpfile: Optional[Any] = ..., force_file: bool = ...): ... class Rar3Info(RarInfo): extract_version: int = ... @@ -103,12 +143,26 @@ class Rar3Info(RarInfo): header_size: Any = ... header_offset: Any = ... data_offset: Any = ... + _md_class: Any = ... + _md_expect: Any = ... file_redir: Any = ... blake2sp_hash: Any = ... + def _must_disable_hack(self): ... class RAR3Parser(CommonParser): + _expect_sig: Any = ... + _last_aes_key: Any = ... + def _decrypt_header(self, fd: Any): ... + def _parse_block_header(self, fd: Any): ... + def _parse_file_header(self, h: Any, hdata: Any, pos: Any): ... + def _parse_subblocks(self, h: Any, hdata: Any, pos: Any): ... + def _read_comment_v3(self, inf: Any, psw: Optional[Any] = ...): ... + def _decode(self, val: Any): ... + def _decode_comment(self, val: Any): ... comment: Any = ... + _needs_password: bool = ... def process_entry(self, fd: Any, item: Any) -> None: ... + def _open_hack(self, inf: Any, psw: Any): ... class Rar5Info(RarInfo): extract_version: int = ... @@ -121,6 +175,9 @@ class Rar5Info(RarInfo): add_size: int = ... block_extra_size: int = ... volume_number: Any = ... + _md_class: Any = ... + _md_expect: Any = ... + def _must_disable_hack(self): ... class Rar5BaseFile(Rar5Info): type: int = ... @@ -131,6 +188,7 @@ class Rar5BaseFile(Rar5Info): file_owner: Any = ... file_version: Any = ... blake2sp_hash: Any = ... + def _must_disable_hack(self): ... class Rar5FileInfo(Rar5BaseFile): type: Any = ... @@ -142,6 +200,7 @@ class Rar5MainInfo(Rar5Info): type: Any = ... main_flags: Any = ... main_volume_number: Any = ... + def _must_disable_hack(self): ... class Rar5EncryptionInfo(Rar5Info): type: Any = ... @@ -157,7 +216,28 @@ class Rar5EndArcInfo(Rar5Info): endarc_flags: Any = ... class RAR5Parser(CommonParser): + _expect_sig: Any = ... + _hdrenc_main: Any = ... + _last_aes256_key: Any = ... + def _gen_key(self, kdf_count: Any, salt: Any): ... + def _decrypt_header(self, fd: Any): ... + def _parse_block_header(self, fd: Any): ... + def _parse_block_common(self, h: Any, hdata: Any): ... + def _parse_main_block(self, h: Any, hdata: Any, pos: Any): ... + def _parse_file_block(self, h: Any, hdata: Any, pos: Any): ... + def _parse_endarc_block(self, h: Any, hdata: Any, pos: Any): ... + def _parse_encryption_block(self, h: Any, hdata: Any, pos: Any): ... + def _process_file_extra(self, h: Any, xdata: Any) -> None: ... + def _parse_file_xtime(self, h: Any, xdata: Any, pos: Any) -> None: ... + def _parse_file_encryption(self, h: Any, xdata: Any, pos: Any) -> None: ... + def _parse_file_hash(self, h: Any, xdata: Any, pos: Any) -> None: ... + def _parse_file_version(self, h: Any, xdata: Any, pos: Any) -> None: ... + def _parse_file_redir(self, h: Any, xdata: Any, pos: Any) -> None: ... + def _parse_file_owner(self, h: Any, xdata: Any, pos: Any) -> None: ... def process_entry(self, fd: Any, item: Any) -> None: ... + comment: Any = ... + def _load_comment(self, fd: Any, item: Any) -> None: ... + def _open_hack(self, inf: Any, psw: Any): ... class UnicodeFilename: std_name: Any = ... @@ -174,24 +254,50 @@ class UnicodeFilename: class RarExtFile(RawIOBase): name: Any = ... mode: str = ... + _parser: Any = ... + _inf: Any = ... + _fd: Any = ... + _remain: int = ... + _returncode: int = ... + _md_context: Any = ... def __init__(self, parser: Any, inf: Any) -> None: ... + def _open(self) -> None: ... def read(self, cnt: Optional[Any] = ...): ... + def _check(self) -> None: ... + def _read(self, cnt: Any) -> None: ... def close(self) -> None: ... def __del__(self) -> None: ... def readinto(self, buf: Any) -> None: ... def tell(self): ... def seek(self, ofs: Any, whence: int = ...): ... + def _skip(self, cnt: Any) -> None: ... def readable(self): ... def writable(self): ... def seekable(self): ... def readall(self): ... class PipeReader(RarExtFile): + _cmd: Any = ... + _proc: Any = ... + _tempfile: Any = ... def __init__(self, rf: Any, inf: Any, cmd: Any, tempfile: Optional[Any] = ...) -> None: ... + _returncode: Any = ... + def _close_proc(self) -> None: ... + _fd: Any = ... + def _open(self) -> None: ... + def _read(self, cnt: Any): ... def close(self) -> None: ... def readinto(self, buf: Any): ... class DirectReader(RarExtFile): + _cur: Any = ... + _cur_avail: Any = ... + _volfile: Any = ... + _fd: Any = ... + def _open(self) -> None: ... + def _skip(self, cnt: Any) -> None: ... + def _read(self, cnt: Any): ... + def _open_next(self): ... def readinto(self, buf: Any): ... class HeaderDecrypt: @@ -203,6 +309,9 @@ class HeaderDecrypt: def read(self, cnt: Optional[Any] = ...): ... class XFile: + __slots__: Any = ... + _need_close: bool = ... + _fd: Any = ... def __init__(self, xfile: Any, bufsize: int = ...) -> None: ... def read(self, n: Optional[Any] = ...): ... def tell(self): ... @@ -219,16 +328,25 @@ class NoHashContext: def hexdigest(self) -> None: ... class CRC32Context: + __slots__: Any = ... + _crc: int = ... def __init__(self, data: Optional[Any] = ...) -> None: ... def update(self, data: Any) -> None: ... def digest(self): ... def hexdigest(self): ... class Blake2SP: + __slots__: Any = ... digest_size: int = ... block_size: int = ... parallelism: int = ... + _buf: bytes = ... + _cur: int = ... + _digest: Any = ... + _thread: Any = ... def __init__(self, data: Optional[Any] = ...) -> None: ... + def _blake2s(self, ofs: Any, depth: Any, is_last: Any): ... + def _add_block(self, blk: Any) -> None: ... def update(self, data: Any) -> None: ... def digest(self): ... def hexdigest(self): ... @@ -236,12 +354,22 @@ class Blake2SP: class Rar3Sha1: digest_size: int = ... block_size: int = ... + _BLK_BE: Any = ... + _BLK_LE: Any = ... + __slots__: Any = ... + _md: Any = ... + _nbytes: int = ... + _rarbug: Any = ... def __init__(self, data: bytes = ..., rarbug: bool = ...) -> None: ... def update(self, data: Any) -> None: ... def digest(self): ... def hexdigest(self): ... + def _corrupt(self, data: Any, dpos: Any) -> None: ... class XTempFile: + __slots__: Any = ... + _tmpfile: Any = ... + _filename: Any = ... def __init__(self, rarfile: Any) -> None: ... def __enter__(self): ... def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ... diff --git a/lib/soupsieve_py2/css_match.py b/lib/soupsieve_py2/css_match.py index fb9b9b1..c81ba03 100644 --- a/lib/soupsieve_py2/css_match.py +++ b/lib/soupsieve_py2/css_match.py @@ -6,7 +6,7 @@ import re from .import css_types as ct import unicodedata -import bs4 +import bs4_py2 as bs4 # Empty tag pattern (whitespace okay) RE_NOT_EMPTY = re.compile('[^ \t\r\n\f]') diff --git a/lib/soupsieve_py3/css_match.py b/lib/soupsieve_py3/css_match.py index 71b2bb6..094fae3 100644 --- a/lib/soupsieve_py3/css_match.py +++ b/lib/soupsieve_py3/css_match.py @@ -5,7 +5,7 @@ import re from .import css_types as ct import unicodedata -import bs4 +import bs4_py3 as bs4 # Empty tag pattern (whitespace okay) RE_NOT_EMPTY = re.compile('[^ \t\r\n\f]')