Open
Conversation
Author
|
You can see a run of this here:
I added Forgejo Actions mostly due to the argument that relying on GitHub Actions is bad. (I do agree, but it is free compute that now also supports arm64) |
|
If you update to diff --git a/wpull/document/htmlparse/html5lib_.py b/wpull/document/htmlparse/html5lib_.py
index 6f24743..ba2b746 100644
--- a/wpull/document/htmlparse/html5lib_.py
+++ b/wpull/document/htmlparse/html5lib_.py
@@ -1,8 +1,8 @@
'''Parsing using html5lib python.'''
import html5lib.constants
-import html5lib.tokenizer
import io
import os.path
+from html5lib._tokenizer import HTMLTokenizer
from wpull.document.htmlparse.base import BaseParser
from wpull.document.htmlparse.element import Comment, Doctype, Element
@@ -24,7 +24,7 @@ class HTMLParser(BaseParser):
return ValueError
def parse(self, file, encoding=None):
- tokenizer = html5lib.tokenizer.HTMLTokenizer(
+ tokenizer = HTMLTokenizer(
file, encoding=encoding,
useChardet=False if encoding else True,
parseMeta=False if encoding else True,
@@ -97,7 +97,7 @@ if __name__ == '__main__':
'testing', 'samples', 'xkcd_1.html'
)
with open(path, 'rb') as in_file:
- tokenizer = html5lib.tokenizer.HTMLTokenizer(in_file)
+ tokenizer = HTMLTokenizer(in_file)
for token in tokenizer:
print(token)Actually anything before html5lib/html5lib-python@c4dd677 would work without this patch, but this change made the tokenizer class private. |
iakat
approved these changes
Jun 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports the existing Drone CI commands to GitHub Actions and Forgejo Actions.
It currently has both, but is created for the purpose of discussion. I do not necessarily believe that adding everything is a good idea.
PR Details
The workflow is sufficiently generic that it could be ported easily to Forgejo by changing the base
runs-on/"OS" of the job. For testing reasons, the Forgejo Actions specify Codeberg's runner.I'd like to add Woodpecker CI, but testing it is not very easy, as Codeberg's implementation currently requires a manual application and review process.
GitHub Actions' recent addition of
arm64also makes testing for that architecture much easier, though it is important to note that it is currently in "Public Preview".CI-specific information/questions
At the time of writing,
python:3.5andpython:3.6fail with the following line:python:3.4fails with the following line:It is impossible for me to check whether this is expected or not, as there are no logs of previous or current CI runs.