Skip to content

Commit 7c04fbc

Browse files
authored
Support newer BeautifulSoup (#50)
v 0.13.0 * update testharness * improve typing * remove deprecations * adjust tests for deprecations * bump beautifulsoup to 4.14.x branch * standardizing UrlParserCacheable, cached_urlparser, and cached_urlparser_maxitems
1 parent d1004f1 commit 7c04fbc

8 files changed

Lines changed: 479 additions & 201 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,15 @@ jobs:
1515
strategy:
1616
matrix:
1717
os:
18-
- "ubuntu-latest"
18+
- "ubuntu-22.04"
1919
python-version:
20+
- "3.7"
2021
- "3.8"
2122
- "3.9"
2223
- "3.10"
2324
- "3.11"
2425
- "3.12"
2526
- "3.13"
26-
include:
27-
# ubuntu-latest[22.04] does not have: py36
28-
- os: "ubuntu-20.04"
29-
python-version: "3.6"
30-
- os: "ubuntu-20.04"
31-
python-version: "3.7"
3227
steps:
3328
- uses: actions/checkout@v3
3429
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
1-
1.0
2-
1.0 will be a complete api overhaul
1+
1.0 (unreleased)
2+
1.0 will include an api overhaul and remove all deprecations
3+
4+
5+
0.13.0
6+
* drop py36; no test options due to github deprecation of ubuntu20.04
7+
* `_coerce_validate_strategy` (invoked by `get_metadatas`) will now raise a
8+
ValueError if a string other than "all" is submitted. The only valid
9+
string is "all", otherwise a list of string - excluding "all" - must be
10+
submitted. Warnings of this have been emitted for several years.
11+
* __init__(`search_head_only`) now defaults to False
12+
* `UrlParserCacheable` has been extended to accepted a `urlparser` argument.
13+
This defaults to `urlparse` and expects the same signature.
14+
* __init__(`cached_urlparser`) has new deprecations to standardize the API
15+
submitting an Int to set max_items is deprecated; instead:
16+
cached_urlparser=True
17+
cached_urlparser_maxitems=int
18+
submitting 0 is deprecated; instead:
19+
cached_urlparser=False
20+
or
21+
cached_urlparser_maxitems=0
22+
cached_urlparser=False
23+
* __init__(`cached_urlparser_maxitems`) has been added
24+
* the next release is likely to be 1.0
325

426
0.12.3
527
* pin "BeautifulSoup4<4.15.0"

pytest.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[pytest]
2+
3+
filterwarnings =
4+
ignore:MetadataParser.
5+
ignore:`ParsedResult.get_metadata` returns a string

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
long_description = fp.read()
2828

2929
requires = [
30-
"BeautifulSoup4<4.15.0",
30+
"BeautifulSoup4>4.13.0,<4.14.0",
3131
"requests>=2.19.1",
3232
"requests-toolbelt>=0.8.0",
33+
"typing_extensions",
3334
]
3435
if sys.version_info.major == 2:
3536
requires.append("backports.html")
@@ -59,7 +60,6 @@
5960
"Intended Audience :: Developers",
6061
"License :: OSI Approved :: MIT License",
6162
"Programming Language :: Python :: 3",
62-
"Programming Language :: Python :: 3.6",
6363
"Programming Language :: Python :: 3.7",
6464
"Programming Language :: Python :: 3.8",
6565
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)