Leonard Richardson
f834cd0138
Added a test just to verify that you can encode a document more deeply nested than the Python recursion limit.
2023-03-24 14:50:39 -04:00
Leonard Richardson
2236d4acae
Simplified the rules for going in and out of string_literal_tag, so less documentation in comments is necessary.
2023-03-24 14:22:11 -04:00
Leonard Richardson
c3a7983ee0
Keep track of the specific tag that put us into string literal mode, and only exit when that particular tag is closed.
2023-03-24 14:14:46 -04:00
Leonard Richardson
0917e9326f
Don't indent an empty string. 1084 of 1474 test documents now give identical results between versions.
2023-03-24 10:00:58 -04:00
Leonard Richardson
5003f474b2
Using a format string is very slightly slower than just adding all the bits of the string together.
2023-03-24 09:44:12 -04:00
Leonard Richardson
a342497cb8
Found and removed accidental calls to find(), greatly improving performance.
2023-03-23 16:59:27 -04:00
Leonard Richardson
c91087b78b
Bump version number preemptively.
2023-03-23 15:25:32 -04:00
Leonard Richardson
484a003315
Reorganize code and rename saxlike, since this isn'
2023-03-21 12:33:55 -04:00
Leonard Richardson
74e53f0c59
Removed old implementation code.
2023-03-21 11:38:27 -04:00
Leonard Richardson
3be39f46ec
Reimplemented the pretty-print algorithm to remove recursive function calls.
2023-03-21 11:27:08 -04:00
Leonard Richardson
d923a1cc96
Make sure PageElement has the known_xml attribute. [bug=2007895]
2023-03-20 11:44:25 -04:00
Leonard Richardson
5b3e6a0a74
Removed an html5lib fuzz test case that is marked as fixed in oss-fuzz and was probably not ever an issue.
2023-03-20 09:26:56 -04:00
Leonard Richardson
c40948bed1
Linked another html5lib crash to the fuzz tests.
2023-03-20 09:17:03 -04:00
Leonard Richardson
37f5c73d48
Added unit tests for fuzz test cases created by third
...
parties. Most of these tests are skipped since they either point
out problems in code outside of Beautiful Soup, or problems with
Beautiful Soup that haven't been resolved yet, but this puts them
all in one convenient place.
2023-03-20 09:15:20 -04:00
Leonard Richardson
aa9fd36703
Merge branch 'master' into fuzz
2023-03-20 09:14:01 -04:00
Leonard Richardson
49a5fe0ade
Added fuzz tests.
2023-03-20 09:13:58 -04:00
Leonard Richardson
d0878350d3
Replace pytest with python -m pytest in the release preparation script.
2023-03-20 08:26:58 -04:00
Leonard Richardson
67a75a51d6
Increased version number in __version__.
4.12.0
2023-03-20 07:37:08 -04:00
Leonard Richardson
cb2dd16544
Remove test-all-versions reference in release prep script.
2023-03-20 07:34:50 -04:00
Leonard Richardson
9aa2945798
Execute the pytest tests in a way that better respects virtual environments, and add a deprecation notice.
2023-03-20 07:30:25 -04:00
Leonard Richardson
01a32f82e7
Updated version number in docs.
2023-03-20 07:21:06 -04:00
Leonard Richardson
961f700cd9
Added a test harness for clusterfuzz test cases.
2023-03-20 07:17:11 -04:00
Leonard Richardson
c23fdc8db3
Prepare for 4.12.0 release.
2023-03-20 07:15:00 -04:00
Leonard Richardson
fbbc002be5
Rewrote documentation so that py:class:: directives could be inserted and the text would flow naturally.
2023-03-15 19:14:04 -04:00
Leonard Richardson
305133e16a
Add documentation references for the bs4 module itself as well as all currently documented classes.
2023-03-15 12:00:16 -04:00
Leonard Richardson
021d430584
Removed some error checking code from diagnose(), which is redundant with
...
similar (but more Pythonic) code in the BeautifulSoup constructor.
[bug=2007344]
2023-02-15 21:35:24 -05:00
Leonard Richardson
e0bbee776c
When the html.parser parser decides it can't parse a document, Beautiful
...
Soup now consistently propagates this fact by raising a
ParserRejectedMarkup error. [bug=2007343]
2023-02-15 20:37:18 -05:00
Leonard Richardson
8432abbfa1
Added missing import.
2023-02-15 06:33:25 -05:00
Leonard Richardson
40b3bfedf6
Fixed the UnicodeDammit example so that the example is more obviously UTF-8.
2023-02-13 14:19:43 -05:00
Leonard Richardson
172c1cf61b
Improved documentation of new method.
2023-02-12 12:38:41 -05:00
facelessuser
a01835fcf3
Add compile method
2023-02-10 11:34:48 -07:00
facelessuser
9107a904bf
Remove unnecessary test and don't pass namespace on precompiled select
2023-02-10 11:18:35 -07:00
Leonard Richardson
cbce97624b
Add another import of NavigableString just before the constructor is used, since most people don't run all the code in the doc in order.
2023-02-09 08:15:15 -05:00
Leonard Richardson
91397340f4
Fixed syntax errors in documentation.
2023-02-08 17:02:14 -05:00
Leonard Richardson
9db8024206
Added Makefile for the Portuguese translation.
2023-02-07 10:46:15 -05:00
Leonard Richardson
eb2bdf5b3e
Corrected a mistake in the Korean, Portuguese and Chinese translations of the documentation.
2023-02-07 10:38:54 -05:00
Leonard Richardson
7eedde44d4
Removed Soup Sieve fallback method, added documentation.
2023-02-07 10:37:50 -05:00
Leonard Richardson
6d70cafddd
Added a __getattr__ fallback.
2023-02-04 08:06:47 -05:00
Leonard Richardson
526fcf8d98
Added tests of CSS.escape.
2023-02-03 22:07:19 -05:00
Leonard Richardson
1f0f15f9b3
Move the Soup Sieve proxy and its tests into separate files.
2023-02-03 21:19:24 -05:00
Leonard Richardson
e41b7c97b0
Consistently use the name 'tag' instead of 'element,' since CSS selectors only operate on tags. Verify that select() and filter() return ResultSets.
2023-02-03 15:24:14 -05:00
Leonard Richardson
d550910207
Removed redundant whitespace.
2023-02-03 15:15:22 -05:00
Leonard Richardson
b16d415842
Added some docstrings and made the return values more consistent.
2023-02-03 15:15:02 -05:00
Leonard Richardson
7713145153
Test implementation.
2023-02-02 09:29:17 -05:00
Leonard Richardson
1896698334
Bump up the Python version I use to prepare releases.
4.11.2
2023-01-31 12:47:27 -05:00
Leonard Richardson
79a3261199
Fixed missing import that caused test failures when Soup Sieve is installed.
2023-01-31 12:01:52 -05:00
Leonard Richardson
ce05e06672
Consistently use pytest.mark.skipif to skip tests when the corresponding libraries are not installed.
2023-01-31 11:54:48 -05:00
Leonard Richardson
0cdcc79fb1
Reworded the 'multi-valued attributes' portion of the documentation to make it more clear. [bug=1970767]
2023-01-29 10:37:49 -05:00
Leonard Richardson
bd3c7492d8
Incremented version number.
2023-01-28 16:46:10 -05:00
Leonard Richardson
a65a97e91c
Parametrize the 'string is deprecated' warning test so we can test all of the relevant methods.
2023-01-27 20:16:08 -05:00